Ticket #12978: 0001-Fix-for-ticket-12978-Tracker-GetInfo-window-layout-p.patch

File 0001-Fix-for-ticket-12978-Tracker-GetInfo-window-layout-p.patch, 970 bytes (added by tsimblist, 8 years ago)
  • src/kits/tracker/InfoWindow.cpp

    From 8f6cb66efe44d126742df4d13e3f4c7f096acce7 Mon Sep 17 00:00:00 2001
    From: Tsimblist <tsimblist80@gmail.com>
    Date: Sat, 7 Jan 2017 19:01:43 +0000
    Subject: [PATCH] Fix for ticket #12978 - Tracker GetInfo window layout problem
    
    ---
     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 642a40d..b9922c6 100644
    a b BInfoWindow::Show()  
    368368    float width = font->StringWidth("This is a really long string which we"
    369369        "will use to find the window width");
    370370
    371     float height = font->Size() * 15;
     371    // window height depends on file type
     372    int lines = 7;
     373    if (fModel->IsSymLink())
     374        lines += 1;
     375    if (fModel->IsExecutable())
     376        lines += 2;
     377    float height = font->Size() * (lines * 2 + 1);
     378
    372379    ResizeTo(width, height);
    373380
    374381    BRect attrRect(Bounds());