LibGUI: Don't repaint disabled scrollbars when mousing over them

This commit is contained in:
Andreas Kling 2021-07-07 23:57:21 +02:00
parent b027466f41
commit c0e20252da
Notes: sideshowbarker 2024-07-18 10:07:59 +09:00

View File

@ -332,7 +332,8 @@ void Scrollbar::mousemove_event(MouseEvent& event)
auto old_hovered_component = m_hovered_component;
m_hovered_component = component_at_position(m_last_mouse_position);
if (old_hovered_component != m_hovered_component) {
update();
if (is_enabled())
update();
}
if (m_pressed_component != Component::Scrubber)
return;
@ -347,7 +348,8 @@ void Scrollbar::leave_event(Core::Event&)
{
if (m_hovered_component != Component::None) {
m_hovered_component = Component::None;
update();
if (is_enabled())
update();
}
}