LibGUI: Don't draw Scrollbar button triangles if they'd be off-center

This commit is contained in:
thankyouverycool 2022-09-22 11:18:53 -04:00 committed by Andreas Kling
parent cbd9cf93be
commit b50bce3cb9
Notes: sideshowbarker 2024-07-17 06:39:26 +09:00

View File

@ -205,7 +205,7 @@ void Scrollbar::paint_event(PaintEvent& event)
Gfx::StylePainter::paint_button(painter, decrement_button_rect(), palette(), Gfx::ButtonStyle::ThickCap, decrement_pressed, hovered_component_for_painting == Component::DecrementButton);
Gfx::StylePainter::paint_button(painter, increment_button_rect(), palette(), Gfx::ButtonStyle::ThickCap, increment_pressed, hovered_component_for_painting == Component::IncrementButton);
if (length(orientation()) > default_button_size()) {
if (length(orientation()) >= default_button_size() * 2) {
auto decrement_location = decrement_button_rect().location().translated(3, 3);
if (decrement_pressed)
decrement_location.translate_by(1, 1);