From dda53b698d0e371b9a7122dbc6fa8bfeaee4146f Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 13 Oct 2003 23:47:38 +0000 Subject: added toolbar.button.size --- src/ToolbarTheme.cc | 13 +++++++++---- src/ToolbarTheme.hh | 14 ++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc index b7ffc4b..f1a68c7 100644 --- a/src/ToolbarTheme.cc +++ b/src/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 @@ // 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 using namespace std; @@ -51,12 +52,13 @@ ToolbarTheme::ToolbarTheme(int screen_num): 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 @@ void ToolbarTheme::reconfigTheme() { *m_height = 100; else if (*m_height < 0) *m_height = 0; + + if (*m_button_size > 100) + *m_button_size = 100; } diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh index 1161e85..c33dbe8 100644 --- a/src/ToolbarTheme.hh +++ b/src/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 @@ // 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 @@ public: 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 m_toolbar; BorderTheme m_border; FbTk::ThemeItem m_bevel_width; FbTk::ThemeItem m_shape; - FbTk::ThemeItem m_alpha, m_height; - - Display *m_display; - + FbTk::ThemeItem m_alpha, m_height, m_button_size; }; #endif // TOOLBARTHEME_HH -- cgit v0.11.2