summaryrefslogtreecommitdiff
path: root/src/ToolbarTheme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolbarTheme.cc')
-rw-r--r--src/ToolbarTheme.cc59
1 files changed, 1 insertions, 58 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);