diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 14:19:05 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 15:25:08 +0200 |
commit | c7437f9caa5485d99e0101bfac98d968e767741f (patch) | |
tree | 0268e791f6d419da644eca6fc6789e5429c10848 /Applications/DisplayProperties/DisplayProperties.cpp | |
parent | 6b347747f2f912721bc076fcd4aabb8a4bfa9e98 (diff) | |
download | serenity-c7437f9caa5485d99e0101bfac98d968e767741f.zip |
LibGUI: Convert GLabel to ObjectPtr
Diffstat (limited to 'Applications/DisplayProperties/DisplayProperties.cpp')
-rw-r--r-- | Applications/DisplayProperties/DisplayProperties.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Applications/DisplayProperties/DisplayProperties.cpp b/Applications/DisplayProperties/DisplayProperties.cpp index 12046f5113..a21caba385 100644 --- a/Applications/DisplayProperties/DisplayProperties.cpp +++ b/Applications/DisplayProperties/DisplayProperties.cpp @@ -101,19 +101,19 @@ void DisplayPropertiesWidget::create_frame() background_content->set_layout(make<GBoxLayout>(Orientation::Vertical)); background_content->layout()->set_margins({ 4, 4, 4, 4 }); - auto* wallpaper_preview = new GLabel(background_splitter); + m_wallpaper_preview = GLabel::construct(background_splitter); auto* wallpaper_list = new GListView(background_content); wallpaper_list->set_background_color(Color::White); wallpaper_list->set_model(*ItemListModel<AK::String>::create(m_wallpapers)); wallpaper_list->horizontal_scrollbar().set_visible(false); - wallpaper_list->on_selection = [this, wallpaper_preview](auto& index) { + wallpaper_list->on_selection = [this](auto& index) { StringBuilder builder; m_selected_wallpaper = m_wallpapers.at(index.row()); builder.append("/res/wallpapers/"); builder.append(m_selected_wallpaper); - wallpaper_preview->set_icon(load_png(builder.to_string())); - wallpaper_preview->set_should_stretch_icon(true); + m_wallpaper_preview->set_icon(load_png(builder.to_string())); + m_wallpaper_preview->set_should_stretch_icon(true); }; // Let's add the settings tab |