aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ToolbarTheme.cc13
-rw-r--r--src/ToolbarTheme.hh14
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 @@
1// ToolbarTheme.cc a theme class for Toolbar 1// ToolbarTheme.cc a theme class for Toolbar
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -19,11 +19,12 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: ToolbarTheme.cc,v 1.12 2003/08/28 13:57:16 fluxgen Exp $ 22// $Id: ToolbarTheme.cc,v 1.13 2003/10/13 23:47:38 fluxgen Exp $
23 23
24#include "ToolbarTheme.hh" 24#include "ToolbarTheme.hh"
25 25
26#include "App.hh" 26#include "FbTk/App.hh"
27
27#include <iostream> 28#include <iostream>
28using namespace std; 29using namespace std;
29 30
@@ -51,12 +52,13 @@ ToolbarTheme::ToolbarTheme(int screen_num):
51 m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"), 52 m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"),
52 m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"), 53 m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"),
53 m_height(*this, "toolbar.height", "Toolbar.Height"), 54 m_height(*this, "toolbar.height", "Toolbar.Height"),
54 m_display(FbTk::App::instance()->display()) { 55 m_button_size(*this, "toolbar.button.size", "Toolbar.Button.Size") {
55 // set default value 56 // set default value
56 *m_bevel_width = 0; 57 *m_bevel_width = 0;
57 *m_alpha = 255; 58 *m_alpha = 255;
58 *m_shape = false; 59 *m_shape = false;
59 *m_height = 0; 60 *m_height = 0;
61 *m_button_size = -1;
60} 62}
61 63
62ToolbarTheme::~ToolbarTheme() { 64ToolbarTheme::~ToolbarTheme() {
@@ -76,4 +78,7 @@ void ToolbarTheme::reconfigTheme() {
76 *m_height = 100; 78 *m_height = 100;
77 else if (*m_height < 0) 79 else if (*m_height < 0)
78 *m_height = 0; 80 *m_height = 0;
81
82 if (*m_button_size > 100)
83 *m_button_size = 100;
79} 84}
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 @@
1// ToolbarTheme.hh a theme class for Toolbar 1// ToolbarTheme.hh a theme class for Toolbar
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -19,14 +19,14 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: ToolbarTheme.hh,v 1.9 2003/08/27 20:13:32 fluxgen Exp $ 22// $Id: ToolbarTheme.hh,v 1.10 2003/10/13 23:47:38 fluxgen Exp $
23 23
24#ifndef TOOLBARTHEME_HH 24#ifndef TOOLBARTHEME_HH
25#define TOOLBARTHEME_HH 25#define TOOLBARTHEME_HH
26 26
27#include "FbTk/Theme.hh" 27#include "FbTk/Theme.hh"
28#include "Texture.hh" 28#include "FbTk/Texture.hh"
29#include "Color.hh" 29#include "FbTk/Color.hh"
30 30
31#include "BorderTheme.hh" 31#include "BorderTheme.hh"
32 32
@@ -46,16 +46,14 @@ public:
46 inline bool shape() const { return *m_shape; } 46 inline bool shape() const { return *m_shape; }
47 inline unsigned char alpha() const { return *m_alpha; } 47 inline unsigned char alpha() const { return *m_alpha; }
48 inline int height() const { return *m_height; } 48 inline int height() const { return *m_height; }
49 inline int buttonSize() const { return *m_button_size; }
49private: 50private:
50 FbTk::ThemeItem<FbTk::Texture> m_toolbar; 51 FbTk::ThemeItem<FbTk::Texture> m_toolbar;
51 BorderTheme m_border; 52 BorderTheme m_border;
52 53
53 FbTk::ThemeItem<int> m_bevel_width; 54 FbTk::ThemeItem<int> m_bevel_width;
54 FbTk::ThemeItem<bool> m_shape; 55 FbTk::ThemeItem<bool> m_shape;
55 FbTk::ThemeItem<int> m_alpha, m_height; 56 FbTk::ThemeItem<int> m_alpha, m_height, m_button_size;
56
57 Display *m_display;
58
59}; 57};
60 58
61#endif // TOOLBARTHEME_HH 59#endif // TOOLBARTHEME_HH