1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:37:35 +00:00

LibGUI: Include scrubber and gutter in Scrollbar's calculated_min_size()

This commit is contained in:
thankyouverycool 2022-09-22 11:22:12 -04:00 committed by Andreas Kling
parent b50bce3cb9
commit 961a225316

View file

@ -420,10 +420,11 @@ void Scrollbar::update_animated_scroll()
Optional<UISize> Scrollbar::calculated_min_size() const
{
auto scrubber_and_gutter = default_button_size() + 1;
if (orientation() == Gfx::Orientation::Vertical)
return { { default_button_size(), 2 * default_button_size() } };
return { { default_button_size(), 2 * default_button_size() + scrubber_and_gutter } };
else
return { { 2 * default_button_size(), default_button_size() } };
return { { 2 * default_button_size() + scrubber_and_gutter, default_button_size() } };
}
Optional<UISize> Scrollbar::calculated_preferred_size() const