From 463c7dab18d78973671c7d3aba3c47d62a30cc00 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 13 Jun 2004 12:01:52 +0000 Subject: minor fix --- src/FbTk/Menu.cc | 8 +++++--- src/FbTk/MenuTheme.cc | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 204bede..2a91ee4 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.65 2004/06/13 10:58:34 fluxgen Exp $ +// $Id: Menu.cc,v 1.66 2004/06/13 12:01:52 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -160,7 +160,7 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl): event_mask, // mask false, // override redirect true); // save under - + evm.add(*this, menu.title); event_mask |= PointerMotionMask; @@ -172,6 +172,8 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl): true); // save under evm.add(*this, menu.frame); + menu.title.raise(); + } Menu::~Menu() { @@ -531,7 +533,7 @@ void Menu::update(int active_index) { menu.frame.moveResize(0, ((title_vis) ? menu.title.y() + menu.title.height() + menu.title.borderWidth()*2 : 0), - menu.window.width(), menu.frame_h); + width(), menu.frame_h); if (m_need_update && (m_frame_pm.width() != menu.frame.width() || diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index ebee2e5..18861ab 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.cc,v 1.17 2004/06/13 10:59:54 fluxgen Exp $ +// $Id: MenuTheme.cc,v 1.18 2004/06/13 12:01:15 fluxgen Exp $ #include "MenuTheme.hh" @@ -70,6 +70,9 @@ MenuTheme::MenuTheme(int screen_num): m_real_title_height(*m_title_height), m_real_item_height(*m_item_height) { + 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; @@ -98,6 +101,9 @@ void MenuTheme::reconfigTheme() { 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; + m_bullet_pixmap->scale(itemHeight(), itemHeight()); m_selected_pixmap->scale(itemHeight(), itemHeight()); m_unselected_pixmap->scale(itemHeight(), itemHeight()); -- cgit v0.11.2