From 4eb198baf3b6971fce00bd04ad74c866e87d48e3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 18 Aug 2021 13:04:40 +0200 Subject: [PATCH] Profiler: Limit the initial size of the timeline container If there are a lot of process timeline tracks, we don't want to make the window gigantic. So let's just put a limit on it. --- Userland/DevTools/Profiler/TimelineContainer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/DevTools/Profiler/TimelineContainer.cpp b/Userland/DevTools/Profiler/TimelineContainer.cpp index fdaf940e00..dd93c6e838 100644 --- a/Userland/DevTools/Profiler/TimelineContainer.cpp +++ b/Userland/DevTools/Profiler/TimelineContainer.cpp @@ -22,7 +22,8 @@ TimelineContainer::TimelineContainer(GUI::Widget& header_container, TimelineView update_widget_sizes(); update_widget_positions(); - set_fixed_height(timeline_view.height() + frame_thickness() * 2); + int initial_height = min(300, timeline_view.height() + frame_thickness() * 2); + set_fixed_height(initial_height); m_timeline_view->on_scale_change = [this] { update_widget_sizes();