summaryrefslogtreecommitdiff
path: root/src/FbWinFrameTheme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrameTheme.cc')
-rw-r--r--src/FbWinFrameTheme.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc
index 67a618d..70312bf 100644
--- a/src/FbWinFrameTheme.cc
+++ b/src/FbWinFrameTheme.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: FbWinFrameTheme.cc,v 1.13 2003/09/29 12:53:58 rathnor Exp $ 22// $Id: FbWinFrameTheme.cc,v 1.14 2003/12/09 08:48:08 rathnor Exp $
23 23
24#include "FbWinFrameTheme.hh" 24#include "FbWinFrameTheme.hh"
25#include "App.hh" 25#include "App.hh"
@@ -27,11 +27,13 @@
27#include <X11/cursorfont.h> 27#include <X11/cursorfont.h>
28 28
29#include <iostream> 29#include <iostream>
30using namespace std;
30 31
31FbWinFrameTheme::FbWinFrameTheme(int screen_num): 32FbWinFrameTheme::FbWinFrameTheme(int screen_num):
32 FbTk::Theme(screen_num), 33 FbTk::Theme(screen_num),
33 m_label_focus(*this, "window.label.focus", "Window.Label.Focus"), 34 m_label_focus(*this, "window.label.focus", "Window.Label.Focus"),
34 m_label_unfocus(*this, "window.label.unfocus", "Window.Label.Unfocus"), 35 m_label_unfocus(*this, "window.label.unfocus", "Window.Label.Unfocus"),
36 m_label_active(*this, "window.label.active", "Window.Label.Active"),
35 37
36 m_title_focus(*this, "window.title.focus", "Window.Title.Focus"), 38 m_title_focus(*this, "window.title.focus", "Window.Title.Focus"),
37 m_title_unfocus(*this, "window.title.unfocus", "Window.Title.Unfocus"), 39 m_title_unfocus(*this, "window.title.unfocus", "Window.Title.Unfocus"),
@@ -48,6 +50,7 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
48 50
49 m_label_focus_color(*this, "window.label.focus.textColor", "Window.Label.Focus.TextColor"), 51 m_label_focus_color(*this, "window.label.focus.textColor", "Window.Label.Focus.TextColor"),
50 m_label_unfocus_color(*this, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"), 52 m_label_unfocus_color(*this, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"),
53 m_label_active_color(*this, "window.label.active.textColor", "Window.Label.Active.TextColor"),
51 54
52 m_frame_focus_color(*this, "window.frame.focusColor", "Window.Frame.FocusColor"), 55 m_frame_focus_color(*this, "window.frame.focusColor", "Window.Frame.FocusColor"),
53 m_frame_unfocus_color(*this, "window.frame.unfocusColor", "Window.Frame.UnfocusColor"), 56 m_frame_unfocus_color(*this, "window.frame.unfocusColor", "Window.Frame.UnfocusColor"),
@@ -65,6 +68,7 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
65 m_border(*this, "window", "Window"), // for window.border* 68 m_border(*this, "window", "Window"), // for window.border*
66 m_label_text_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), 69 m_label_text_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
67 m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), 70 m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
71 m_label_text_active_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
68 m_button_pic_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), 72 m_button_pic_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
69 m_button_pic_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)) { 73 m_button_pic_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)) {
70 74
@@ -80,6 +84,8 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
80 m_cursor_lower_right_angle = XCreateFontCursor(disp, XC_lr_angle); 84 m_cursor_lower_right_angle = XCreateFontCursor(disp, XC_lr_angle);
81 m_cursor_upper_right_angle = XCreateFontCursor(disp, XC_ur_angle); 85 m_cursor_upper_right_angle = XCreateFontCursor(disp, XC_ur_angle);
82 m_cursor_upper_left_angle = XCreateFontCursor(disp, XC_ul_angle); 86 m_cursor_upper_left_angle = XCreateFontCursor(disp, XC_ul_angle);
87
88 reconfigTheme();
83} 89}
84 90
85FbWinFrameTheme::~FbWinFrameTheme() { 91FbWinFrameTheme::~FbWinFrameTheme() {
@@ -95,6 +101,11 @@ bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) {
95 return FbTk::ThemeManager::instance().loadItem(item, "bevelWidth", "bevelWidth"); 101 return FbTk::ThemeManager::instance().loadItem(item, "bevelWidth", "bevelWidth");
96 else if (item.name() == "window.handleWidth") 102 else if (item.name() == "window.handleWidth")
97 return FbTk::ThemeManager::instance().loadItem(item, "handleWidth", "HandleWidth"); 103 return FbTk::ThemeManager::instance().loadItem(item, "handleWidth", "HandleWidth");
104 else if (item.name() == "window.label.active")
105 return FbTk::ThemeManager::instance().loadItem(item, "window.label.unfocus", "Window.Label.Unfocus");
106 else if (item.name() == "window.label.active.textColor")
107 return FbTk::ThemeManager::instance().loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor");
108
98 109
99 return false; 110 return false;
100} 111}
@@ -117,6 +128,7 @@ void FbWinFrameTheme::reconfigTheme() {
117 128
118 m_label_text_focus_gc.setForeground(*m_label_focus_color); 129 m_label_text_focus_gc.setForeground(*m_label_focus_color);
119 m_label_text_unfocus_gc.setForeground(*m_label_unfocus_color); 130 m_label_text_unfocus_gc.setForeground(*m_label_unfocus_color);
131 m_label_text_active_gc.setForeground(*m_label_active_color);
120 m_button_pic_focus_gc.setForeground(*m_button_focus_color); 132 m_button_pic_focus_gc.setForeground(*m_button_focus_color);
121 m_button_pic_unfocus_gc.setForeground(*m_button_unfocus_color); 133 m_button_pic_unfocus_gc.setForeground(*m_button_unfocus_color);
122 134