From cfef3040fb00127552158f233ebe4705bf242c25 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 17 Jul 2021 05:36:06 -0700 Subject: [PATCH] Profiler: Configure the TimelineContainer to be shrink to fit Today the profile viewer timeline view has a static size, which is computed as half the height of the window given it has two root widgets. Instead the timeline view should shrink to only consume the size that each process timeline consumes. --- Userland/DevTools/Profiler/TimelineContainer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/DevTools/Profiler/TimelineContainer.cpp b/Userland/DevTools/Profiler/TimelineContainer.cpp index 0dd3a0d936..85900d4a02 100644 --- a/Userland/DevTools/Profiler/TimelineContainer.cpp +++ b/Userland/DevTools/Profiler/TimelineContainer.cpp @@ -6,12 +6,13 @@ #include "TimelineContainer.h" #include "TimelineView.h" -#include +#include namespace Profiler { TimelineContainer::TimelineContainer(GUI::Widget& header_container, TimelineView& timeline_view) { + set_layout(); set_should_hide_unnecessary_scrollbars(true); m_header_container = header_container; m_timeline_view = timeline_view; @@ -21,6 +22,7 @@ TimelineContainer::TimelineContainer(GUI::Widget& header_container, TimelineView timeline_view.move_to_back(); update_widget_sizes(); update_widget_positions(); + set_shrink_to_fit(true); m_timeline_view->on_scale_change = [this] { update_widget_positions();