summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/graphics/gui/jewelry/theme.xml6
-rw-r--r--data/graphics/gui/login_wallpaper.png (renamed from data/graphics/images/login_wallpaper.png)bin10948 -> 10948 bytes
-rw-r--r--data/graphics/gui/theme.xml6
-rw-r--r--src/gui/widgets/desktop.cpp16
-rw-r--r--src/resources/theme.cpp1
-rw-r--r--src/resources/theme.h1
-rw-r--r--src/resources/wallpaper.cpp1
7 files changed, 21 insertions, 10 deletions
diff --git a/data/graphics/gui/jewelry/theme.xml b/data/graphics/gui/jewelry/theme.xml
index 2b4911de..d95d07d5 100644
--- a/data/graphics/gui/jewelry/theme.xml
+++ b/data/graphics/gui/jewelry/theme.xml
@@ -281,6 +281,12 @@
</state>
</skin>
+ <skin type="Desktop">
+ <state>
+ <rect color="#5a5044" />
+ </state>
+ </skin>
+
<skin type="Button" padding="7">
<state disabled="true">
<text color="#aaaaaa" outlineColor="#000000"/>
diff --git a/data/graphics/images/login_wallpaper.png b/data/graphics/gui/login_wallpaper.png
index 109acccd..109acccd 100644
--- a/data/graphics/images/login_wallpaper.png
+++ b/data/graphics/gui/login_wallpaper.png
Binary files differ
diff --git a/data/graphics/gui/theme.xml b/data/graphics/gui/theme.xml
index fc1de9e3..5a0408f7 100644
--- a/data/graphics/gui/theme.xml
+++ b/data/graphics/gui/theme.xml
@@ -91,6 +91,12 @@
</state>
</skin>
+ <skin type="Desktop">
+ <state>
+ <img src="login_wallpaper.png" left="258" right="34" top="143" bottom="22" />
+ </state>
+ </skin>
+
<skin type="Button" padding="4">
<state disabled="true">
<text color="#333333" />
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();