1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:17:44 +00:00

LibGUI: Convert GScrollBar to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 15:07:24 +02:00
parent 4616a13e94
commit bce58bbbca
7 changed files with 11 additions and 10 deletions

View file

@ -32,7 +32,7 @@ TerminalWidget::TerminalWidget(int ptm_fd, RefPtr<CConfigFile> config)
set_frame_shadow(FrameShadow::Sunken);
set_frame_thickness(2);
m_scrollbar = new GScrollBar(Orientation::Vertical, this);
m_scrollbar = GScrollBar::construct(Orientation::Vertical, this);
m_scrollbar->set_relative_rect(0, 0, 16, 0);
m_scrollbar->on_change = [this](int) {
force_repaint();

View file

@ -100,5 +100,5 @@ private:
ObjectPtr<CTimer> m_visual_beep_timer;
RefPtr<CConfigFile> m_config;
GScrollBar* m_scrollbar { nullptr };
ObjectPtr<GScrollBar> m_scrollbar;
};