mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
DisplaySettings: Set monitor widget color if no image is selected
The monitor widget now displays the selected colour if no background image has been selected. Resolves #7491
This commit is contained in:
parent
90e9d1a0a1
commit
e2989424c7
1 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,14 @@ bool MonitorWidget::set_wallpaper(String path)
|
|||
if (path == m_desktop_wallpaper_path)
|
||||
return false;
|
||||
|
||||
if (path.is_empty()) {
|
||||
m_wallpaper_bitmap = nullptr;
|
||||
m_desktop_wallpaper_path = nullptr;
|
||||
m_desktop_dirty = true;
|
||||
update();
|
||||
return false;
|
||||
}
|
||||
|
||||
auto bitmap = Gfx::Bitmap::load_from_file(path);
|
||||
if (bitmap)
|
||||
m_wallpaper_bitmap = move(bitmap);
|
||||
|
|
Loading…
Add table
Reference in a new issue