From 36b586e32474e0d21de2383aa106869cfef89902 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 8 Jul 2012 20:03:16 +0300 Subject: Change scrollarea theming. --- src/gui/theme.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/gui/theme.cpp') 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); + } +} -- cgit v1.2.3-70-g09d2