diff options
author | fluxgen <fluxgen> | 2003-08-19 21:26:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-19 21:26:45 (GMT) |
commit | be89656dea556f9d62d855180b34f42dd10c28d8 (patch) | |
tree | 1c6079d465a9d5641dd318e955af7514d370006d /src/IconbarTheme.cc | |
parent | 46ea237c383b6d305dfbea77c6bff54c7b73c2b3 (diff) | |
download | fluxbox-be89656dea556f9d62d855180b34f42dd10c28d8.zip fluxbox-be89656dea556f9d62d855180b34f42dd10c28d8.tar.bz2 |
fixed fallback items
Diffstat (limited to 'src/IconbarTheme.cc')
-rw-r--r-- | src/IconbarTheme.cc | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/IconbarTheme.cc b/src/IconbarTheme.cc index 2689083..ed320e4 100644 --- a/src/IconbarTheme.cc +++ b/src/IconbarTheme.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: IconbarTheme.cc,v 1.4 2003/08/13 10:03:06 fluxgen Exp $ | 23 | // $Id: IconbarTheme.cc,v 1.5 2003/08/19 21:26:45 fluxgen Exp $ |
24 | 24 | ||
25 | #include "IconbarTheme.hh" | 25 | #include "IconbarTheme.hh" |
26 | #include "FbTk/App.hh" | 26 | #include "FbTk/App.hh" |
@@ -36,7 +36,8 @@ IconbarTheme::IconbarTheme(int screen_num, | |||
36 | m_unfocused_border(*this, name + ".unfocused", altname + ".Unfocused"), | 36 | m_unfocused_border(*this, name + ".unfocused", altname + ".Unfocused"), |
37 | m_border(*this, name, altname), | 37 | m_border(*this, name, altname), |
38 | m_focused_text(*this, name + ".focused", altname + ".Focused"), | 38 | m_focused_text(*this, name + ".focused", altname + ".Focused"), |
39 | m_unfocused_text(*this, name + ".unfocused", altname + ".Unfocused") { | 39 | m_unfocused_text(*this, name + ".unfocused", altname + ".Unfocused"), |
40 | m_name(name) { | ||
40 | 41 | ||
41 | FbTk::ThemeManager::instance().loadTheme(*this); | 42 | FbTk::ThemeManager::instance().loadTheme(*this); |
42 | 43 | ||
@@ -56,3 +57,36 @@ void IconbarTheme::setAntialias(bool value) { | |||
56 | m_unfocused_text.setAntialias(value); | 57 | m_unfocused_text.setAntialias(value); |
57 | } | 58 | } |
58 | 59 | ||
60 | // fallback resources | ||
61 | bool IconbarTheme::fallback(FbTk::ThemeItem_base &item) { | ||
62 | using namespace FbTk; | ||
63 | ThemeManager &tm = ThemeManager::instance(); | ||
64 | |||
65 | if (&m_focused_texture == &item) | ||
66 | return tm.loadItem(item, "window.title.focus", "Window.Title.Focus"); | ||
67 | else if (&m_unfocused_texture == &item) { | ||
68 | return (tm.loadItem(item, m_focused_texture.name(), m_focused_texture.altName()) ? | ||
69 | true : | ||
70 | tm.loadItem(item, "window.title.unfocus", "Window.Title.Unfocus")); | ||
71 | } else if (&m_empty_texture == &item) { | ||
72 | return (tm.loadItem(item, m_focused_texture.name(), m_focused_texture.altName()) ? | ||
73 | true : | ||
74 | tm.loadItem(item, "toolbar.windowLabel", "toolbar.windowLabel")); | ||
75 | } else if (item.name() == m_name + ".borderWidth" || | ||
76 | item.name() == m_name + ".focused.borderWidth" || | ||
77 | item.name() == m_name + ".unfocused.borderWidth") | ||
78 | return tm.loadItem(item, "borderWidth", "BorderWidth"); | ||
79 | else if (item.name() == m_name + ".borderColor" || | ||
80 | item.name() == m_name + ".focused.borderColor" || | ||
81 | item.name() == m_name + ".unfocused.borderColor") | ||
82 | return tm.loadItem(item, "borderColor", "BorderColor"); | ||
83 | else if (item.name() == m_name + ".focused.font" || | ||
84 | item.name() == m_name + ".unfocused.font") | ||
85 | return tm.loadItem(item, "window.font", "Window.Font"); | ||
86 | else if (item.name() == m_name + ".focused.textColor") | ||
87 | return tm.loadItem(item, "window.label.focus.textColor", "Window.Label.Focus.TextColor"); | ||
88 | else if (item.name() == m_name + ".unfocused.textColor") | ||
89 | return tm.loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"); | ||
90 | |||
91 | return false; | ||
92 | } | ||