summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-28 02:49:12 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-28 02:49:12 +0300
commit170b471c8e43c3c3ed07d0ff15f9165ae57efe4a (patch)
treebab48e784ca8d7d46dc77d925686ec6101b1982f /src/gui/widgets
parentd1623c79377c31f5d93022e302952c94936a5b9a (diff)
downloadmanaplus-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.gz
manaplus-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.bz2
manaplus-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.tar.xz
manaplus-170b471c8e43c3c3ed07d0ff15f9165ae57efe4a.zip
Extend window theming.
New theme options: stickyPadding - padding for sticky button from top. stickySpacing - space between sticky button and close button. By default both parameters is 3.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/window.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 1a6eb334c..01d2bb923 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -421,12 +421,13 @@ void Window::widgetResized(const gcn::Event &event A_UNUSED)
const Image *const button = mSkin->getStickyImage(mSticky);
if (button)
{
- int x = mDimension.width - button->getWidth() - closePadding;
+ int x = mDimension.width - button->getWidth()
+ - getOption("stickySpacing");
if (showClose)
x -= mSkin->getCloseImage(false)->getWidth() + closePadding;
mStickyRect.x = x;
- mStickyRect.y = closePadding;
+ mStickyRect.y = getOption("stickyPadding");
mStickyRect.width = button->getWidth();
mStickyRect.height = button->getHeight();
}