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

LibGUI+LibGfx: Implement upside-down appearance for bottom-side tabs

GUI::TabWidget has long has a TabPosition::Bottom option, but we still
rendered the tab buttons the same as TabPosition::Top.

This patch implements a custom look for bottom-side tabs. I've done my
best to match the look of the top-side ones, but there might be some
improvements we can make here. :^)
This commit is contained in:
Andreas Kling 2020-08-23 23:39:27 +02:00
parent 59172e2714
commit 03c576acc5
6 changed files with 61 additions and 36 deletions

View file

@ -38,9 +38,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)
void StylePainter::paint_tab_button(Painter& painter, const IntRect& rect, const Palette& palette, bool active, bool hovered, bool enabled, bool top)
{
current().paint_tab_button(painter, rect, palette, active, hovered, enabled);
current().paint_tab_button(painter, rect, palette, active, hovered, enabled, top);
}
void StylePainter::paint_button(Painter& painter, const IntRect& rect, const Palette& palette, ButtonStyle button_style, bool pressed, bool hovered, bool checked, bool enabled)