mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibGUI: Don't draw Scrollbar scrubber when scrubber rect is null
Fixes null scrubbers drawing over the decrement button when window dimensions dictate they disappear.
This commit is contained in:
parent
93e45588e5
commit
03b6f8e7fd
Notes:
sideshowbarker
2024-07-18 04:55:25 +09:00
Author: https://github.com/thankyouverycool
Commit: 03b6f8e7fd
Pull-request: https://github.com/SerenityOS/serenity/pull/9737
Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ void Scrollbar::paint_event(PaintEvent& event)
|
|||
painter.draw_bitmap(increment_location, orientation() == Orientation::Vertical ? *s_down_arrow_bitmap : *s_right_arrow_bitmap, (has_scrubber() && is_enabled()) ? palette().button_text() : palette().threed_shadow1());
|
||||
}
|
||||
|
||||
if (has_scrubber())
|
||||
if (has_scrubber() && !scrubber_rect().is_null())
|
||||
Gfx::StylePainter::paint_button(painter, scrubber_rect(), palette(), Gfx::ButtonStyle::ThickCap, false, hovered_component_for_painting == Component::Scrubber || m_pressed_component == Component::Scrubber);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue