summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-07-01 22:53:44 +0100
committerLinus Groh <mail@linusgroh.de>2022-07-01 23:58:08 +0100
commitf743a8c00ebc52779b45d14430046730e43aa2f7 (patch)
treeda005b4b5937e8599e57fbb45b401a9d14e40332 /Userland/Libraries
parent0d2613ebeb771a510b730ed3007ffcaa22d2ecba (diff)
downloadserenity-f743a8c00ebc52779b45d14430046730e43aa2f7.zip
LibGUI: Fix scrollbars not showing after updating content size
This fixes the scrollbars in not showing till after a resize in Browser :^)
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp b/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp
index 013541faf4..596884a075 100644
--- a/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp
+++ b/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp
@@ -149,6 +149,7 @@ void AbstractScrollableWidget::update_scrollbar_ranges()
m_vertical_scrollbar->set_range(0, excess_size().height());
m_vertical_scrollbar->set_page_step(visible_content_rect().height() - m_vertical_scrollbar->step());
+ update_scrollbar_visibility();
}
void AbstractScrollableWidget::update_scrollbar_visibility()
@@ -168,7 +169,6 @@ void AbstractScrollableWidget::update_scrollbar_visibility()
if (horizontal_scrollbar_should_be_visible)
vertical_buffer -= m_horizontal_scrollbar->height();
vertical_scrollbar_should_be_visible = vertical_buffer < 0;
-
m_horizontal_scrollbar->set_visible(horizontal_scrollbar_should_be_visible);
m_vertical_scrollbar->set_visible(vertical_scrollbar_should_be_visible);
}