From ca9a61313ab9fe0376360e2ff19ad59f51c6111e Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 17 Nov 2008 00:47:23 +0000 Subject: [PATCH] Resolved a small todo thanks to r28664: We now ask the app_server for the window tab's height instead of hardcoding it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28678 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Window.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 4d02c2cbdf..6608c7c9f1 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1530,12 +1530,17 @@ BWindow::Zoom() The dimensions that non-virtual Zoom() passes to hook Zoom() are deduced from the smallest of three rectangles: */ - - // TODO: make more elaborate (figure out this window's - // tab height and border width... maybe ask app_server) + + // fallback in case retrieving the decorator settings fails (highly unlikely) float borderWidth = 5.0; float tabHeight = 26.0; - + BMessage settings; + if (GetDecoratorSettings(&settings) == B_OK) { + BRect tabRect; + if (settings.FindRect("tab frame", &tabRect) == B_OK) + tabHeight = tabRect.Height(); + } + // 1) the rectangle defined by SetZoomLimits(), float zoomedWidth = fMaxZoomWidth; float zoomedHeight = fMaxZoomHeight;