aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MenuTheme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/MenuTheme.cc')
-rw-r--r--src/FbTk/MenuTheme.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index 28bcc35..db54483 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.cc
@@ -48,7 +48,9 @@ MenuTheme::MenuTheme(int screen_num):
48 hilite(*this, "menu.hilite", "Menu.Hilite"), 48 hilite(*this, "menu.hilite", "Menu.Hilite"),
49 titlefont(*this, "menu.title.font", "Menu.Title.Font"), 49 titlefont(*this, "menu.title.font", "Menu.Title.Font"),
50 framefont(*this, "menu.frame.font", "Menu.Frame.Font"), 50 framefont(*this, "menu.frame.font", "Menu.Frame.Font"),
51 hilitefont(*this, "menu.hilite.font", "Menu.Hilite.Font"),
51 framefont_justify(*this, "menu.frame.justify", "Menu.Frame.Justify"), 52 framefont_justify(*this, "menu.frame.justify", "Menu.Frame.Justify"),
53 hilitefont_justify(*this, "menu.hilite.justify", "Menu.Hilite.Justify"),
52 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), 54 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"),
53 bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), 55 bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"),
54 m_bullet(*this, "menu.bullet", "Menu.Bullet"), 56 m_bullet(*this, "menu.bullet", "Menu.Bullet"),
@@ -84,7 +86,9 @@ MenuTheme::MenuTheme(int screen_num):
84 86
85 ThemeManager::instance().loadTheme(*this); 87 ThemeManager::instance().loadTheme(*this);
86 88
87 m_real_item_height = std::max(*m_item_height, frameFont().height() + 2*bevelWidth()); 89 m_real_item_height = std::max(*m_item_height,
90 std::max(frameFont().height() + 2*bevelWidth(),
91 hiliteFont().height() + 2*bevelWidth()));
88 m_real_title_height = std::max(*m_title_height, 92 m_real_title_height = std::max(*m_title_height,
89 titleFont().height() + 2*bevelWidth()); 93 titleFont().height() + 2*bevelWidth());
90 94
@@ -111,7 +115,9 @@ void MenuTheme::reconfigTheme() {
111 if (*m_border_width > 20) 115 if (*m_border_width > 20)
112 *m_border_width = 20; 116 *m_border_width = 20;
113 117
114 m_real_item_height = std::max(*m_item_height, frameFont().height() + 2*bevelWidth()); 118 m_real_item_height = std::max(*m_item_height,
119 std::max(frameFont().height() + 2*bevelWidth(),
120 hiliteFont().height() + 2*bevelWidth()));
115 m_real_title_height = std::max(*m_title_height, 121 m_real_title_height = std::max(*m_title_height,
116 titleFont().height() + 2*bevelWidth()); 122 titleFont().height() + 2*bevelWidth());
117 123
@@ -143,6 +149,10 @@ bool MenuTheme::fallback(ThemeItem_base &item) {
143 return ThemeManager::instance().loadItem(item, "borderColor", "BorderColor"); 149 return ThemeManager::instance().loadItem(item, "borderColor", "BorderColor");
144 } else if (item.name() == "menu.bevelWidth") { 150 } else if (item.name() == "menu.bevelWidth") {
145 return ThemeManager::instance().loadItem(item, "bevelWidth", "BevelWidth"); 151 return ThemeManager::instance().loadItem(item, "bevelWidth", "BevelWidth");
152 } else if (item.name() == "menu.hilite.font") {
153 return ThemeManager::instance().loadItem(item, "menu.frame.font", "Menu.Frame.Font");
154 } else if (item.name() == "menu.hilite.justify") {
155 return ThemeManager::instance().loadItem(item, "menu.frame.justify", "Menu.Frame.Justify");
146 } 156 }
147 157
148 return false; 158 return false;