Compute window size limits at least with the minimum menu bar

and tool bar width taken into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41199 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2011-04-08 12:21:53 +00:00
parent 65b917918b
commit 9b13c4181c
1 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@
* yellowTAB GmbH
* Bernd Korz
* Axel Dörfler, axeld@pinc-software.de
* Stephan Aßmus <superstippi@gmx.de>
*/
@ -236,7 +237,13 @@ ShowImageWindow::ShowImageWindow(BRect frame, const entry_ref& ref,
0, 150, B_VERTICAL);
AddChild(fVerticalScrollBar);
SetSizeLimits(250, 100000, 100, 100000);
// Update minimum window size
float menuBarMinWidth;
fBar->GetPreferredSize(&menuBarMinWidth, NULL);
float toolBarMinWidth;
fToolBarView->GetPreferredSize(&toolBarMinWidth, NULL);
SetSizeLimits(std::max(menuBarMinWidth, toolBarMinWidth), 100000, 100,
100000);
// finish creating the window
if (_LoadImage() != B_OK) {