all repos — fluxbox @ 1222e964167e6b0ebd186e58e2084f95bc4bc75e

custom fork of the fluxbox windowmanager

removed old theme items
fluxgen fluxgen
commit

1222e964167e6b0ebd186e58e2084f95bc4bc75e

parent

044165d1e7912030159393e69a5b446e52578d21

2 files changed, 6 insertions(+), 84 deletions(-)

jump to
M src/ToolbarTheme.ccsrc/ToolbarTheme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ }

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 @@

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() {

@@ -129,19 +85,6 @@ *m_alpha = 0;

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,
M src/ToolbarTheme.hhsrc/ToolbarTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ /**

@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 @@ @name textures

*/ ///@{ 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 @@ inline unsigned char alpha() const { return *m_alpha; }

private: // text colors - FbTk::ThemeItem<FbTk::Color> m_label_textcolor, m_window_textcolor, m_clock_textcolor; FbTk::ThemeItem<FbTk::Color> m_button_color, m_border_color; // textures - FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_iconbar_focused, m_iconbar_unfocused, - m_label, m_window, m_button, m_pressed_button, m_clock; - FbTk::ThemeItem<FbTk::Font> m_font, m_icon_font; - FbTk::ThemeItem<FbTk::Justify> m_justify; + FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_button, m_pressed_button; FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_button_border_width; FbTk::ThemeItem<bool> m_shape; FbTk::ThemeItem<int> 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; };