summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 0607564f9..12e7736c0 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -216,6 +216,9 @@ Skin *Theme::load(const std::string &filename, const std::string &defaultPath)
Skin *skin = readSkin(filename);
if (!skin)
+ skin = readSkin("window.xml");
+
+ if (!skin)
{
// Try falling back on the defaultPath if this makes sense
if (filename != defaultPath)
@@ -240,6 +243,31 @@ Skin *Theme::load(const std::string &filename, const std::string &defaultPath)
return skin;
}
+void Theme::unload(Skin *skin)
+{
+ if (!skin)
+ return;
+ skin->instances --;
+/*
+ // unload theme if no instances
+ if (!skin->instances)
+ {
+ SkinIterator it = mSkins.begin();
+ SkinIterator it_end = mSkins.end();
+ while (it != it_end)
+ {
+ if (it->second == skin)
+ {
+ mSkins.erase(it);
+ break;
+ }
+ ++ it;
+ }
+ delete skin;
+ }
+*/
+}
+
void Theme::setMinimumOpacity(float minimumOpacity)
{
if (minimumOpacity > 1.0f)