WIP do not compile - split toolbar into two vertical toolbars

This commit is contained in:
pelya
2014-06-01 13:45:45 +03:00
parent 7dd42939ae
commit 9f780643ed
6 changed files with 114 additions and 38 deletions
+5 -1
View File
@@ -1594,7 +1594,11 @@ static Point GetAutoPlacePosition(int width, int height)
/* First attempt, try top-left of the screen */
const Window *main_toolbar = FindWindowByClass(WC_MAIN_TOOLBAR);
if (IsGoodAutoPlace1(0, main_toolbar != NULL ? main_toolbar->height : 0, width, height, pt)) return pt;
if (_settings_client.gui.vertical_toolbar) {
if (IsGoodAutoPlace1(main_toolbar != NULL ? main_toolbar->width : 0, 0, width, height, pt)) return pt;
} else {
if (IsGoodAutoPlace1(0, main_toolbar != NULL ? main_toolbar->height : 0, width, height, pt)) return pt;
}
/* Second attempt, try around all existing windows with a distance of 2 pixels.
* The new window must be entirely on-screen, and not overlap with an existing window.