diff options
author | fluxgen <fluxgen> | 2003-02-23 01:03:56 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-02-23 01:03:56 (GMT) |
commit | 3b594d1ba63715e87c1a12b3b7b2d4ab56357aaf (patch) | |
tree | e9de33ccb245d5890fa841141a6813ca80861a90 /src | |
parent | c424978f5adbd7281d9df3ed5ca414639b67a3c2 (diff) | |
download | fluxbox_pavel-3b594d1ba63715e87c1a12b3b7b2d4ab56357aaf.zip fluxbox_pavel-3b594d1ba63715e87c1a12b3b7b2d4ab56357aaf.tar.bz2 |
added button pic gc
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrameTheme.cc | 13 | ||||
-rw-r--r-- | src/FbWinFrameTheme.hh | 6 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc index ece7dcc..d42501c 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.2 2003/02/15 01:55:45 fluxgen Exp $ | 22 | // $Id: FbWinFrameTheme.cc,v 1.3 2003/02/23 01:02:52 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWinFrameTheme.hh" | 24 | #include "FbWinFrameTheme.hh" |
25 | #include "App.hh" | 25 | #include "App.hh" |
@@ -60,7 +60,8 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num): | |||
60 | Window rootwin = RootWindow(disp, screen_num); | 60 | Window rootwin = RootWindow(disp, screen_num); |
61 | m_label_text_focus_gc = XCreateGC(disp, rootwin, 0, 0); | 61 | m_label_text_focus_gc = XCreateGC(disp, rootwin, 0, 0); |
62 | m_label_text_unfocus_gc = XCreateGC(disp, rootwin, 0, 0); | 62 | m_label_text_unfocus_gc = XCreateGC(disp, rootwin, 0, 0); |
63 | 63 | m_button_pic_focus_gc = XCreateGC(disp, rootwin, 0, 0); | |
64 | m_button_pic_unfocus_gc = XCreateGC(disp, rootwin, 0, 0); | ||
64 | } | 65 | } |
65 | 66 | ||
66 | FbWinFrameTheme::~FbWinFrameTheme() { | 67 | FbWinFrameTheme::~FbWinFrameTheme() { |
@@ -68,6 +69,8 @@ FbWinFrameTheme::~FbWinFrameTheme() { | |||
68 | Display *disp = FbTk::App::instance()->display(); | 69 | Display *disp = FbTk::App::instance()->display(); |
69 | XFreeGC(disp, m_label_text_focus_gc); | 70 | XFreeGC(disp, m_label_text_focus_gc); |
70 | XFreeGC(disp, m_label_text_unfocus_gc); | 71 | XFreeGC(disp, m_label_text_unfocus_gc); |
72 | XFreeGC(disp, m_button_pic_focus_gc); | ||
73 | XFreeGC(disp, m_button_pic_unfocus_gc); | ||
71 | } | 74 | } |
72 | 75 | ||
73 | void FbWinFrameTheme::reconfigTheme() { | 76 | void FbWinFrameTheme::reconfigTheme() { |
@@ -82,6 +85,12 @@ void FbWinFrameTheme::reconfigTheme() { | |||
82 | gcv.foreground = m_label_unfocus_color->pixel(); | 85 | gcv.foreground = m_label_unfocus_color->pixel(); |
83 | XChangeGC(disp, m_label_text_unfocus_gc, gc_value_mask, &gcv); | 86 | XChangeGC(disp, m_label_text_unfocus_gc, gc_value_mask, &gcv); |
84 | 87 | ||
88 | gcv.foreground = m_button_focus_color->pixel(); | ||
89 | XChangeGC(disp, m_button_pic_focus_gc, gc_value_mask, &gcv); | ||
90 | |||
91 | gcv.foreground = m_button_unfocus_color->pixel(); | ||
92 | XChangeGC(disp, m_button_pic_unfocus_gc, gc_value_mask, &gcv); | ||
93 | |||
85 | // notify listeners | 94 | // notify listeners |
86 | m_theme_change.notify(); | 95 | m_theme_change.notify(); |
87 | } | 96 | } |
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh index be4a555..7ffe99d 100644 --- a/src/FbWinFrameTheme.hh +++ b/src/FbWinFrameTheme.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: FbWinFrameTheme.hh,v 1.3 2003/02/16 01:13:24 fluxgen Exp $ | 22 | // $Id: FbWinFrameTheme.hh,v 1.4 2003/02/23 01:03:56 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBWINFRAMETHEME_HH | 24 | #ifndef FBWINFRAMETHEME_HH |
25 | #define FBWINFRAMETHEME_HH | 25 | #define FBWINFRAMETHEME_HH |
@@ -74,6 +74,8 @@ public: | |||
74 | 74 | ||
75 | GC labelTextFocusGC() const { return m_label_text_focus_gc; } | 75 | GC labelTextFocusGC() const { return m_label_text_focus_gc; } |
76 | GC labelTextUnfocusGC() const { return m_label_text_unfocus_gc; } | 76 | GC labelTextUnfocusGC() const { return m_label_text_unfocus_gc; } |
77 | GC buttonPicFocusGC() const { return m_button_pic_focus_gc; } | ||
78 | GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc; } | ||
77 | 79 | ||
78 | void reconfigTheme(); | 80 | void reconfigTheme(); |
79 | 81 | ||
@@ -94,7 +96,7 @@ private: | |||
94 | FbTk::ThemeItem<FbTk::Justify> m_textjustify; | 96 | FbTk::ThemeItem<FbTk::Justify> m_textjustify; |
95 | 97 | ||
96 | GC m_label_text_focus_gc, m_label_text_unfocus_gc; | 98 | GC m_label_text_focus_gc, m_label_text_unfocus_gc; |
97 | 99 | GC m_button_pic_focus_gc, m_button_pic_unfocus_gc; | |
98 | FbTk::Subject m_theme_change; | 100 | FbTk::Subject m_theme_change; |
99 | }; | 101 | }; |
100 | 102 | ||