diff options
author | FrHun <28605587+frhun@users.noreply.github.com> | 2022-06-12 22:35:17 +0200 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-06-28 17:52:42 +0100 |
commit | 8dd08d47f1ebf7f248be27279d6b3a68e4c3f9a1 (patch) | |
tree | e3b923bcf570a704dff7ed10bbede69b6e11c1ee /Userland/DevTools/Profiler | |
parent | ec1e25929e79b34f2f602560280fe5f399bcc5d6 (diff) | |
download | serenity-8dd08d47f1ebf7f248be27279d6b3a68e4c3f9a1.zip |
Applications: Remove usages of deprecated implicit conversions
These deprecated conversions are currently in place to make the system
compile, but they are to be removed soon. This prepares that.
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r-- | Userland/DevTools/Profiler/TimelineContainer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/DevTools/Profiler/TimelineContainer.cpp b/Userland/DevTools/Profiler/TimelineContainer.cpp index 5d54f4e114..65cfc60c4b 100644 --- a/Userland/DevTools/Profiler/TimelineContainer.cpp +++ b/Userland/DevTools/Profiler/TimelineContainer.cpp @@ -23,7 +23,7 @@ TimelineContainer::TimelineContainer(GUI::Widget& header_container, TimelineView update_widget_sizes(); update_widget_positions(); - int initial_height = min(300, timeline_view.height() + horizontal_scrollbar().max_height() + frame_thickness() * 2); + int initial_height = min(300, timeline_view.height() + 16 + frame_thickness() * 2); set_fixed_height(initial_height); m_timeline_view->on_scale_change = [this] { @@ -48,16 +48,16 @@ void TimelineContainer::update_widget_sizes() { { m_timeline_view->do_layout(); - auto preferred_size = m_timeline_view->layout()->preferred_size(); - m_timeline_view->resize(preferred_size); - set_content_size(preferred_size); + auto preferred_size = m_timeline_view->effective_preferred_size(); + m_timeline_view->resize(Gfx::IntSize(preferred_size)); + set_content_size(Gfx::IntSize(preferred_size)); } { m_header_container->do_layout(); - auto preferred_size = m_header_container->layout()->preferred_size(); - m_header_container->resize(preferred_size); - set_size_occupied_by_fixed_elements({ preferred_size.width(), 0 }); + auto preferred_size = m_header_container->effective_preferred_size(); + m_header_container->resize(Gfx::IntSize(preferred_size)); + set_size_occupied_by_fixed_elements({ preferred_size.width().as_int(), 0 }); } } |