1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

LibGUI+LibGfx: Highlight currently active tab button with accent color

Use the new "Accent" color role to emphasize the currently active tab
within a GUI::TabWidget. :^)
This commit is contained in:
Andreas Kling 2021-07-28 20:23:31 +02:00
parent 9826d616dd
commit 410b3c85b6
5 changed files with 29 additions and 10 deletions

View file

@ -18,9 +18,9 @@ BaseStylePainter& StylePainter::current()
return style;
}
void StylePainter::paint_tab_button(Painter& painter, const IntRect& rect, const Palette& palette, bool active, bool hovered, bool enabled, bool top)
void StylePainter::paint_tab_button(Painter& painter, const IntRect& rect, const Palette& palette, bool active, bool hovered, bool enabled, bool top, bool in_active_window)
{
current().paint_tab_button(painter, rect, palette, active, hovered, enabled, top);
current().paint_tab_button(painter, rect, palette, active, hovered, enabled, top, in_active_window);
}
void StylePainter::paint_button(Painter& painter, const IntRect& rect, const Palette& palette, ButtonStyle button_style, bool pressed, bool hovered, bool checked, bool enabled, bool focused)