Do not hardcode tab height in ResizeToFit()

This commit is contained in:
Philippe Saint-Pierre
2015-06-28 19:02:30 -04:00
parent 227af8c052
commit ee87fbc421
+8 -2
View File
@@ -1333,8 +1333,14 @@ BContainerWindow::ResizeToFit()
BRect screenFrame(screen.Frame());
screenFrame.InsetBy(5, 5);
screenFrame.top += 15;
// keeps title bar of window visible
BMessage decoratorSettings;
GetDecoratorSettings(&decoratorSettings);
float tabHeight = 15;
BRect tabRect;
if (decoratorSettings.FindRect("tab frame", &tabRect) == B_OK)
tabHeight = tabRect.Height();
screenFrame.top += tabHeight;
BRect frame(Frame());