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:
parent
4ce28c32d1
commit
c5d913970a
114 changed files with 207 additions and 313 deletions
|
@ -29,8 +29,7 @@
|
|||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
BackgroundWidget::BackgroundWidget(GUI::Widget* parent)
|
||||
: GUI::Frame(parent)
|
||||
BackgroundWidget::BackgroundWidget()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue