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.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index fa0977a..ebee2e5 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.16 2004/06/07 21:02:49 fluxgen Exp $ 22// $Id: MenuTheme.cc,v 1.17 2004/06/13 10:59:54 fluxgen Exp $
23 23
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25 25
@@ -66,9 +66,10 @@ MenuTheme::MenuTheme(int screen_num):
66 m_alpha(255), 66 m_alpha(255),
67 m_menumode(DELAY_OPEN), 67 m_menumode(DELAY_OPEN),
68 m_delayopen(0), // no delay as default 68 m_delayopen(0), // no delay as default
69 m_delayclose(0) // no delay as default 69 m_delayclose(0), // no delay as default
70 m_real_title_height(*m_title_height),
71 m_real_item_height(*m_item_height)
70{ 72{
71
72 // set default values 73 // set default values
73 *m_border_width = 0; 74 *m_border_width = 0;
74 *m_bevel_width = 0; 75 *m_bevel_width = 0;
@@ -93,11 +94,13 @@ void MenuTheme::reconfigTheme() {
93 if (*m_border_width > 20) 94 if (*m_border_width > 20)
94 *m_border_width = 20; 95 *m_border_width = 20;
95 96
96 int item_height = std::max(itemHeight(), frameFont().height() + bevelWidth()); 97 m_real_item_height = std::max(*m_item_height, frameFont().height() + 2*bevelWidth());
98 m_real_title_height = std::max(*m_title_height,
99 titleFont().height() + 2*bevelWidth());
97 100
98 m_bullet_pixmap->scale(item_height, item_height); 101 m_bullet_pixmap->scale(itemHeight(), itemHeight());
99 m_selected_pixmap->scale(item_height, item_height); 102 m_selected_pixmap->scale(itemHeight(), itemHeight());
100 m_unselected_pixmap->scale(item_height, item_height); 103 m_unselected_pixmap->scale(itemHeight(), itemHeight());
101 104
102 t_text_gc.setForeground(*t_text); 105 t_text_gc.setForeground(*t_text);
103 f_text_gc.setForeground(*f_text); 106 f_text_gc.setForeground(*f_text);