* Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function. +alpha in case Ingo gives his okay :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41782 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2009, Haiku, Inc. All rights reserved.
|
* Copyright 2001-2011, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _WINDOW_H
|
#ifndef _WINDOW_H
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <StorageDefs.h>
|
#include <StorageDefs.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
|
|
||||||
class BButton;
|
class BButton;
|
||||||
class BMenuBar;
|
class BMenuBar;
|
||||||
class BMenuItem;
|
class BMenuItem;
|
||||||
@@ -260,6 +261,7 @@ public:
|
|||||||
BLayout* GetLayout() const;
|
BLayout* GetLayout() const;
|
||||||
|
|
||||||
void InvalidateLayout(bool descendants = false);
|
void InvalidateLayout(bool descendants = false);
|
||||||
|
void Layout(bool force);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// FBC padding and forbidden methods
|
// FBC padding and forbidden methods
|
||||||
@@ -394,4 +396,5 @@ private:
|
|||||||
uint32 _reserved[9];
|
uint32 _reserved[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // _WINDOW_H
|
#endif // _WINDOW_H
|
||||||
|
|||||||
@@ -1295,9 +1295,9 @@ ShowImageWindow::_ToggleFullScreen()
|
|||||||
fImageView->SetHideIdlingCursor(fFullScreen);
|
fImageView->SetHideIdlingCursor(fFullScreen);
|
||||||
fImageView->SetShowCaption(fFullScreen && fShowCaption);
|
fImageView->SetShowCaption(fFullScreen && fShowCaption);
|
||||||
|
|
||||||
GetLayout()->Relayout(true);
|
Layout(false);
|
||||||
// We need to manually relayout here, as the views would be relayouted
|
// We need to manually relayout here, as the views are layouted
|
||||||
// later, and FitToBounds() would still have the wrong size
|
// asynchronously, and FitToBounds() would still have the wrong size
|
||||||
fImageView->FitToBounds();
|
fImageView->FitToBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2010, Haiku.
|
* Copyright 2001-2011, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -1445,11 +1445,7 @@ FrameMoved(origin);
|
|||||||
|
|
||||||
case B_LAYOUT_WINDOW:
|
case B_LAYOUT_WINDOW:
|
||||||
{
|
{
|
||||||
UpdateSizeLimits();
|
Layout(false);
|
||||||
|
|
||||||
// do the actual layout
|
|
||||||
fTopView->Layout(false);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2632,6 +2628,16 @@ BWindow::InvalidateLayout(bool descendants)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BWindow::Layout(bool force)
|
||||||
|
{
|
||||||
|
UpdateSizeLimits();
|
||||||
|
|
||||||
|
// Do the actual layout
|
||||||
|
fTopView->Layout(force);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BWindow::GetSupportedSuites(BMessage* data)
|
BWindow::GetSupportedSuites(BMessage* data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user