summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-28 02:49:12 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-28 02:49:12 +0300
commit170b471c8e43c3c3ed07d0ff15f9165ae57efe4a (patch)
treebab48e784ca8d7d46dc77d925686ec6101b1982f /src/gui/theme.cpp
parentd1623c79377c31f5d93022e302952c94936a5b9a (diff)
downloadmanaverse-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.gz
manaverse-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.bz2
manaverse-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.xz
manaverse-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.zip
Extend window theming.
New theme options: stickyPadding - padding for sticky button from top. stickySpacing - space between sticky button and close button. By default both parameters is 3.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 54946984c..7331724d1 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -450,6 +450,8 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
int titlePadding = 4;
int titlebarHeight = 20;
int closePadding = 3;
+ int stickySpacing = 3;
+ int stickyPadding = 3;
int resizePadding = 2;
std::map<std::string, int> *const mOptions
= new std::map<std::string, int>();
@@ -507,6 +509,14 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
{
closePadding = XML::getProperty(partNode, "value", 3);
}
+ else if (name == "stickySpacing")
+ {
+ stickySpacing = XML::getProperty(partNode, "value", 3);
+ }
+ else if (name == "stickyPadding")
+ {
+ stickyPadding = XML::getProperty(partNode, "value", 3);
+ }
else if (name == "titlebarHeight")
{
titlebarHeight = XML::getProperty(
@@ -536,6 +546,8 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
dBorders->decRef();
(*mOptions)["closePadding"] = closePadding;
+ (*mOptions)["stickyPadding"] = stickyPadding;
+ (*mOptions)["stickySpacing"] = stickySpacing;
(*mOptions)["titlebarHeight"] = titlebarHeight;
(*mOptions)["resizePadding"] = resizePadding;