mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibGUI/ScrollBar: Only paint buttons as pressed when also hovered
Fixes #6185
This commit is contained in:
parent
1d7bec0fe7
commit
06353077b7
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