From 5aae53172bad9dff1a1d2abb44819bcf81876129 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 12 Sep 2003 23:32:02 +0000 Subject: new names for theme items, the new names are menu.bevelWidth menu.borderWidth menu.borderColor --- src/FbTk/MenuTheme.cc | 21 +++++++++++++++++---- 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.cc,v 1.10 2003/08/27 14:12:45 fluxgen Exp $ +// $Id: MenuTheme.cc,v 1.11 2003/09/12 23:32:02 fluxgen Exp $ #include "MenuTheme.hh" @@ -48,9 +48,9 @@ MenuTheme::MenuTheme(int screen_num): titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), m_bullet(*this, "menu.bullet", "Menu.Bullet"), - m_border_width(*this, "borderWidth", "BorderWidth"), - m_bevel_width(*this, "bevelWidth", "BevelWidth"), - m_border_color(*this, "borderColor", "BorderColor"), + m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), + m_bevel_width(*this, "menu.bevelWidth", "Menu.BevelWidth"), + m_border_color(*this, "menu.borderColor", "Menu.BorderColor"), m_bullet_pixmap(*this, "menu.submenu.pixmap", "Menu.Submenu.Pixmap"), m_selected_pixmap(*this, "menu.selected.pixmap", "Menu.Selected.Pixmap"), m_unselected_pixmap(*this, "menu.unselected.pixmap", "Menu.Unselected.Pixmap"), @@ -65,6 +65,7 @@ MenuTheme::MenuTheme(int screen_num): // set default values *m_border_width = 0; *m_bevel_width = 0; + *m_border_width = 0; Window rootwindow = RootWindow(m_display, screen_num); @@ -101,6 +102,18 @@ void MenuTheme::reconfigTheme() { m_theme_change_sig.notify(); } +bool MenuTheme::fallback(ThemeItem_base &item) { + if (item.name() == "menu.borderWidth") { + return ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth"); + } else if (item.name() == "menu.borderColor") { + return ThemeManager::instance().loadItem(item, "borderColor", "BorderColor"); + } else if (item.name() == "menu.bevelWidth") { + return ThemeManager::instance().loadItem(item, "bevelWidth", "BevelWidth"); + } + + return false; +} + template <> void ThemeItem::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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.hh,v 1.8 2003/08/27 14:07:16 fluxgen Exp $ +// $Id: MenuTheme.hh,v 1.9 2003/09/12 23:32:02 fluxgen Exp $ #ifndef FBTK_MENUTHEME_HH #define FBTK_MENUTHEME_HH @@ -43,6 +43,8 @@ public: void reconfigTheme(); + bool fallback(ThemeItem_base &item); + /** @name text colors */ -- cgit v0.11.2