aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-13 09:53:46 (GMT)
committerfluxgen <fluxgen>2003-08-13 09:53:46 (GMT)
commit1222e964167e6b0ebd186e58e2084f95bc4bc75e (patch)
tree01e2b3f66b20a003d97f4b58e485d1dc81b9f9f7
parent044165d1e7912030159393e69a5b446e52578d21 (diff)
downloadfluxbox_paul-1222e964167e6b0ebd186e58e2084f95bc4bc75e.zip
fluxbox_paul-1222e964167e6b0ebd186e58e2084f95bc4bc75e.tar.bz2
removed old theme items
-rw-r--r--src/ToolbarTheme.cc59
-rw-r--r--src/ToolbarTheme.hh31
2 files changed, 6 insertions, 84 deletions
diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc
index c6aa5d2..0608726 100644
--- a/src/ToolbarTheme.cc
+++ b/src/ToolbarTheme.cc
@@ -19,7 +19,7 @@
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.6 2003/08/11 16:54:46 fluxgen Exp $ 22// $Id: ToolbarTheme.cc,v 1.7 2003/08/13 09:53:46 fluxgen Exp $
23 23
24#include "ToolbarTheme.hh" 24#include "ToolbarTheme.hh"
25 25
@@ -45,29 +45,14 @@ void FbTk::ThemeItem<bool>::setFromString(char const *strval) {
45 45
46ToolbarTheme::ToolbarTheme(int screen_num): 46ToolbarTheme::ToolbarTheme(int screen_num):
47 FbTk::Theme(screen_num), 47 FbTk::Theme(screen_num),
48 m_label_textcolor(*this,
49 "toolbar.label.textColor", "Toolbar.Label.TextColor"),
50 m_window_textcolor(*this,
51 "toolbar.windowLabel.textColor",
52 "Toolbar.WindowLabel.TextColor"),
53 m_clock_textcolor(*this,
54 "toolbar.clock.textColor", "Toolbar.Clock.TextColor"),
55 m_button_color(*this, 48 m_button_color(*this,
56 "toolbar.button.picColor", "Toolbar.Button.PicColor"), 49 "toolbar.button.picColor", "Toolbar.Button.PicColor"),
57 m_border_color(*this, 50 m_border_color(*this,
58 "toolbar.borderColor", "Toolbar.BorderColor"), 51 "toolbar.borderColor", "Toolbar.BorderColor"),
59 m_toolbar(*this, "toolbar", "Toolbar"), 52 m_toolbar(*this, "toolbar", "Toolbar"),
60 m_iconbar_focused(*this, "toolbar.iconbar.focused", "Toolbar.Iconbar.Focused"),
61 m_iconbar_unfocused(*this, "toolbar.iconbar.unfocused", "Toolbar.Iconbar.Unfocused"),
62 m_label(*this, "toolbar.label", "Toolbar.Label"),
63 m_window(*this, "toolbar.windowLabel", "Toolbar.WindowLabel"),
64 m_button(*this, "toolbar.button", "Toolbar.Button"), 53 m_button(*this, "toolbar.button", "Toolbar.Button"),
65 m_pressed_button(*this, 54 m_pressed_button(*this,
66 "toolbar.button.pressed", "Toolbar.Button.Pressed"), 55 "toolbar.button.pressed", "Toolbar.Button.Pressed"),
67 m_clock(*this, "toolbar.clock", "Toolbar.Clock"),
68 m_font(*this, "toolbar.font", "Toolbar.Font"),
69 m_icon_font(*this, "toolbar.iconFont", "Toolbar.IconFont"),
70 m_justify(*this, "toolbar.justify", "Toolbar.Justify"),
71 m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"), 56 m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"),
72 m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"), 57 m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
73 m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"), 58 m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"),
@@ -80,45 +65,16 @@ ToolbarTheme::ToolbarTheme(int screen_num):
80 XGCValues gcv; 65 XGCValues gcv;
81 unsigned long gc_value_mask = GCForeground; 66 unsigned long gc_value_mask = GCForeground;
82 67
83 gcv.foreground = m_label_textcolor->pixel();
84
85 m_label_text_gc =
86 XCreateGC(m_display, rootwindow,
87 gc_value_mask, &gcv);
88
89 gcv.foreground = m_window_textcolor->pixel();
90 m_window_text_gc =
91 XCreateGC(m_display, rootwindow,
92 gc_value_mask, &gcv);
93
94 gcv.foreground = m_clock_textcolor->pixel();
95 m_clock_text_gc =
96 XCreateGC(m_display, rootwindow,
97 gc_value_mask, &gcv);
98 68
99 gcv.foreground = m_button_color->pixel(); 69 gcv.foreground = m_button_color->pixel();
100 m_button_pic_gc = 70 m_button_pic_gc =
101 XCreateGC(m_display, rootwindow, 71 XCreateGC(m_display, rootwindow,
102 gc_value_mask, &gcv); 72 gc_value_mask, &gcv);
103 73
104 gcv.foreground = m_iconbar_focused->color().pixel();
105 m_icon_text_focused_gc =
106 XCreateGC(m_display, rootwindow,
107 gc_value_mask, &gcv);
108
109 m_icon_text_unfocused_gc =
110 XCreateGC(m_display, rootwindow,
111 gc_value_mask, &gcv);
112
113 // load from current database
114 FbTk::ThemeManager::instance().loadTheme(*this);
115} 74}
116 75
117ToolbarTheme::~ToolbarTheme() { 76ToolbarTheme::~ToolbarTheme() {
118 XFreeGC(m_display, m_button_pic_gc); 77 XFreeGC(m_display, m_button_pic_gc);
119 XFreeGC(m_display, m_clock_text_gc);
120 XFreeGC(m_display, m_label_text_gc);
121 XFreeGC(m_display, m_window_text_gc);
122} 78}
123 79
124void ToolbarTheme::reconfigTheme() { 80void ToolbarTheme::reconfigTheme() {
@@ -130,19 +86,6 @@ void ToolbarTheme::reconfigTheme() {
130 XGCValues gcv; 86 XGCValues gcv;
131 unsigned long gc_value_mask = GCForeground; 87 unsigned long gc_value_mask = GCForeground;
132 88
133
134 gcv.foreground = m_label_textcolor->pixel();
135 XChangeGC(m_display, m_label_text_gc,
136 gc_value_mask, &gcv);
137
138 gcv.foreground = m_window_textcolor->pixel();
139 XChangeGC(m_display, m_window_text_gc,
140 gc_value_mask, &gcv);
141
142 gcv.foreground = m_clock_textcolor->pixel();
143 XChangeGC(m_display, m_clock_text_gc,
144 gc_value_mask, &gcv);
145
146 gcv.foreground = m_button_color->pixel(); 89 gcv.foreground = m_button_color->pixel();
147 XChangeGC(m_display, m_button_pic_gc, 90 XChangeGC(m_display, m_button_pic_gc,
148 gc_value_mask, &gcv); 91 gc_value_mask, &gcv);
diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh
index d356ead..4076732 100644
--- a/src/ToolbarTheme.hh
+++ b/src/ToolbarTheme.hh
@@ -19,7 +19,7 @@
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.6 2003/08/11 16:54:46 fluxgen Exp $ 22// $Id: ToolbarTheme.hh,v 1.7 2003/08/13 09:53:35 fluxgen Exp $
23 23
24#ifndef TOOLBARTHEME_HH 24#ifndef TOOLBARTHEME_HH
25#define TOOLBARTHEME_HH 25#define TOOLBARTHEME_HH
@@ -43,9 +43,6 @@ public:
43 @name colors 43 @name colors
44 */ 44 */
45 ///@{ 45 ///@{
46 const FbTk::Color &labelTextColor() const { return *m_label_textcolor; }
47 const FbTk::Color &windowTextColor() const { return *m_window_textcolor; }
48 const FbTk::Color &clockTextColor() const { return *m_clock_textcolor; }
49 const FbTk::Color &buttonColor() const { return *m_button_color; } 46 const FbTk::Color &buttonColor() const { return *m_button_color; }
50 const FbTk::Color &borderColor() const { return *m_border_color; } 47 const FbTk::Color &borderColor() const { return *m_border_color; }
51 ///@} 48 ///@}
@@ -54,30 +51,16 @@ public:
54 */ 51 */
55 ///@{ 52 ///@{
56 const FbTk::Texture &toolbar() const { return *m_toolbar; } 53 const FbTk::Texture &toolbar() const { return *m_toolbar; }
57 const FbTk::Texture &iconbarFocused() const { return *m_iconbar_focused; }
58 const FbTk::Texture &iconbarUnfocused() const { return *m_iconbar_unfocused; }
59 const FbTk::Texture &label() const { return *m_label; }
60 const FbTk::Texture &window() const { return *m_window; }
61 const FbTk::Texture &button() const { return *m_button; } 54 const FbTk::Texture &button() const { return *m_button; }
62 const FbTk::Texture &pressedButton() const { return *m_pressed_button; } 55 const FbTk::Texture &pressedButton() const { return *m_pressed_button; }
63 const FbTk::Texture &clock() const { return *m_clock; }
64 ///@} 56 ///@}
65 const FbTk::Font &font() const { return *m_font; } 57
66 FbTk::Font &font() { return *m_font; }
67 const FbTk::Font &iconFont() const { return *m_icon_font; }
68 FbTk::Font &iconFont() { return *m_icon_font; }
69 /** 58 /**
70 @name graphic context 59 @name graphic context
71 */ 60 */
72 ///@{ 61 ///@{
73 GC labelTextGC() const { return m_label_text_gc; }
74 GC windowTextGC() const { return m_window_text_gc; }
75 GC clockTextGC() const { return m_clock_text_gc; }
76 GC buttonPicGC() const { return m_button_pic_gc; } 62 GC buttonPicGC() const { return m_button_pic_gc; }
77 GC iconTextFocusedGC() const { return m_icon_text_focused_gc; }
78 GC iconTextUnfocusedGC() const { return m_icon_text_unfocused_gc; }
79 ///@} 63 ///@}
80 FbTk::Justify justify() const { return *m_justify; }
81 64
82 inline int borderWidth() const { return *m_border_width; } 65 inline int borderWidth() const { return *m_border_width; }
83 inline int bevelWidth() const { return *m_bevel_width; } 66 inline int bevelWidth() const { return *m_bevel_width; }
@@ -87,21 +70,17 @@ public:
87 70
88private: 71private:
89 // text colors 72 // text colors
90 FbTk::ThemeItem<FbTk::Color> m_label_textcolor, m_window_textcolor, m_clock_textcolor;
91 FbTk::ThemeItem<FbTk::Color> m_button_color, m_border_color; 73 FbTk::ThemeItem<FbTk::Color> m_button_color, m_border_color;
92 // textures 74 // textures
93 FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_iconbar_focused, m_iconbar_unfocused, 75 FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_button, m_pressed_button;
94 m_label, m_window, m_button, m_pressed_button, m_clock;
95 FbTk::ThemeItem<FbTk::Font> m_font, m_icon_font;
96 FbTk::ThemeItem<FbTk::Justify> m_justify;
97 76
98 FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_button_border_width; 77 FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_button_border_width;
99 FbTk::ThemeItem<bool> m_shape; 78 FbTk::ThemeItem<bool> m_shape;
100 FbTk::ThemeItem<int> m_alpha; 79 FbTk::ThemeItem<int> m_alpha;
101 80
102 // graphic context 81 // graphic context
103 GC m_label_text_gc, m_window_text_gc, m_clock_text_gc, m_button_pic_gc; 82 GC m_button_pic_gc;
104 GC m_icon_text_unfocused_gc, m_icon_text_focused_gc; 83
105 Display *m_display; 84 Display *m_display;
106 85
107}; 86};