mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibGUI: Allow Buttons to set themselves as default
Several apps were implementing this behavior ad hoc. This provides a standard API as well as a comfy visual cue for default return key behavior.
This commit is contained in:
parent
aefe3ef539
commit
f77ac3a73c
6 changed files with 42 additions and 10 deletions
|
@ -23,9 +23,9 @@ void StylePainter::paint_tab_button(Painter& painter, const IntRect& rect, const
|
|||
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)
|
||||
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, bool default_button)
|
||||
{
|
||||
current().paint_button(painter, rect, palette, button_style, pressed, hovered, checked, enabled, focused);
|
||||
current().paint_button(painter, rect, palette, button_style, pressed, hovered, checked, enabled, focused, default_button);
|
||||
}
|
||||
|
||||
void StylePainter::paint_frame(Painter& painter, const IntRect& rect, const Palette& palette, FrameShape shape, FrameShadow shadow, int thickness, bool skip_vertical_lines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue