minor fix

This commit is contained in:
fluxgen 2004-06-13 12:01:52 +00:00
parent 2475b2debc
commit 463c7dab18
2 changed files with 12 additions and 4 deletions

View file

@ -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
@ -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() ||

View file

@ -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());