summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-05 03:13:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-05 03:13:43 +0300
commite3b9d60938b1299f2f66e68ff291060654c58d66 (patch)
tree28425cf579903d6735faa801a6968b56abdc7230 /src/gui/widgets/window.cpp
parent10c8e7da87de2219fad19fd899e97257164e4830 (diff)
downloadManaVerse-e3b9d60938b1299f2f66e68ff291060654c58d66.tar.gz
ManaVerse-e3b9d60938b1299f2f66e68ff291060654c58d66.tar.bz2
ManaVerse-e3b9d60938b1299f2f66e68ff291060654c58d66.tar.xz
ManaVerse-e3b9d60938b1299f2f66e68ff291060654c58d66.zip
Move some hardcoded paddings to themes.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index bfb4d883c..685d64155 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -1023,11 +1023,16 @@ gcn::Rectangle Window::getWindowArea()
getHeight() - getPadding() * 2);
}
-int Window::getOption(std::string name)
+int Window::getOption(std::string name, int def)
{
if (mSkin)
- return mSkin->getOption(name);
- return 0;
+ {
+ int val = mSkin->getOption(name);
+ if (val)
+ return val;
+ return def;
+ }
+ return def;
}
bool Window::getOptionBool(std::string name)
@@ -1036,3 +1041,10 @@ bool Window::getOptionBool(std::string name)
return mSkin->getOption(name) != 0;
return 0;
}
+
+int Window::getTitlePadding()
+{
+ if (mSkin)
+ mSkin->getTitlePadding();
+ return 4;
+}