aboutsummaryrefslogtreecommitdiff
path: root/src/ButtonTheme.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-13 23:41:07 (GMT)
committerfluxgen <fluxgen>2003-10-13 23:41:07 (GMT)
commit9911b38f8df93871542e3a7cdd5611e42e9bd106 (patch)
tree321b831e3bf697f36ad921d032198a4c77a986f1 /src/ButtonTheme.cc
parentec1049e89458f67c040bff905e1df862ae1587d7 (diff)
downloadfluxbox-9911b38f8df93871542e3a7cdd5611e42e9bd106.zip
fluxbox-9911b38f8df93871542e3a7cdd5611e42e9bd106.tar.bz2
extends tooltheme with picColor and pressed texture for toolbar buttons
Diffstat (limited to 'src/ButtonTheme.cc')
-rw-r--r--src/ButtonTheme.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/ButtonTheme.cc b/src/ButtonTheme.cc
new file mode 100644
index 0000000..225bbb7
--- /dev/null
+++ b/src/ButtonTheme.cc
@@ -0,0 +1,33 @@
1#include "ButtonTheme.hh"
2#include "FbTk/App.hh"
3
4//!! TODO: still missing *.pressed.picColor
5ButtonTheme::ButtonTheme(int screen_num,
6 const std::string &name,
7 const std::string &alt_name):
8 ToolTheme(screen_num, name, alt_name),
9 m_pic_color(*this, name + ".picColor", alt_name + ".PicColor"),
10 m_pressed_texture(*this, name + ".pressed", alt_name + ".Pressed"),
11 m_gc(RootWindow(FbTk::App::instance()->display(), screen_num)) {
12
13}
14
15bool ButtonTheme::fallback(FbTk::ThemeItem_base &item) {
16
17 if (item.name().find(".borderWidth") != std::string::npos) {
18 return FbTk::ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth");
19 }
20
21 if (item.name().find(".borderColor") != std::string::npos) {
22 return FbTk::ThemeManager::instance().loadItem(item, "borderColor", "BorderColor");
23 }
24
25 return ToolTheme::fallback(item);
26}
27
28void ButtonTheme::reconfigTheme() {
29 m_gc.setForeground(*m_pic_color);
30}
31
32
33