From 5fcb520bbb891683a8321cebe4d9fbe9d88e5709 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 2 Jul 2007 02:50:09 +0000 Subject: fixed DOS when toolbar.button.borderWidth is large and toolbar.bevelWidth > 0 moved the transparency menu up with the rest of the submenus in the config menu --- ChangeLog | 6 +++++ src/Screen.cc | 71 +++++++++++++++++++++++++++++----------------------------- src/Toolbar.cc | 3 +++ 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 420260c..71ac769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ (Format: Year/Month/Day) Changes for 1.0.0: +*07/07/02: + * Fixed some rendering problems when toolbar item borderwidth is too large + and toolbar bevelwidth is set (Mark) + Toolbar.cc + * Moved the `Transparency' submenu next to the rest of the submenus (Mark) + Screen.cc *07/07/01: * Added keycommands :AddWorkspace and :RemoveLastWorkspace (Mark) WorkspaceCmd.cc/hh FbCommandFactory.cc diff --git a/src/Screen.cc b/src/Screen.cc index 18da436..7648f78 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1805,41 +1805,6 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { menu.insert(tabmenu_label, tab_menu); - Configmenus::iterator it = m_configmenu_list.begin(); - Configmenus::iterator it_end = m_configmenu_list.end(); - for (; it != it_end; ++it) - menu.insert(it->first, it->second); - - _BOOLITEM(menu, Configmenu, ImageDithering, - "Image Dithering", "Image Dithering", - *resource.image_dither, save_and_reconfigure); - _BOOLITEM(menu, Configmenu, OpaqueMove, - "Opaque Window Moving", - "Window Moving with whole window visible (as opposed to outline moving)", - *resource.opaque_move, saverc_cmd); - _BOOLITEM(menu, Configmenu, FullMax, - "Full Maximization", "Maximise over slit, toolbar, etc", - *resource.full_max, saverc_cmd); - try { - _BOOLITEM(menu, Configmenu, FocusNew, - "Focus New Windows", "Focus newly created windows", - *m_resource_manager.getResource(name() + ".focusNewWindows"), - saverc_cmd); - } catch (FbTk::ResourceException e) { - cerr<first, it->second); + + _BOOLITEM(menu, Configmenu, ImageDithering, + "Image Dithering", "Image Dithering", + *resource.image_dither, save_and_reconfigure); + _BOOLITEM(menu, Configmenu, OpaqueMove, + "Opaque Window Moving", + "Window Moving with whole window visible (as opposed to outline moving)", + *resource.opaque_move, saverc_cmd); + _BOOLITEM(menu, Configmenu, FullMax, + "Full Maximization", "Maximise over slit, toolbar, etc", + *resource.full_max, saverc_cmd); + try { + _BOOLITEM(menu, Configmenu, FocusNew, + "Focus New Windows", "Focus newly created windows", + *m_resource_manager.getResource(name() + ".focusNewWindows"), + saverc_cmd); + } catch (FbTk::ResourceException e) { + cerr<hide(); // make sure it still gets told the toolbar height tmpw = 1; tmph = height - 2*(bevel_width+borderW); + if (tmph >= (1<<30)) tmph = 1; FbTk::translateSize(orient, tmpw, tmph); (*item_it)->resize(tmpw, tmph); // width of 0 changes to 1 anyway continue; @@ -1080,6 +1081,8 @@ void Toolbar::rearrangeItems() { tmpw = itemw; tmph = height - size_offset; } + if (tmpw >= (1<<30)) tmpw = 1; + if (tmph >= (1<<30)) tmph = 1; next_x += tmpw + bevel_width; if (bevel_width != 0) next_x += 2*borderW; -- cgit v0.11.2