From 1222e964167e6b0ebd186e58e2084f95bc4bc75e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 13 Aug 2003 09:53:46 +0000 Subject: removed old theme items --- src/ToolbarTheme.cc | 59 +---------------------------------------------------- src/ToolbarTheme.hh | 31 +++++----------------------- 2 files changed, 6 insertions(+), 84 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ToolbarTheme.cc,v 1.6 2003/08/11 16:54:46 fluxgen Exp $ +// $Id: ToolbarTheme.cc,v 1.7 2003/08/13 09:53:46 fluxgen Exp $ #include "ToolbarTheme.hh" @@ -45,29 +45,14 @@ void FbTk::ThemeItem::setFromString(char const *strval) { ToolbarTheme::ToolbarTheme(int screen_num): FbTk::Theme(screen_num), - m_label_textcolor(*this, - "toolbar.label.textColor", "Toolbar.Label.TextColor"), - m_window_textcolor(*this, - "toolbar.windowLabel.textColor", - "Toolbar.WindowLabel.TextColor"), - m_clock_textcolor(*this, - "toolbar.clock.textColor", "Toolbar.Clock.TextColor"), m_button_color(*this, "toolbar.button.picColor", "Toolbar.Button.PicColor"), m_border_color(*this, "toolbar.borderColor", "Toolbar.BorderColor"), m_toolbar(*this, "toolbar", "Toolbar"), - m_iconbar_focused(*this, "toolbar.iconbar.focused", "Toolbar.Iconbar.Focused"), - m_iconbar_unfocused(*this, "toolbar.iconbar.unfocused", "Toolbar.Iconbar.Unfocused"), - m_label(*this, "toolbar.label", "Toolbar.Label"), - m_window(*this, "toolbar.windowLabel", "Toolbar.WindowLabel"), m_button(*this, "toolbar.button", "Toolbar.Button"), m_pressed_button(*this, "toolbar.button.pressed", "Toolbar.Button.Pressed"), - m_clock(*this, "toolbar.clock", "Toolbar.Clock"), - m_font(*this, "toolbar.font", "Toolbar.Font"), - m_icon_font(*this, "toolbar.iconFont", "Toolbar.IconFont"), - m_justify(*this, "toolbar.justify", "Toolbar.Justify"), m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"), m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"), m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"), @@ -80,45 +65,16 @@ ToolbarTheme::ToolbarTheme(int screen_num): XGCValues gcv; unsigned long gc_value_mask = GCForeground; - gcv.foreground = m_label_textcolor->pixel(); - - m_label_text_gc = - XCreateGC(m_display, rootwindow, - gc_value_mask, &gcv); - - gcv.foreground = m_window_textcolor->pixel(); - m_window_text_gc = - XCreateGC(m_display, rootwindow, - gc_value_mask, &gcv); - - gcv.foreground = m_clock_textcolor->pixel(); - m_clock_text_gc = - XCreateGC(m_display, rootwindow, - gc_value_mask, &gcv); gcv.foreground = m_button_color->pixel(); m_button_pic_gc = XCreateGC(m_display, rootwindow, gc_value_mask, &gcv); - gcv.foreground = m_iconbar_focused->color().pixel(); - m_icon_text_focused_gc = - XCreateGC(m_display, rootwindow, - gc_value_mask, &gcv); - - m_icon_text_unfocused_gc = - XCreateGC(m_display, rootwindow, - gc_value_mask, &gcv); - - // load from current database - FbTk::ThemeManager::instance().loadTheme(*this); } ToolbarTheme::~ToolbarTheme() { XFreeGC(m_display, m_button_pic_gc); - XFreeGC(m_display, m_clock_text_gc); - XFreeGC(m_display, m_label_text_gc); - XFreeGC(m_display, m_window_text_gc); } void ToolbarTheme::reconfigTheme() { @@ -130,19 +86,6 @@ void ToolbarTheme::reconfigTheme() { XGCValues gcv; unsigned long gc_value_mask = GCForeground; - - gcv.foreground = m_label_textcolor->pixel(); - XChangeGC(m_display, m_label_text_gc, - gc_value_mask, &gcv); - - gcv.foreground = m_window_textcolor->pixel(); - XChangeGC(m_display, m_window_text_gc, - gc_value_mask, &gcv); - - gcv.foreground = m_clock_textcolor->pixel(); - XChangeGC(m_display, m_clock_text_gc, - gc_value_mask, &gcv); - gcv.foreground = m_button_color->pixel(); XChangeGC(m_display, m_button_pic_gc, gc_value_mask, &gcv); diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh index d356ead..4076732 100644 --- a/src/ToolbarTheme.hh +++ b/src/ToolbarTheme.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ToolbarTheme.hh,v 1.6 2003/08/11 16:54:46 fluxgen Exp $ +// $Id: ToolbarTheme.hh,v 1.7 2003/08/13 09:53:35 fluxgen Exp $ #ifndef TOOLBARTHEME_HH #define TOOLBARTHEME_HH @@ -43,9 +43,6 @@ public: @name colors */ ///@{ - const FbTk::Color &labelTextColor() const { return *m_label_textcolor; } - const FbTk::Color &windowTextColor() const { return *m_window_textcolor; } - const FbTk::Color &clockTextColor() const { return *m_clock_textcolor; } const FbTk::Color &buttonColor() const { return *m_button_color; } const FbTk::Color &borderColor() const { return *m_border_color; } ///@} @@ -54,30 +51,16 @@ public: */ ///@{ const FbTk::Texture &toolbar() const { return *m_toolbar; } - const FbTk::Texture &iconbarFocused() const { return *m_iconbar_focused; } - const FbTk::Texture &iconbarUnfocused() const { return *m_iconbar_unfocused; } - const FbTk::Texture &label() const { return *m_label; } - const FbTk::Texture &window() const { return *m_window; } const FbTk::Texture &button() const { return *m_button; } const FbTk::Texture &pressedButton() const { return *m_pressed_button; } - const FbTk::Texture &clock() const { return *m_clock; } ///@} - const FbTk::Font &font() const { return *m_font; } - FbTk::Font &font() { return *m_font; } - const FbTk::Font &iconFont() const { return *m_icon_font; } - FbTk::Font &iconFont() { return *m_icon_font; } + /** @name graphic context */ ///@{ - GC labelTextGC() const { return m_label_text_gc; } - GC windowTextGC() const { return m_window_text_gc; } - GC clockTextGC() const { return m_clock_text_gc; } GC buttonPicGC() const { return m_button_pic_gc; } - GC iconTextFocusedGC() const { return m_icon_text_focused_gc; } - GC iconTextUnfocusedGC() const { return m_icon_text_unfocused_gc; } ///@} - FbTk::Justify justify() const { return *m_justify; } inline int borderWidth() const { return *m_border_width; } inline int bevelWidth() const { return *m_bevel_width; } @@ -87,21 +70,17 @@ public: private: // text colors - FbTk::ThemeItem m_label_textcolor, m_window_textcolor, m_clock_textcolor; FbTk::ThemeItem m_button_color, m_border_color; // textures - FbTk::ThemeItem m_toolbar, m_iconbar_focused, m_iconbar_unfocused, - m_label, m_window, m_button, m_pressed_button, m_clock; - FbTk::ThemeItem m_font, m_icon_font; - FbTk::ThemeItem m_justify; + FbTk::ThemeItem m_toolbar, m_button, m_pressed_button; FbTk::ThemeItem m_border_width, m_bevel_width, m_button_border_width; FbTk::ThemeItem m_shape; FbTk::ThemeItem m_alpha; // graphic context - GC m_label_text_gc, m_window_text_gc, m_clock_text_gc, m_button_pic_gc; - GC m_icon_text_unfocused_gc, m_icon_text_focused_gc; + GC m_button_pic_gc; + Display *m_display; }; -- cgit v0.11.2