mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibGUI/ScrollBar: Only paint buttons as pressed when also hovered
Fixes #6185
This commit is contained in:
parent
1d7bec0fe7
commit
06353077b7
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/gmta
Commit: 06353077b7
Pull-request: https://github.com/SerenityOS/serenity/pull/6223
Issue: https://github.com/SerenityOS/serenity/issues/6185
1 changed files with 2 additions and 2 deletions
|
@ -212,8 +212,8 @@ void ScrollBar::paint_event(PaintEvent& event)
|
|||
|
||||
painter.fill_rect_with_dither_pattern(rect(), palette().button().lightened(1.3f), palette().button());
|
||||
|
||||
bool decrement_pressed = m_pressed_component == Component::DecrementButton;
|
||||
bool increment_pressed = m_pressed_component == Component::IncrementButton;
|
||||
bool decrement_pressed = (m_pressed_component == Component::DecrementButton) && (m_pressed_component == m_hovered_component);
|
||||
bool increment_pressed = (m_pressed_component == Component::IncrementButton) && (m_pressed_component == m_hovered_component);
|
||||
|
||||
Gfx::StylePainter::paint_button(painter, decrement_button_rect(), palette(), Gfx::ButtonStyle::Normal, decrement_pressed, hovered_component_for_painting == Component::DecrementButton);
|
||||
Gfx::StylePainter::paint_button(painter, increment_button_rect(), palette(), Gfx::ButtonStyle::Normal, increment_pressed, hovered_component_for_painting == Component::IncrementButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue