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
This commit is contained in:
markt 2007-07-02 02:50:09 +00:00
parent 69d63da542
commit 5fcb520bbb
3 changed files with 45 additions and 35 deletions

View file

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

View file

@ -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<bool>(name() + ".focusNewWindows"),
saverc_cmd);
} catch (FbTk::ResourceException e) {
cerr<<e.what()<<endl;
}
_BOOLITEM(menu, Configmenu, WorkspaceWarping,
"Workspace Warping",
"Workspace Warping - dragging windows to the edge and onto the next workspace",
*resource.workspace_warping, saverc_cmd);
_BOOLITEM(menu, Configmenu, DecorateTransient,
"Decorate Transient Windows", "Decorate Transient Windows",
*resource.decorate_transient, saverc_cmd);
_BOOLITEM(menu, Configmenu, ClickRaises,
"Click Raises", "Click Raises",
*resource.click_raises, saverc_cmd);
#ifdef HAVE_XRENDER
if (FbTk::Transparent::haveRender() ||
FbTk::Transparent::haveComposite()) {
@ -1890,6 +1855,42 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
menu.insert(alphamenu_label, alpha_menu);
}
#endif // HAVE_XRENDER
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<bool>(name() + ".focusNewWindows"),
saverc_cmd);
} catch (FbTk::ResourceException e) {
cerr<<e.what()<<endl;
}
_BOOLITEM(menu, Configmenu, WorkspaceWarping,
"Workspace Warping",
"Workspace Warping - dragging windows to the edge and onto the next workspace",
*resource.workspace_warping, saverc_cmd);
_BOOLITEM(menu, Configmenu, DecorateTransient,
"Decorate Transient Windows", "Decorate Transient Windows",
*resource.decorate_transient, saverc_cmd);
_BOOLITEM(menu, Configmenu, ClickRaises,
"Click Raises", "Click Raises",
*resource.click_raises, saverc_cmd);
#undef _BOOLITEM
// finaly update menu

View file

@ -1044,6 +1044,7 @@ void Toolbar::rearrangeItems() {
(*item_it)->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;