Skip to content

Commit

Permalink
Add simple replacement of wallpaper
Browse files Browse the repository at this point in the history
  • Loading branch information
kelteseth committed Feb 8, 2020
1 parent 9e85f2e commit d50b4ad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ScreenPlay/src/screenplaymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ void ScreenPlayManager::createWallpaper(
settings.insert("absolutePath", path);
}

// Only support remove wallpaper that spans over 1 monitor
if (monitorIndex.length() == 1) {
int i = 0;
for (auto& wallpaper : m_screenPlayWallpapers) {
if (wallpaper->screenNumber().length() == 1) {
if (monitors.at(0) == wallpaper->screenNumber().at(0)) {
removeWallpaperAt(i);
}
}
i++;
}
}

m_screenPlayWallpapers.append(wallpaper);
m_monitorListModel->setWallpaperActiveMonitor(wallpaper, monitorIndex);

Expand Down

0 comments on commit d50b4ad

Please sign in to comment.