diff options
-rw-r--r-- | src/FbTk/MenuTheme.cc | 21 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 4 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index 2ecb38b..6159138 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: MenuTheme.cc,v 1.10 2003/08/27 14:12:45 fluxgen Exp $ | 22 | // $Id: MenuTheme.cc,v 1.11 2003/09/12 23:32:02 fluxgen Exp $ |
23 | 23 | ||
24 | #include "MenuTheme.hh" | 24 | #include "MenuTheme.hh" |
25 | 25 | ||
@@ -48,9 +48,9 @@ MenuTheme::MenuTheme(int screen_num): | |||
48 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), | 48 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), |
49 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), | 49 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), |
50 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), | 50 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), |
51 | m_border_width(*this, "borderWidth", "BorderWidth"), | 51 | m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), |
52 | m_bevel_width(*this, "bevelWidth", "BevelWidth"), | 52 | m_bevel_width(*this, "menu.bevelWidth", "Menu.BevelWidth"), |
53 | m_border_color(*this, "borderColor", "BorderColor"), | 53 | m_border_color(*this, "menu.borderColor", "Menu.BorderColor"), |
54 | m_bullet_pixmap(*this, "menu.submenu.pixmap", "Menu.Submenu.Pixmap"), | 54 | m_bullet_pixmap(*this, "menu.submenu.pixmap", "Menu.Submenu.Pixmap"), |
55 | m_selected_pixmap(*this, "menu.selected.pixmap", "Menu.Selected.Pixmap"), | 55 | m_selected_pixmap(*this, "menu.selected.pixmap", "Menu.Selected.Pixmap"), |
56 | m_unselected_pixmap(*this, "menu.unselected.pixmap", "Menu.Unselected.Pixmap"), | 56 | m_unselected_pixmap(*this, "menu.unselected.pixmap", "Menu.Unselected.Pixmap"), |
@@ -65,6 +65,7 @@ MenuTheme::MenuTheme(int screen_num): | |||
65 | // set default values | 65 | // set default values |
66 | *m_border_width = 0; | 66 | *m_border_width = 0; |
67 | *m_bevel_width = 0; | 67 | *m_bevel_width = 0; |
68 | *m_border_width = 0; | ||
68 | 69 | ||
69 | Window rootwindow = RootWindow(m_display, screen_num); | 70 | Window rootwindow = RootWindow(m_display, screen_num); |
70 | 71 | ||
@@ -101,6 +102,18 @@ void MenuTheme::reconfigTheme() { | |||
101 | m_theme_change_sig.notify(); | 102 | m_theme_change_sig.notify(); |
102 | } | 103 | } |
103 | 104 | ||
105 | bool MenuTheme::fallback(ThemeItem_base &item) { | ||
106 | if (item.name() == "menu.borderWidth") { | ||
107 | return ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth"); | ||
108 | } else if (item.name() == "menu.borderColor") { | ||
109 | return ThemeManager::instance().loadItem(item, "borderColor", "BorderColor"); | ||
110 | } else if (item.name() == "menu.bevelWidth") { | ||
111 | return ThemeManager::instance().loadItem(item, "bevelWidth", "BevelWidth"); | ||
112 | } | ||
113 | |||
114 | return false; | ||
115 | } | ||
116 | |||
104 | 117 | ||
105 | template <> | 118 | template <> |
106 | void ThemeItem<MenuTheme::BulletType>::setDefaultValue() { | 119 | void ThemeItem<MenuTheme::BulletType>::setDefaultValue() { |
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index 7b1cca6..e81a2f2 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: MenuTheme.hh,v 1.8 2003/08/27 14:07:16 fluxgen Exp $ | 22 | // $Id: MenuTheme.hh,v 1.9 2003/09/12 23:32:02 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_MENUTHEME_HH | 24 | #ifndef FBTK_MENUTHEME_HH |
25 | #define FBTK_MENUTHEME_HH | 25 | #define FBTK_MENUTHEME_HH |
@@ -43,6 +43,8 @@ public: | |||
43 | 43 | ||
44 | void reconfigTheme(); | 44 | void reconfigTheme(); |
45 | 45 | ||
46 | bool fallback(ThemeItem_base &item); | ||
47 | |||
46 | /** | 48 | /** |
47 | @name text colors | 49 | @name text colors |
48 | */ | 50 | */ |