mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:07:44 +00:00
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.
This commit is contained in:
parent
05de9b82b8
commit
d7475449cc
1 changed files with 3 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue