Do not hardcode tab height in ResizeToFit()
This commit is contained in:
@@ -1333,8 +1333,14 @@ BContainerWindow::ResizeToFit()
|
|||||||
BRect screenFrame(screen.Frame());
|
BRect screenFrame(screen.Frame());
|
||||||
|
|
||||||
screenFrame.InsetBy(5, 5);
|
screenFrame.InsetBy(5, 5);
|
||||||
screenFrame.top += 15;
|
BMessage decoratorSettings;
|
||||||
// keeps title bar of window visible
|
GetDecoratorSettings(&decoratorSettings);
|
||||||
|
|
||||||
|
float tabHeight = 15;
|
||||||
|
BRect tabRect;
|
||||||
|
if (decoratorSettings.FindRect("tab frame", &tabRect) == B_OK)
|
||||||
|
tabHeight = tabRect.Height();
|
||||||
|
screenFrame.top += tabHeight;
|
||||||
|
|
||||||
BRect frame(Frame());
|
BRect frame(Frame());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user