aboutsummaryrefslogtreecommitdiff
path: root/src/ToolbarTheme.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-11 16:54:46 (GMT)
committerfluxgen <fluxgen>2003-08-11 16:54:46 (GMT)
commit6016857678cc2a58bfb8af62e5474c3671d7bd38 (patch)
treeb955c6846e35da3d9caca7794151970f3fe8ce05 /src/ToolbarTheme.cc
parentf6d07eacb3165bad2b1bcd8a04700a95611fd0a0 (diff)
downloadfluxbox_pavel-6016857678cc2a58bfb8af62e5474c3671d7bd38.zip
fluxbox_pavel-6016857678cc2a58bfb8af62e5474c3671d7bd38.tar.bz2
updated for new toolbar
Diffstat (limited to 'src/ToolbarTheme.cc')
-rw-r--r--src/ToolbarTheme.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc
index 28a80a4..c6aa5d2 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.5 2003/07/10 13:48:35 fluxgen Exp $ 22// $Id: ToolbarTheme.cc,v 1.6 2003/08/11 16:54:46 fluxgen Exp $
23 23
24#include "ToolbarTheme.hh" 24#include "ToolbarTheme.hh"
25 25
@@ -55,8 +55,10 @@ ToolbarTheme::ToolbarTheme(int screen_num):
55 m_button_color(*this, 55 m_button_color(*this,
56 "toolbar.button.picColor", "Toolbar.Button.PicColor"), 56 "toolbar.button.picColor", "Toolbar.Button.PicColor"),
57 m_border_color(*this, 57 m_border_color(*this,
58 "toolbar.borderColor", "toolbar.borderColor"), 58 "toolbar.borderColor", "Toolbar.BorderColor"),
59 m_toolbar(*this, "toolbar", "Toolbar"), 59 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"),
60 m_label(*this, "toolbar.label", "Toolbar.Label"), 62 m_label(*this, "toolbar.label", "Toolbar.Label"),
61 m_window(*this, "toolbar.windowLabel", "Toolbar.WindowLabel"), 63 m_window(*this, "toolbar.windowLabel", "Toolbar.WindowLabel"),
62 m_button(*this, "toolbar.button", "Toolbar.Button"), 64 m_button(*this, "toolbar.button", "Toolbar.Button"),
@@ -64,11 +66,13 @@ ToolbarTheme::ToolbarTheme(int screen_num):
64 "toolbar.button.pressed", "Toolbar.Button.Pressed"), 66 "toolbar.button.pressed", "Toolbar.Button.Pressed"),
65 m_clock(*this, "toolbar.clock", "Toolbar.Clock"), 67 m_clock(*this, "toolbar.clock", "Toolbar.Clock"),
66 m_font(*this, "toolbar.font", "Toolbar.Font"), 68 m_font(*this, "toolbar.font", "Toolbar.Font"),
69 m_icon_font(*this, "toolbar.iconFont", "Toolbar.IconFont"),
67 m_justify(*this, "toolbar.justify", "Toolbar.Justify"), 70 m_justify(*this, "toolbar.justify", "Toolbar.Justify"),
68 m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"), 71 m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"),
69 m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"), 72 m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
70 m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"), 73 m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"),
71 m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"), 74 m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"),
75 m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"),
72 m_display(FbTk::App::instance()->display()) { 76 m_display(FbTk::App::instance()->display()) {
73 77
74 Window rootwindow = RootWindow(m_display, screen_num); 78 Window rootwindow = RootWindow(m_display, screen_num);
@@ -96,6 +100,16 @@ ToolbarTheme::ToolbarTheme(int screen_num):
96 m_button_pic_gc = 100 m_button_pic_gc =
97 XCreateGC(m_display, rootwindow, 101 XCreateGC(m_display, rootwindow,
98 gc_value_mask, &gcv); 102 gc_value_mask, &gcv);
103
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
99 // load from current database 113 // load from current database
100 FbTk::ThemeManager::instance().loadTheme(*this); 114 FbTk::ThemeManager::instance().loadTheme(*this);
101} 115}
@@ -108,6 +122,10 @@ ToolbarTheme::~ToolbarTheme() {
108} 122}
109 123
110void ToolbarTheme::reconfigTheme() { 124void ToolbarTheme::reconfigTheme() {
125 if (*m_alpha > 255)
126 *m_alpha = 255;
127 else if (*m_alpha < 0)
128 *m_alpha = 0;
111 129
112 XGCValues gcv; 130 XGCValues gcv;
113 unsigned long gc_value_mask = GCForeground; 131 unsigned long gc_value_mask = GCForeground;
@@ -129,6 +147,4 @@ void ToolbarTheme::reconfigTheme() {
129 XChangeGC(m_display, m_button_pic_gc, 147 XChangeGC(m_display, m_button_pic_gc,
130 gc_value_mask, &gcv); 148 gc_value_mask, &gcv);
131 149
132 // notify listeners
133 m_theme_change_sig.notify();
134} 150}