diff options
-rw-r--r-- | src/gui/widgets/window.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 02f6cf35e..5148ec3f5 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -142,6 +142,7 @@ Window::Window(const std::string &caption, const bool modal, mTitleBarHeight += getOption("titlebarHeightRelative"); setPalette(getOption("palette")); childPalette = getOption("childPalette"); + mShowTitle = getOptionBool("showTitle", true); } } @@ -1219,11 +1220,11 @@ int Window::getOption(const std::string &name, const int def) const return def; } -bool Window::getOptionBool(const std::string &name) const +bool Window::getOptionBool(const std::string &name, const bool def) const { if (mSkin) - return mSkin->getOption(name) != 0; - return 0; + return mSkin->getOption(name, def) != 0; + return def; } #ifdef USE_PROFILER diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index ebc44e584..cad035a1e 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -431,9 +431,10 @@ class Window : public gcn::Window, int getOption(const std::string &name, const int def = 0) const A_WARN_UNUSED; - bool getOptionBool(const std::string &name) const A_WARN_UNUSED; + bool getOptionBool(const std::string &name, + const bool def = false) const A_WARN_UNUSED; - void setTitlePadding(int p) + void setTitlePadding(const int p) { mTitlePadding = p; } int getTitlePadding() const A_WARN_UNUSED |