all repos — fluxbox @ dda53b698d0e371b9a7122dbc6fa8bfeaee4146f

custom fork of the fluxbox windowmanager

added toolbar.button.size
fluxgen fluxgen
commit

dda53b698d0e371b9a7122dbc6fa8bfeaee4146f

parent

2aef1e67c3fa06157b7607462463f796e881c215

2 files changed, 15 insertions(+), 12 deletions(-)

jump to
M src/ToolbarTheme.ccsrc/ToolbarTheme.cc

@@ -1,5 +1,5 @@

// ToolbarTheme.cc a theme class for Toolbar -// Copyright (c) 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) +// Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"),

@@ -19,11 +19,12 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ToolbarTheme.cc,v 1.12 2003/08/28 13:57:16 fluxgen Exp $ +// $Id: ToolbarTheme.cc,v 1.13 2003/10/13 23:47:38 fluxgen Exp $ #include "ToolbarTheme.hh" -#include "App.hh" +#include "FbTk/App.hh" + #include <iostream> using namespace std;

@@ -51,12 +52,13 @@ m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),

m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"), m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"), m_height(*this, "toolbar.height", "Toolbar.Height"), - m_display(FbTk::App::instance()->display()) { + m_button_size(*this, "toolbar.button.size", "Toolbar.Button.Size") { // set default value *m_bevel_width = 0; *m_alpha = 255; *m_shape = false; *m_height = 0; + *m_button_size = -1; } ToolbarTheme::~ToolbarTheme() {

@@ -76,4 +78,7 @@ if (*m_height > 100)

*m_height = 100; else if (*m_height < 0) *m_height = 0; + + if (*m_button_size > 100) + *m_button_size = 100; }
M src/ToolbarTheme.hhsrc/ToolbarTheme.hh

@@ -1,5 +1,5 @@

// ToolbarTheme.hh a theme class for Toolbar -// Copyright (c) 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) +// Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"),

@@ -19,14 +19,14 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ToolbarTheme.hh,v 1.9 2003/08/27 20:13:32 fluxgen Exp $ +// $Id: ToolbarTheme.hh,v 1.10 2003/10/13 23:47:38 fluxgen Exp $ #ifndef TOOLBARTHEME_HH #define TOOLBARTHEME_HH #include "FbTk/Theme.hh" -#include "Texture.hh" -#include "Color.hh" +#include "FbTk/Texture.hh" +#include "FbTk/Color.hh" #include "BorderTheme.hh"

@@ -46,16 +46,14 @@ inline int bevelWidth() const { return *m_bevel_width; }

inline bool shape() const { return *m_shape; } inline unsigned char alpha() const { return *m_alpha; } inline int height() const { return *m_height; } + inline int buttonSize() const { return *m_button_size; } private: FbTk::ThemeItem<FbTk::Texture> m_toolbar; BorderTheme m_border; FbTk::ThemeItem<int> m_bevel_width; FbTk::ThemeItem<bool> m_shape; - FbTk::ThemeItem<int> m_alpha, m_height; - - Display *m_display; - + FbTk::ThemeItem<int> m_alpha, m_height, m_button_size; }; #endif // TOOLBARTHEME_HH