From 54eda44f852e69d52e86133891be55abac479887 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Thu, 20 Dec 2007 18:25:50 -0800 Subject: fix menuitem height on startup --- src/FbTk/MenuTheme.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index 3502bb1..18e51aa 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc @@ -79,13 +79,6 @@ MenuTheme::MenuTheme(int screen_num): m_real_title_height(*m_title_height), m_real_item_height(*m_item_height) { - m_real_item_height = std::max(*m_item_height, frameFont().height() + 2*bevelWidth()); - m_real_title_height = std::max(*m_title_height, - titleFont().height() + 2*bevelWidth()); - - m_real_item_height = m_real_item_height == 0 ? 1 : m_real_item_height; - m_real_title_height = m_real_title_height == 0 ? 1 : m_real_title_height; - // set default values *m_border_width = 0; *m_bevel_width = 0; @@ -93,6 +86,13 @@ MenuTheme::MenuTheme(int screen_num): ThemeManager::instance().loadTheme(*this); + m_real_item_height = std::max(*m_item_height, frameFont().height() + 2*bevelWidth()); + m_real_title_height = std::max(*m_title_height, + titleFont().height() + 2*bevelWidth()); + + m_real_item_height = m_real_item_height == 0 ? 1 : m_real_item_height; + m_real_title_height = m_real_title_height == 0 ? 1 : m_real_title_height; + t_text_gc.setForeground(*t_text); f_text_gc.setForeground(*f_text); u_text_gc.setForeground(*u_text); -- cgit v0.11.2