summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/IconbarTheme.cc38
1 files changed, 28 insertions, 10 deletions
diff --git a/src/IconbarTheme.cc b/src/IconbarTheme.cc
index ed320e4..1c84a78 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.5 2003/08/19 21:26:45 fluxgen Exp $ 23// $Id: IconbarTheme.cc,v 1.6 2003/08/28 23:51:26 fluxgen Exp $
24 24
25#include "IconbarTheme.hh" 25#include "IconbarTheme.hh"
26#include "FbTk/App.hh" 26#include "FbTk/App.hh"
@@ -62,12 +62,21 @@ bool IconbarTheme::fallback(FbTk::ThemeItem_base &item) {
62 using namespace FbTk; 62 using namespace FbTk;
63 ThemeManager &tm = ThemeManager::instance(); 63 ThemeManager &tm = ThemeManager::instance();
64 64
65 if (&m_focused_texture == &item) 65 if (&m_focused_texture == &item) {
66 return tm.loadItem(item, "window.title.focus", "Window.Title.Focus"); 66 // special case for textures since they're using .load()
67 else if (&m_unfocused_texture == &item) { 67 FbTk::ThemeItem<FbTk::Texture> tmp_item(m_focused_texture.theme(),
68 return (tm.loadItem(item, m_focused_texture.name(), m_focused_texture.altName()) ? 68 "window.label.focus", "Window.Title.Focus");
69 true : 69 tmp_item.load();
70 tm.loadItem(item, "window.title.unfocus", "Window.Title.Unfocus")); 70 // copy texture
71 *m_focused_texture = *tmp_item;
72 } else if (&m_unfocused_texture == &item) {
73 // special case for textures since they're using .load()
74 FbTk::ThemeItem<FbTk::Texture> tmp_item(m_unfocused_texture.theme(),
75 "window.label.unfocus", "Window.Label.Unfocus");
76 tmp_item.load();
77 // copy texture
78 *m_unfocused_texture = *tmp_item;
79
71 } else if (&m_empty_texture == &item) { 80 } else if (&m_empty_texture == &item) {
72 return (tm.loadItem(item, m_focused_texture.name(), m_focused_texture.altName()) ? 81 return (tm.loadItem(item, m_focused_texture.name(), m_focused_texture.altName()) ?
73 true : 82 true :
@@ -75,18 +84,27 @@ bool IconbarTheme::fallback(FbTk::ThemeItem_base &item) {
75 } else if (item.name() == m_name + ".borderWidth" || 84 } else if (item.name() == m_name + ".borderWidth" ||
76 item.name() == m_name + ".focused.borderWidth" || 85 item.name() == m_name + ".focused.borderWidth" ||
77 item.name() == m_name + ".unfocused.borderWidth") 86 item.name() == m_name + ".unfocused.borderWidth")
87
78 return tm.loadItem(item, "borderWidth", "BorderWidth"); 88 return tm.loadItem(item, "borderWidth", "BorderWidth");
89
79 else if (item.name() == m_name + ".borderColor" || 90 else if (item.name() == m_name + ".borderColor" ||
80 item.name() == m_name + ".focused.borderColor" || 91 item.name() == m_name + ".focused.borderColor" ||
81 item.name() == m_name + ".unfocused.borderColor") 92 item.name() == m_name + ".unfocused.borderColor")
93
82 return tm.loadItem(item, "borderColor", "BorderColor"); 94 return tm.loadItem(item, "borderColor", "BorderColor");
95
83 else if (item.name() == m_name + ".focused.font" || 96 else if (item.name() == m_name + ".focused.font" ||
84 item.name() == m_name + ".unfocused.font") 97 item.name() == m_name + ".unfocused.font")
98
85 return tm.loadItem(item, "window.font", "Window.Font"); 99 return tm.loadItem(item, "window.font", "Window.Font");
86 else if (item.name() == m_name + ".focused.textColor") 100
87 return tm.loadItem(item, "window.label.focus.textColor", "Window.Label.Focus.TextColor"); 101 else if (item.name() == m_name + ".focused.textColor") {
88 else if (item.name() == m_name + ".unfocused.textColor") 102
103 return tm.loadItem(item, "window.label.focus.textColor", "Window.Label.Focus.TextColor");
104
105 } else if (item.name() == m_name + ".unfocused.textColor")
89 return tm.loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"); 106 return tm.loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor");
90 107
108
91 return false; 109 return false;
92} 110}