summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-21 20:16:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-21 20:16:36 +0300
commit80f7177ea4ce0185e1ef3355e91dcf14617d0f09 (patch)
tree78e8453d25645b85f2610a504b4a248acee5fb9c /src/gui/widgets/window.cpp
parentc5327f3b1d10171ff2a97546ea49e350b1725c24 (diff)
parent0dd6ab2bfdee4527ca0960b4e7a64e257bb93fa3 (diff)
downloadplus-80f7177ea4ce0185e1ef3355e91dcf14617d0f09.tar.gz
plus-80f7177ea4ce0185e1ef3355e91dcf14617d0f09.tar.bz2
plus-80f7177ea4ce0185e1ef3355e91dcf14617d0f09.tar.xz
plus-80f7177ea4ce0185e1ef3355e91dcf14617d0f09.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 02f6cf35e..963288a03 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);
}
}
@@ -238,7 +239,10 @@ void Window::draw(gcn::Graphics *graphics)
const Image *const button = mSkin->getCloseImage(
mResizeHandles == CLOSE);
if (button)
- g->calcTile(mVertexes, button, mCloseRect.x, mCloseRect.y);
+ {
+ g->calcTileCollection(mVertexes, button,
+ mCloseRect.x, mCloseRect.y);
+ }
}
// Draw Sticky Button
if (mStickyButton)
@@ -246,19 +250,22 @@ void Window::draw(gcn::Graphics *graphics)
const Image *const button = mSkin->getStickyImage(mSticky);
if (button)
{
- g->calcTile(mVertexes, button,
+ g->calcTileCollection(mVertexes, button,
mStickyRect.x, mStickyRect.y);
}
}
if (mGrip)
- g->calcTile(mVertexes, mGrip, mGripRect.x, mGripRect.y);
+ {
+ g->calcTileCollection(mVertexes, mGrip,
+ mGripRect.x, mGripRect.y);
+ }
}
else
{
mLastRedraw = false;
}
- g->drawTile(mVertexes);
+ g->drawTileCollection(mVertexes);
}
else
{
@@ -271,18 +278,18 @@ void Window::draw(gcn::Graphics *graphics)
const Image *const button = mSkin->getCloseImage(
mResizeHandles == CLOSE);
if (button)
- g->drawImage(button, mCloseRect.x, mCloseRect.y);
+ DRAW_IMAGE(g, button, mCloseRect.x, mCloseRect.y);
}
// Draw Sticky Button
if (mStickyButton)
{
const Image *const button = mSkin->getStickyImage(mSticky);
if (button)
- g->drawImage(button, mStickyRect.x, mStickyRect.y);
+ DRAW_IMAGE(g, button, mStickyRect.x, mStickyRect.y);
}
if (mGrip)
- g->drawImage(mGrip, mGripRect.x, mGripRect.y);
+ DRAW_IMAGE(g, mGrip, mGripRect.x, mGripRect.y);
}
// Draw title
@@ -1219,11 +1226,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