From 0760c824df0e4a0546928ddbdcd5ce3af34b791b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 8 Dec 2009 17:05:05 +0000 Subject: [PATCH] Support for resizing the "Threads" column. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34560 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../gui/main_window/SchedulingPage.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/apps/debuganalyzer/gui/main_window/SchedulingPage.cpp b/src/apps/debuganalyzer/gui/main_window/SchedulingPage.cpp index 4eae196af4..69fe0b2de1 100644 --- a/src/apps/debuganalyzer/gui/main_window/SchedulingPage.cpp +++ b/src/apps/debuganalyzer/gui/main_window/SchedulingPage.cpp @@ -302,7 +302,7 @@ public: virtual BSize MaxSize() { - return BSize(MinSize().width, B_SIZE_UNLIMITED); + return BSize(1000, B_SIZE_UNLIMITED); } }; @@ -963,7 +963,15 @@ public: { float width = Bounds().Width(); float height = fThreadsView->MinSize().Height(); - float threadsViewWidth = fThreadsView->MinSize().width; + + float threadsViewWidth = 0; + if (fHeaderView->Model()->HeaderAt(0) != NULL) + threadsViewWidth = fHeaderView->HeaderFrame(0).Width(); + threadsViewWidth = std::max(threadsViewWidth, + fThreadsView->MinSize().width); + threadsViewWidth = std::min(threadsViewWidth, + fThreadsView->MaxSize().width); + float schedulingViewLeft = threadsViewWidth + 1 + kViewSeparationMargin; float schedulingViewWidth = width - schedulingViewLeft; @@ -987,10 +995,8 @@ public: private: virtual void HeaderWidthChanged(Header* header) { - if (header->ModelIndex() != 0) - return; - - // first column changed + if (header->ModelIndex() == 0) + InvalidateLayout(); } virtual void DataWidthChanged()