mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibGUI: Share code for text painting in GAbstractButton.
This gives all the GAbstractButton a consistent disabled appearance.
This commit is contained in:
parent
149b7f92a7
commit
c62be7bb2b
5 changed files with 31 additions and 30 deletions
|
@ -1,6 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <SharedGraphics/TextAlignment.h>
|
||||
|
||||
class GPainter;
|
||||
|
||||
class GAbstractButton : public GWidget {
|
||||
public:
|
||||
|
@ -35,6 +38,8 @@ protected:
|
|||
virtual void enter_event(CEvent&) override;
|
||||
virtual void leave_event(CEvent&) override;
|
||||
|
||||
void paint_text(GPainter&, const Rect&, const Font&, TextAlignment);
|
||||
|
||||
private:
|
||||
String m_text;
|
||||
bool m_checked { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue