mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
GTabWidget: Highlight tab buttons when hovered.
The active tab's button doesn't get highlighted, since the highlight is supposed to indicate that the widget can be interacted with.
This commit is contained in:
parent
67108f872f
commit
5c4b421d56
3 changed files with 43 additions and 13 deletions
|
@ -7,14 +7,8 @@ void StylePainter::paint_tab_button(Painter& painter, const Rect& rect, bool act
|
|||
Color highlight_color2 = Color::from_rgb(0xdfdfdf);
|
||||
Color shadow_color1 = Color::from_rgb(0x808080);
|
||||
Color shadow_color2 = Color::from_rgb(0x404040);
|
||||
ASSERT(!hovered);
|
||||
|
||||
if (enabled) {
|
||||
if (hovered)
|
||||
base_color = Color::from_rgb(0xe3dfdb);
|
||||
//else
|
||||
// button_color = Color::from_rgb(0xd6d2ce);
|
||||
} else if (hovered && enabled)
|
||||
if (hovered && enabled && !active)
|
||||
base_color = Color::from_rgb(0xd4d4d4);
|
||||
|
||||
PainterStateSaver saver(painter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue