diff options
author | Andreas Kling <kling@serenityos.org> | 2022-01-10 02:04:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-10 16:22:37 +0100 |
commit | d7475449ccc580474a83ae7c8dced27095bb9c2f (patch) | |
tree | 28d71a2a780ba1db4d0d591d3dd0442b6ed13188 | |
parent | 05de9b82b871c3967e7c739c2d21db0621248ded (diff) | |
download | serenity-d7475449ccc580474a83ae7c8dced27095bb9c2f.zip |
Taskbar: Tweak taskbar button progress bar rendering
The rects didn't take the "thin cap" button style into account, causing
in-button progress bars to look a little off.
-rw-r--r-- | Userland/Services/Taskbar/TaskbarButton.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Services/Taskbar/TaskbarButton.cpp b/Userland/Services/Taskbar/TaskbarButton.cpp index d02cf99d68..ac03942552 100644 --- a/Userland/Services/Taskbar/TaskbarButton.cpp +++ b/Userland/Services/Taskbar/TaskbarButton.cpp @@ -121,7 +121,9 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event) if (window.progress().has_value()) { auto adjusted_rect = rect().shrunken(4, 4); - if (is_being_pressed() || is_checked()) { + if (!is_being_pressed() && !is_checked()) { + adjusted_rect.translate_by(-1, -1); + adjusted_rect.set_width(adjusted_rect.width() + 1); adjusted_rect.set_height(adjusted_rect.height() + 1); } paint_custom_progressbar(painter, adjusted_rect, text_rect, palette(), 0, 100, window.progress().value(), text(), font, text_alignment()); |