removed old theme items
This commit is contained in:
parent
044165d1e7
commit
1222e96416
2 changed files with 6 additions and 84 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "ToolbarTheme.hh"
|
||||||
|
|
||||||
|
@ -45,29 +45,14 @@ void FbTk::ThemeItem<bool>::setFromString(char const *strval) {
|
||||||
|
|
||||||
ToolbarTheme::ToolbarTheme(int screen_num):
|
ToolbarTheme::ToolbarTheme(int screen_num):
|
||||||
FbTk::Theme(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,
|
m_button_color(*this,
|
||||||
"toolbar.button.picColor", "Toolbar.Button.PicColor"),
|
"toolbar.button.picColor", "Toolbar.Button.PicColor"),
|
||||||
m_border_color(*this,
|
m_border_color(*this,
|
||||||
"toolbar.borderColor", "Toolbar.BorderColor"),
|
"toolbar.borderColor", "Toolbar.BorderColor"),
|
||||||
m_toolbar(*this, "toolbar", "Toolbar"),
|
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_button(*this, "toolbar.button", "Toolbar.Button"),
|
||||||
m_pressed_button(*this,
|
m_pressed_button(*this,
|
||||||
"toolbar.button.pressed", "Toolbar.Button.Pressed"),
|
"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_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"),
|
||||||
m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
|
m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
|
||||||
m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"),
|
m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"),
|
||||||
|
@ -80,45 +65,16 @@ ToolbarTheme::ToolbarTheme(int screen_num):
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
unsigned long gc_value_mask = GCForeground;
|
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();
|
gcv.foreground = m_button_color->pixel();
|
||||||
m_button_pic_gc =
|
m_button_pic_gc =
|
||||||
XCreateGC(m_display, rootwindow,
|
XCreateGC(m_display, rootwindow,
|
||||||
gc_value_mask, &gcv);
|
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() {
|
ToolbarTheme::~ToolbarTheme() {
|
||||||
XFreeGC(m_display, m_button_pic_gc);
|
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() {
|
void ToolbarTheme::reconfigTheme() {
|
||||||
|
@ -130,19 +86,6 @@ void ToolbarTheme::reconfigTheme() {
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
unsigned long gc_value_mask = GCForeground;
|
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();
|
gcv.foreground = m_button_color->pixel();
|
||||||
XChangeGC(m_display, m_button_pic_gc,
|
XChangeGC(m_display, m_button_pic_gc,
|
||||||
gc_value_mask, &gcv);
|
gc_value_mask, &gcv);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
#ifndef TOOLBARTHEME_HH
|
||||||
#define TOOLBARTHEME_HH
|
#define TOOLBARTHEME_HH
|
||||||
|
@ -43,9 +43,6 @@ public:
|
||||||
@name colors
|
@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 &buttonColor() const { return *m_button_color; }
|
||||||
const FbTk::Color &borderColor() const { return *m_border_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 &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 &button() const { return *m_button; }
|
||||||
const FbTk::Texture &pressedButton() const { return *m_pressed_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
|
@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 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 borderWidth() const { return *m_border_width; }
|
||||||
inline int bevelWidth() const { return *m_bevel_width; }
|
inline int bevelWidth() const { return *m_bevel_width; }
|
||||||
|
@ -87,21 +70,17 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// text colors
|
// 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;
|
FbTk::ThemeItem<FbTk::Color> m_button_color, m_border_color;
|
||||||
// textures
|
// textures
|
||||||
FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_iconbar_focused, m_iconbar_unfocused,
|
FbTk::ThemeItem<FbTk::Texture> m_toolbar, m_button, m_pressed_button;
|
||||||
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<int> m_border_width, m_bevel_width, m_button_border_width;
|
FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_button_border_width;
|
||||||
FbTk::ThemeItem<bool> m_shape;
|
FbTk::ThemeItem<bool> m_shape;
|
||||||
FbTk::ThemeItem<int> m_alpha;
|
FbTk::ThemeItem<int> m_alpha;
|
||||||
|
|
||||||
// graphic context
|
// graphic context
|
||||||
GC m_label_text_gc, m_window_text_gc, m_clock_text_gc, m_button_pic_gc;
|
GC m_button_pic_gc;
|
||||||
GC m_icon_text_unfocused_gc, m_icon_text_focused_gc;
|
|
||||||
Display *m_display;
|
Display *m_display;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue