diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-30 17:01:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-30 17:01:09 +0300 |
commit | 41049787e0b39550675c682e1c5740e5ff054df6 (patch) | |
tree | eae933451c196648c2018c188f3232156f7767c5 /src/gui/theme.cpp | |
parent | 2c8d567dfe173e6b0f652dc60f8e289c77200df2 (diff) | |
download | plus-41049787e0b39550675c682e1c5740e5ff054df6.tar.gz plus-41049787e0b39550675c682e1c5740e5ff054df6.tar.bz2 plus-41049787e0b39550675c682e1c5740e5ff054df6.tar.xz plus-41049787e0b39550675c682e1c5740e5ff054df6.zip |
Allow set width or height to zero in theme xmls. This mean image not exists.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 90c351476..067ececda 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -440,8 +440,10 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) partNode, "xpos", 0) + globalXPos; helper.yPos = XML::getProperty( partNode, "ypos", 0) + globalYPos; - helper.width = XML::getProperty(partNode, "width", 1); - helper.height = XML::getProperty(partNode, "height", 1); + helper.width = XML::getProperty(partNode, "width", 0); + helper.height = XML::getProperty(partNode, "height", 0); + if (!helper.width || !helper.height) + continue; helper.image = dBorders; helper.rect = border; |