mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibGUI: Add DialogButton convenience class
DialogButton is a small convenience class, that just gives a button to be used in dialogs for a more consistent look around the system.
This commit is contained in:
parent
1a641f9af7
commit
4c84e64b2a
3 changed files with 14 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include <LibGfx/StylePainter.h>
|
#include <LibGfx/StylePainter.h>
|
||||||
|
|
||||||
REGISTER_WIDGET(GUI, Button)
|
REGISTER_WIDGET(GUI, Button)
|
||||||
|
REGISTER_WIDGET(GUI, DialogButton)
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
|
|
|
@ -76,4 +76,16 @@ private:
|
||||||
bool m_mimic_pressed { false };
|
bool m_mimic_pressed { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DialogButton final : public Button {
|
||||||
|
C_OBJECT(DialogButton);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~DialogButton() override {};
|
||||||
|
explicit DialogButton(String text = {})
|
||||||
|
: Button(move(text))
|
||||||
|
{
|
||||||
|
set_fixed_width(80);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ class CheckBox;
|
||||||
class ComboBox;
|
class ComboBox;
|
||||||
class Command;
|
class Command;
|
||||||
class CommandPalette;
|
class CommandPalette;
|
||||||
|
class DialogButton;
|
||||||
class DragEvent;
|
class DragEvent;
|
||||||
class DropEvent;
|
class DropEvent;
|
||||||
class EditingEngine;
|
class EditingEngine;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue