mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibGUI: Share code for text painting in GAbstractButton.
This gives all the GAbstractButton a consistent disabled appearance.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user