summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-08 20:03:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-13 01:02:40 +0300
commit36b586e32474e0d21de2383aa106869cfef89902 (patch)
tree6db1072a500cc63124c3a9a0712eada375605527 /src/gui/theme.cpp
parent960820b57ecf45a4bf5e337bf36adbe02e668fbf (diff)
downloadplus-36b586e32474e0d21de2383aa106869cfef89902.tar.gz
plus-36b586e32474e0d21de2383aa106869cfef89902.tar.bz2
plus-36b586e32474e0d21de2383aa106869cfef89902.tar.xz
plus-36b586e32474e0d21de2383aa106869cfef89902.zip
Change scrollarea theming.
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);
+ }
+}