all repos — fluxbox @ 5aae53172bad9dff1a1d2abb44819bcf81876129

custom fork of the fluxbox windowmanager

new names for theme items, the new names are menu.bevelWidth menu.borderWidth menu.borderColor
fluxgen fluxgen
commit

5aae53172bad9dff1a1d2abb44819bcf81876129

parent

96132f2afef4489f4faa85f24ac807086ed66b12

2 files changed, 20 insertions(+), 5 deletions(-)

jump to
M src/FbTk/MenuTheme.ccsrc/FbTk/MenuTheme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ framefont_justify(*this, "menu.frame.justify", "Menu.Frame.Justify"),

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 @@

// set default values *m_border_width = 0; *m_bevel_width = 0; + *m_border_width = 0; Window rootwindow = RootWindow(m_display, screen_num);

@@ -99,6 +100,18 @@ hilite_gc.setForeground(hilite->color());

// notify any listeners 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; }
M src/FbTk/MenuTheme.hhsrc/FbTk/MenuTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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

@@ -42,6 +42,8 @@ MenuTheme(int screen_num);

virtual ~MenuTheme(); void reconfigTheme(); + + bool fallback(ThemeItem_base &item); /** @name text colors