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:
parent
65b917918b
commit
9b13c4181c
|
@ -11,6 +11,7 @@
|
||||||
* yellowTAB GmbH
|
* yellowTAB GmbH
|
||||||
* Bernd Korz
|
* Bernd Korz
|
||||||
* Axel Dörfler, axeld@pinc-software.de
|
* 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);
|
0, 150, B_VERTICAL);
|
||||||
AddChild(fVerticalScrollBar);
|
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
|
// finish creating the window
|
||||||
if (_LoadImage() != B_OK) {
|
if (_LoadImage() != B_OK) {
|
||||||
|
|
Loading…
Reference in New Issue