diff options
-rwxr-xr-x | Demos/WidgetGallery/main.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibGUI/GCheckBox.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Demos/WidgetGallery/main.cpp b/Demos/WidgetGallery/main.cpp index 8dad129c2d..4d73456d03 100755 --- a/Demos/WidgetGallery/main.cpp +++ b/Demos/WidgetGallery/main.cpp @@ -28,9 +28,9 @@ int main(int argc, char** argv) main_widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); main_widget->layout()->set_margins({ 4, 4, 4, 4 }); - auto* checkbox1 = new GCheckBox("GCheckBox 1", main_widget); + auto checkbox1 = GCheckBox::construct("GCheckBox 1", main_widget); (void)checkbox1; - auto* checkbox2 = new GCheckBox("GCheckBox 2", main_widget); + auto checkbox2 = GCheckBox::construct("GCheckBox 2", main_widget); checkbox2->set_enabled(false); auto radio1 = GRadioButton::construct("GRadioButton 1", main_widget); diff --git a/Libraries/LibGUI/GCheckBox.h b/Libraries/LibGUI/GCheckBox.h index 035ea9fe1b..b1553dc1f9 100644 --- a/Libraries/LibGUI/GCheckBox.h +++ b/Libraries/LibGUI/GCheckBox.h @@ -7,13 +7,14 @@ class GCheckBox : public GAbstractButton { C_OBJECT(GCheckBox) public: - GCheckBox(const StringView&, GWidget* parent); - explicit GCheckBox(GWidget* parent); virtual ~GCheckBox() override; virtual void click() override; private: + GCheckBox(const StringView&, GWidget* parent); + explicit GCheckBox(GWidget* parent); + // These don't make sense for a check box, so hide them. using GAbstractButton::auto_repeat_interval; using GAbstractButton::set_auto_repeat_interval; |