diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/desktop.cpp | 16 | ||||
-rw-r--r-- | src/resources/theme.cpp | 1 | ||||
-rw-r--r-- | src/resources/theme.h | 1 | ||||
-rw-r--r-- | src/resources/wallpaper.cpp | 1 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index b21c235a..aae78335 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -69,24 +69,20 @@ void Desktop::draw(gcn::Graphics *graphics) { auto *g = static_cast<Graphics *>(graphics); - if (!mWallpaper || (getWidth() > mWallpaper->getWidth() || - getHeight() > mWallpaper->getHeight())) - { - // TODO: Color from palette - g->setColor(gcn::Color(64, 64, 64)); - g->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); - } - if (mWallpaper) { g->drawRescaledImage(mWallpaper, 0, 0, 0, 0, mWallpaper->getWidth(), mWallpaper->getHeight(), getWidth(), getHeight(), false); } + else + { + gui->getTheme()->drawSkin(g, SkinType::Desktop, WidgetState(this)); + } - // Draw a thin border under the application version... + // Draw a background beneath the application version for readability... g->setColor(gcn::Color(255, 255, 255, 128)); - g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); + g->fillRectangle(mVersionLabel->getDimension()); Container::draw(graphics); } diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp index 0c332902..ea2cef45 100644 --- a/src/resources/theme.cpp +++ b/src/resources/theme.cpp @@ -529,6 +529,7 @@ static std::optional<SkinType> readSkinType(std::string_view type) if (type == "ToolWindow") return SkinType::ToolWindow; if (type == "Popup") return SkinType::Popup; if (type == "SpeechBubble") return SkinType::SpeechBubble; + if (type == "Desktop") return SkinType::Desktop; if (type == "Button") return SkinType::Button; if (type == "ButtonUp") return SkinType::ButtonUp; if (type == "ButtonDown") return SkinType::ButtonDown; diff --git a/src/resources/theme.h b/src/resources/theme.h index fbcb263b..80b78fdd 100644 --- a/src/resources/theme.h +++ b/src/resources/theme.h @@ -71,6 +71,7 @@ enum class SkinType ToolWindow, Popup, SpeechBubble, + Desktop, Button, ButtonUp, ButtonDown, diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 2bdcd656..ece3e950 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -87,6 +87,7 @@ bool wallpaperCompare(const WallpaperData &a, const WallpaperData &b) void Wallpaper::loadWallpapers() { wallpaperData.clear(); + haveBackup = false; initWallpaperPaths(); |