1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:05:07 +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,17 +29,16 @@
namespace GUI {
ScrollableWidget::ScrollableWidget(Widget* parent)
: Frame(parent)
ScrollableWidget::ScrollableWidget()
{
m_vertical_scrollbar = ScrollBar::construct(Orientation::Vertical, this);
m_vertical_scrollbar = add<ScrollBar>(Orientation::Vertical);
m_vertical_scrollbar->set_step(4);
m_vertical_scrollbar->on_change = [this](int) {
did_scroll();
update();
};
m_horizontal_scrollbar = ScrollBar::construct(Orientation::Horizontal, this);
m_horizontal_scrollbar = add<ScrollBar>(Orientation::Horizontal);
m_horizontal_scrollbar->set_step(4);
m_horizontal_scrollbar->set_big_step(30);
m_horizontal_scrollbar->on_change = [this](int) {
@ -47,7 +46,7 @@ ScrollableWidget::ScrollableWidget(Widget* parent)
update();
};
m_corner_widget = Widget::construct(this);
m_corner_widget = add<Widget>();
m_corner_widget->set_fill_with_background_color(true);
}