mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
LibGUI: Don't draw Scrollbar button triangles if they'd be off-center
This commit is contained in:
parent
cbd9cf93be
commit
b50bce3cb9
Notes:
sideshowbarker
2024-07-17 06:39:26 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/b50bce3cb9 Pull-request: https://github.com/SerenityOS/serenity/pull/15344
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user