mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57: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
|
@ -41,8 +41,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
HexEditor::HexEditor(GUI::Widget* parent)
|
||||
: ScrollableWidget(parent)
|
||||
HexEditor::HexEditor()
|
||||
{
|
||||
set_scrollbars_enabled(true);
|
||||
set_font(GFontDatabase::the().get_by_name("Csilla Thin"));
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
Function<void()> on_change;
|
||||
|
||||
protected:
|
||||
HexEditor(GUI::Widget* parent);
|
||||
HexEditor();
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
|
|
|
@ -49,7 +49,7 @@ HexEditorWidget::HexEditorWidget()
|
|||
set_layout(make<GUI::VerticalBoxLayout>());
|
||||
layout()->set_spacing(0);
|
||||
|
||||
m_editor = HexEditor::construct(this);
|
||||
m_editor = add<HexEditor>();
|
||||
|
||||
m_editor->on_status_change = [this](int position, HexEditor::EditMode edit_mode, int selection_start, int selection_end) {
|
||||
m_statusbar->set_text(0, String::format("Offset: %8X", position));
|
||||
|
@ -66,7 +66,7 @@ HexEditorWidget::HexEditorWidget()
|
|||
update_title();
|
||||
};
|
||||
|
||||
m_statusbar = GUI::StatusBar::construct(5, this);
|
||||
m_statusbar = add<GUI::StatusBar>(5);
|
||||
|
||||
m_new_action = GUI::Action::create("New", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [this](const GUI::Action&) {
|
||||
if (m_document_dirty) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue