From e3b9d60938b1299f2f66e68ff291060654c58d66 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Aug 2012 03:13:43 +0300 Subject: Move some hardcoded paddings to themes. --- src/gui/widgets/window.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/window.cpp') 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; +} -- cgit v1.2.3-60-g2f50