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.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 779d98768..9bf5adcf6 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -410,6 +410,14 @@ Skin *Theme::readSkin(const std::string &filename)
loadSkinImage(7, "bottom-edge")
else
loadSkinImage(8, "bottom-right-corner")
+ else
+ loadSkinImage(0, "up")
+ else
+ loadSkinImage(1, "down")
+ else
+ loadSkinImage(2, "left")
+ else
+ loadSkinImage(3, "right")
}
else if (xmlNameEqual(partNode, "option"))
{
@@ -818,3 +826,21 @@ void Theme::loadColors(std::string file)
}
}
}
+
+void Theme::loadRect(ImageRect &image, std::string name, int start, int end)
+{
+ Skin *skin = load(name);
+ if (skin)
+ {
+ const ImageRect &rect = skin->getBorder();
+ for (int f = start; f <= end; f ++)
+ {
+ if (rect.grid[f])
+ {
+ rect.grid[f]->incRef();
+ image.grid[f] = rect.grid[f];
+ }
+ }
+ unload(skin);
+ }
+}