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:
@@ -11,6 +11,7 @@
|
|||||||
* yellowTAB GmbH
|
* yellowTAB GmbH
|
||||||
* Bernd Korz
|
* Bernd Korz
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user