added button pic gc
This commit is contained in:
parent
c424978f5a
commit
3b594d1ba6
2 changed files with 15 additions and 4 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbWinFrameTheme.cc,v 1.2 2003/02/15 01:55:45 fluxgen Exp $
|
||||
// $Id: FbWinFrameTheme.cc,v 1.3 2003/02/23 01:02:52 fluxgen Exp $
|
||||
|
||||
#include "FbWinFrameTheme.hh"
|
||||
#include "App.hh"
|
||||
|
@ -60,7 +60,8 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
|
|||
Window rootwin = RootWindow(disp, screen_num);
|
||||
m_label_text_focus_gc = XCreateGC(disp, rootwin, 0, 0);
|
||||
m_label_text_unfocus_gc = XCreateGC(disp, rootwin, 0, 0);
|
||||
|
||||
m_button_pic_focus_gc = XCreateGC(disp, rootwin, 0, 0);
|
||||
m_button_pic_unfocus_gc = XCreateGC(disp, rootwin, 0, 0);
|
||||
}
|
||||
|
||||
FbWinFrameTheme::~FbWinFrameTheme() {
|
||||
|
@ -68,6 +69,8 @@ FbWinFrameTheme::~FbWinFrameTheme() {
|
|||
Display *disp = FbTk::App::instance()->display();
|
||||
XFreeGC(disp, m_label_text_focus_gc);
|
||||
XFreeGC(disp, m_label_text_unfocus_gc);
|
||||
XFreeGC(disp, m_button_pic_focus_gc);
|
||||
XFreeGC(disp, m_button_pic_unfocus_gc);
|
||||
}
|
||||
|
||||
void FbWinFrameTheme::reconfigTheme() {
|
||||
|
@ -82,6 +85,12 @@ void FbWinFrameTheme::reconfigTheme() {
|
|||
gcv.foreground = m_label_unfocus_color->pixel();
|
||||
XChangeGC(disp, m_label_text_unfocus_gc, gc_value_mask, &gcv);
|
||||
|
||||
gcv.foreground = m_button_focus_color->pixel();
|
||||
XChangeGC(disp, m_button_pic_focus_gc, gc_value_mask, &gcv);
|
||||
|
||||
gcv.foreground = m_button_unfocus_color->pixel();
|
||||
XChangeGC(disp, m_button_pic_unfocus_gc, gc_value_mask, &gcv);
|
||||
|
||||
// notify listeners
|
||||
m_theme_change.notify();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbWinFrameTheme.hh,v 1.3 2003/02/16 01:13:24 fluxgen Exp $
|
||||
// $Id: FbWinFrameTheme.hh,v 1.4 2003/02/23 01:03:56 fluxgen Exp $
|
||||
|
||||
#ifndef FBWINFRAMETHEME_HH
|
||||
#define FBWINFRAMETHEME_HH
|
||||
|
@ -74,6 +74,8 @@ public:
|
|||
|
||||
GC labelTextFocusGC() const { return m_label_text_focus_gc; }
|
||||
GC labelTextUnfocusGC() const { return m_label_text_unfocus_gc; }
|
||||
GC buttonPicFocusGC() const { return m_button_pic_focus_gc; }
|
||||
GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc; }
|
||||
|
||||
void reconfigTheme();
|
||||
|
||||
|
@ -94,7 +96,7 @@ private:
|
|||
FbTk::ThemeItem<FbTk::Justify> m_textjustify;
|
||||
|
||||
GC m_label_text_focus_gc, m_label_text_unfocus_gc;
|
||||
|
||||
GC m_button_pic_focus_gc, m_button_pic_unfocus_gc;
|
||||
FbTk::Subject m_theme_change;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue