hrev50847 adds 1 changeset to branch 'master'
old head: bea76b8aa16061ddaa48ac90ac0a48663138ef2c
new head: 5f8edc9c51b6f4da806faa5340a62d8c16a3ddd1
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=5f8edc9c51b6+%5Ebea76b8aa160
----------------------------------------------------------------------------
5f8edc9c51b6: Fix for ticket #12978 - Tracker GetInfo window layout problem
Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
[ Tsimblist <tsimblist80@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50847
Commit: 5f8edc9c51b6f4da806faa5340a62d8c16a3ddd1
URL: http://cgit.haiku-os.org/haiku/commit/?id=5f8edc9c51b6
Author: Tsimblist <tsimblist80@xxxxxxxxx>
Date: Sat Jan 7 19:01:43 2017 UTC
Committer: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sun Jan 8 22:20:57 2017 UTC
Ticket: https://dev.haiku-os.org/ticket/12978
----------------------------------------------------------------------------
1 file changed, 8 insertions(+), 1 deletion(-)
src/kits/tracker/InfoWindow.cpp | 9 ++++++++-
----------------------------------------------------------------------------
diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp
index 642a40d..eb3bdad 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());