mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibGUI: Do not paint scrollbar button highlight for scrollbars without scrubber
If a scrollbar doesn't have a scrubber (because the view it scrolls is large enough to display all its contents without scrolling), then it ignores all clicks. We shouldn't draw a hover highlight that suggests clickability in that case.
This commit is contained in:
parent
34d210ecf5
commit
01ff17d374
Notes:
sideshowbarker
2024-07-19 02:48:19 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/01ff17d3743 Pull-request: https://github.com/SerenityOS/serenity/pull/3445
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ void ScrollBar::paint_event(PaintEvent& event)
|
|||
painter.add_clip_rect(event.rect());
|
||||
|
||||
Component hovered_component_for_painting = m_hovered_component;
|
||||
if (m_pressed_component != Component::None && m_hovered_component != m_pressed_component)
|
||||
if (!has_scrubber() || (m_pressed_component != Component::None && m_hovered_component != m_pressed_component))
|
||||
hovered_component_for_painting = Component::None;
|
||||
|
||||
painter.fill_rect_with_dither_pattern(rect(), palette().button().lightened(1.3f), palette().button());
|
||||
|
|
Loading…
Reference in a new issue