summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/window.cpp18
-rw-r--r--src/gui/widgets/window.h8
2 files changed, 20 insertions, 6 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;
+}
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 12c40859a..00e3a817f 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -399,12 +399,14 @@ class Window : public gcn::Window, gcn::WidgetListener
void setCaptionFont(gcn::Font *font)
{ mCaptionFont = font; }
- int getOption(std::string name);
+ protected:
+ bool canMove();
+
+ int getOption(std::string name, int def = 0);
bool getOptionBool(std::string name);
- protected:
- bool canMove();
+ int getTitlePadding();
Skin *mSkin; /**< Skin in use by this window */