1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +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:
thankyouverycool 2022-01-24 14:22:02 -05:00 committed by Andreas Kling
parent aefe3ef539
commit f77ac3a73c
6 changed files with 42 additions and 10 deletions

View file

@ -15,7 +15,7 @@ namespace Gfx {
class ClassicStylePainter : public BaseStylePainter {
public:
virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false) override;
virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false) override;
virtual void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, bool top, bool in_active_window) override;
virtual void paint_frame(Painter&, IntRect const&, Palette const&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false) override;
virtual void paint_window_frame(Painter&, IntRect const&, Palette const&) override;