diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-27 03:30:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-27 03:30:58 +0300 |
commit | 003043714367009efaf07015cc63a901ae2ee47c (patch) | |
tree | f441091a46ac07419977a0dba4cfd6b5ceab667b /src/gui/widgets/scrollarea.cpp | |
parent | 916a3d76da98d078a807044c43d1a70bc146ba70 (diff) | |
download | plus-003043714367009efaf07015cc63a901ae2ee47c.tar.gz plus-003043714367009efaf07015cc63a901ae2ee47c.tar.bz2 plus-003043714367009efaf07015cc63a901ae2ee47c.tar.xz plus-003043714367009efaf07015cc63a901ae2ee47c.zip |
Remove default parameters from theme.
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index e22ecdcf3..a99d5cc3c 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -157,11 +157,11 @@ ScrollArea::~ScrollArea() instances--; if (instances == 0) { - Theme::unloadRect(background); - Theme::unloadRect(vMarker); - Theme::unloadRect(vMarkerHi); - Theme::unloadRect(vBackground); - Theme::unloadRect(hBackground); + Theme::unloadRect(background, 0, 8); + Theme::unloadRect(vMarker, 0, 8); + Theme::unloadRect(vMarkerHi, 0, 8); + Theme::unloadRect(vBackground, 0, 8); + Theme::unloadRect(hBackground, 0, 8); for (int i = 0; i < 2; i ++) { for (int f = UP; f < BUTTONS_DIR; f ++) @@ -203,18 +203,43 @@ void ScrollArea::init(std::string skinName) skinName = "scroll_background.xml"; if (theme != nullptr) { - theme->loadRect(background, skinName, "scroll_background.xml"); - theme->loadRect(vMarker, "scroll.xml", ""); - theme->loadRect(vMarkerHi, "scroll_highlighted.xml", "scroll.xml"); - theme->loadRect(vBackground, "scroll_vbackground.xml", ""); - theme->loadRect(hBackground, "scroll_hbackground.xml", ""); + theme->loadRect(background, + skinName, + "scroll_background.xml", + 0, + 8); + theme->loadRect(vMarker, + "scroll.xml", + "", + 0, + 8); + theme->loadRect(vMarkerHi, + "scroll_highlighted.xml", + "scroll.xml", + 0, + 8); + theme->loadRect(vBackground, + "scroll_vbackground.xml", + "", + 0, + 8); + theme->loadRect(hBackground, + "scroll_hbackground.xml", + "", + 0, + 8); } for (int i = 0; i < 2; i ++) { Skin *skin = nullptr; if (theme != nullptr) - skin = theme->load(buttonFiles[i], "scrollbuttons.xml"); + { + skin = theme->load(buttonFiles[i], + "scrollbuttons.xml", + true, + theme->getThemePath()); + } if (skin != nullptr) { const ImageRect &rect = skin->getBorder(); |