1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

LibGUI: Remove parent parameter to GUI::Widget constructor

This commit is contained in:
Andreas Kling 2020-02-23 12:07:13 +01:00
parent 4ce28c32d1
commit c5d913970a
114 changed files with 207 additions and 313 deletions

View file

@ -29,8 +29,7 @@
#include <LibGfx/Color.h>
#include <LibGfx/Palette.h>
BackgroundWidget::BackgroundWidget(GUI::Widget* parent)
: GUI::Frame(parent)
BackgroundWidget::BackgroundWidget()
{
}

View file

@ -31,10 +31,11 @@
class BackgroundWidget : public GUI::Frame {
C_OBJECT(BackgroundWidget)
public:
explicit BackgroundWidget(GUI::Widget* parent = nullptr);
virtual ~BackgroundWidget() override;
private:
BackgroundWidget();
virtual void paint_event(GUI::PaintEvent&) override;
virtual void resize_event(GUI::ResizeEvent&) override;
};

View file

@ -33,14 +33,8 @@
#include <LibGfx/Font.h>
#include <LibGfx/Palette.h>
TextWidget::TextWidget(GUI::Widget* parent)
: GUI::Frame(parent)
{
}
TextWidget::TextWidget(const StringView& text, GUI::Widget* parent)
: GUI::Frame(parent)
, m_text(text)
TextWidget::TextWidget(const StringView& text)
: m_text(text)
{
}

View file

@ -32,10 +32,9 @@
#include <LibGfx/TextAlignment.h>
class TextWidget : public GUI::Frame {
C_OBJECT(TextWidget)
C_OBJECT(TextWidget);
public:
explicit TextWidget(GUI::Widget* parent = nullptr);
TextWidget(const StringView& text, GUI::Widget* parent = nullptr);
virtual ~TextWidget() override;
String text() const { return m_text; }
@ -53,6 +52,8 @@ public:
void wrap_and_set_height();
private:
explicit TextWidget(const StringView& text = {});
virtual void paint_event(GUI::PaintEvent&) override;
virtual void resize_event(GUI::ResizeEvent&) override;

View file

@ -25,12 +25,8 @@
*/
#include "UnuncheckableButton.h"
#include <LibGUI/Painter.h>
#include <LibGfx/Color.h>
#include <LibGfx/Palette.h>
UnuncheckableButton::UnuncheckableButton(GUI::Widget* parent)
: GUI::Button(parent)
UnuncheckableButton::UnuncheckableButton()
{
}

View file

@ -31,8 +31,10 @@
class UnuncheckableButton : public GUI::Button {
C_OBJECT(UnuncheckableButton)
public:
explicit UnuncheckableButton(GUI::Widget* parent = nullptr);
virtual ~UnuncheckableButton() override;
virtual bool is_uncheckable() const override { return false; }
private:
UnuncheckableButton();
};