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.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index 95d15d1..fa0977a 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.cc
@@ -1,5 +1,5 @@
1// MenuTheme.cc for FbTk 1// MenuTheme.cc for FbTk
2// Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2002-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -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.15 2004/04/26 15:04:37 rathnor Exp $ 22// $Id: MenuTheme.cc,v 1.16 2004/06/07 21:02:49 fluxgen Exp $
23 23
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25 25
@@ -30,6 +30,7 @@
30#include "StringUtil.hh" 30#include "StringUtil.hh"
31 31
32#include <cstdio> 32#include <cstdio>
33#include <algorithm>
33 34
34namespace FbTk { 35namespace FbTk {
35 36
@@ -48,6 +49,8 @@ MenuTheme::MenuTheme(int screen_num):
48 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), 49 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"),
49 bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), 50 bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"),
50 m_bullet(*this, "menu.bullet", "Menu.Bullet"), 51 m_bullet(*this, "menu.bullet", "Menu.Bullet"),
52 m_title_height(*this, "menu.titleHeight", "Menu.TitleHeight"),
53 m_item_height(*this, "menu.itemHeight", "Menu.ItemHeight"),
51 m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), 54 m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"),
52 m_bevel_width(*this, "menu.bevelWidth", "Menu.BevelWidth"), 55 m_bevel_width(*this, "menu.bevelWidth", "Menu.BevelWidth"),
53 m_border_color(*this, "menu.borderColor", "Menu.BorderColor"), 56 m_border_color(*this, "menu.borderColor", "Menu.BorderColor"),
@@ -90,9 +93,11 @@ void MenuTheme::reconfigTheme() {
90 if (*m_border_width > 20) 93 if (*m_border_width > 20)
91 *m_border_width = 20; 94 *m_border_width = 20;
92 95
93 m_bullet_pixmap->scale(frameFont().height(), frameFont().height()); 96 int item_height = std::max(itemHeight(), frameFont().height() + bevelWidth());
94 m_selected_pixmap->scale(frameFont().height(), frameFont().height()); 97
95 m_unselected_pixmap->scale(frameFont().height(), frameFont().height()); 98 m_bullet_pixmap->scale(item_height, item_height);
99 m_selected_pixmap->scale(item_height, item_height);
100 m_unselected_pixmap->scale(item_height, item_height);
96 101
97 t_text_gc.setForeground(*t_text); 102 t_text_gc.setForeground(*t_text);
98 f_text_gc.setForeground(*f_text); 103 f_text_gc.setForeground(*f_text);