LibGUI: Draw GScrollBar buttons with a disabled look when appropriate.

This commit is contained in:
Andreas Kling 2019-02-10 07:37:02 +01:00
parent 1e8e4e9af2
commit f7831f8c76
Notes: sideshowbarker 2024-07-19 15:48:35 +09:00

View file

@ -129,10 +129,10 @@ void GScrollBar::paint_event(GPaintEvent&)
painter.fill_rect(rect(), Color(164, 164, 164)); painter.fill_rect(rect(), Color(164, 164, 164));
GStyle::the().paint_button(painter, up_button_rect(), false); GStyle::the().paint_button(painter, up_button_rect(), false);
painter.draw_bitmap(up_button_rect().location().translated(3, 3), *s_up_arrow_bitmap, Color::Black); painter.draw_bitmap(up_button_rect().location().translated(3, 3), *s_up_arrow_bitmap, has_scrubber() ? Color::Black : Color::MidGray);
GStyle::the().paint_button(painter, down_button_rect(), false); GStyle::the().paint_button(painter, down_button_rect(), false);
painter.draw_bitmap(down_button_rect().location().translated(3, 3), *s_down_arrow_bitmap, Color::Black); painter.draw_bitmap(down_button_rect().location().translated(3, 3), *s_down_arrow_bitmap, has_scrubber() ? Color::Black : Color::MidGray);
if (has_scrubber()) if (has_scrubber())
GStyle::the().paint_button(painter, scrubber_rect(), m_scrubbing); GStyle::the().paint_button(painter, scrubber_rect(), m_scrubbing);