From 5f8edc9c51b6f4da806faa5340a62d8c16a3ddd1 Mon Sep 17 00:00:00 2001 From: Tsimblist Date: Sat, 7 Jan 2017 19:01:43 +0000 Subject: [PATCH] Fix for ticket #12978 - Tracker GetInfo window layout problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Axel Dörfler --- src/kits/tracker/InfoWindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index 642a40d070..eb3bdad8d5 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -368,7 +368,14 @@ BInfoWindow::Show() float width = font->StringWidth("This is a really long string which we" "will use to find the window width"); - float height = font->Size() * 15; + // window height depends on file type + int lines = 7; + if (fModel->IsSymLink()) + lines++; + if (fModel->IsExecutable()) + lines += 2; + float height = font->Size() * (lines * 2 + 1); + ResizeTo(width, height); BRect attrRect(Bounds());