From d7475449ccc580474a83ae7c8dced27095bb9c2f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 10 Jan 2022 02:04:09 +0100 Subject: 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. --- Userland/Services/Taskbar/TaskbarButton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()); -- cgit v1.2.3