mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtr
This commit is contained in:
parent
4ea229accd
commit
93851c3832
25 changed files with 38 additions and 36 deletions
|
@ -31,7 +31,7 @@ public:
|
|||
BoolModelEditingDelegate() {}
|
||||
virtual ~BoolModelEditingDelegate() override {}
|
||||
|
||||
virtual GWidget* create_widget() override
|
||||
virtual ObjectPtr<GWidget> create_widget() override
|
||||
{
|
||||
auto* combo = new GComboBox(nullptr);
|
||||
combo->set_only_allow_values_from_model(true);
|
||||
|
|
|
@ -95,7 +95,7 @@ static GWidget* build_gwidget(VBWidgetType type, GWidget* parent)
|
|||
return box;
|
||||
}
|
||||
case VBWidgetType::GTextEditor: {
|
||||
auto* editor = new GTextEditor(GTextEditor::Type::MultiLine, parent);
|
||||
auto editor = GTextEditor::construct(GTextEditor::Type::MultiLine, parent);
|
||||
editor->set_ruler_visible(false);
|
||||
return editor;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue