diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-06 23:12:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-06 23:12:03 +0300 |
commit | 3aead4aa07f2b28c5a4d567d6ab53783a9de5556 (patch) | |
tree | 14d8771a03104fe629f0d81d8bd2a199af04f17c /src/gui/theme.cpp | |
parent | 4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (diff) | |
download | manaplus-3aead4aa07f2b28c5a4d567d6ab53783a9de5556.tar.gz manaplus-3aead4aa07f2b28c5a4d567d6ab53783a9de5556.tar.bz2 manaplus-3aead4aa07f2b28c5a4d567d6ab53783a9de5556.tar.xz manaplus-3aead4aa07f2b28c5a4d567d6ab53783a9de5556.zip |
Add theme option for title bar height.
Option name: titlebarHeight
Default value: 20 px
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 26d1e7402..2d21f1a2b 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -431,6 +431,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) memset(&images, 0, sizeof(ImageRect)); int padding = 3; int titlePadding = 4; + int titlebarHeight = 20; int closePadding = 3; std::map<std::string, int> *const mOptions = new std::map<std::string, int>(); @@ -488,6 +489,11 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) { closePadding = XML::getProperty(partNode, "value", 3); } + else if (name == "titlebarHeight") + { + titlebarHeight = XML::getProperty( + partNode, "value", 16); + } else { (*mOptions)[name] = XML::getProperty( @@ -507,8 +513,9 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) dBorders->decRef(); (*mOptions)["closePadding"] = closePadding; + (*mOptions)["titlebarHeight"] = titlebarHeight; - Skin *const skin = new Skin(border, images, filename, "", padding, + Skin *const skin = new Skin(border, images, filename, "", padding, titlePadding, mOptions); skin->updateAlpha(mMinimumOpacity); return skin; |