summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/theme.cpp12
-rw-r--r--src/gui/widgets/window.cpp5
2 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 54946984c..7331724d1 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -450,6 +450,8 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
int titlePadding = 4;
int titlebarHeight = 20;
int closePadding = 3;
+ int stickySpacing = 3;
+ int stickyPadding = 3;
int resizePadding = 2;
std::map<std::string, int> *const mOptions
= new std::map<std::string, int>();
@@ -507,6 +509,14 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
{
closePadding = XML::getProperty(partNode, "value", 3);
}
+ else if (name == "stickySpacing")
+ {
+ stickySpacing = XML::getProperty(partNode, "value", 3);
+ }
+ else if (name == "stickyPadding")
+ {
+ stickyPadding = XML::getProperty(partNode, "value", 3);
+ }
else if (name == "titlebarHeight")
{
titlebarHeight = XML::getProperty(
@@ -536,6 +546,8 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
dBorders->decRef();
(*mOptions)["closePadding"] = closePadding;
+ (*mOptions)["stickyPadding"] = stickyPadding;
+ (*mOptions)["stickySpacing"] = stickySpacing;
(*mOptions)["titlebarHeight"] = titlebarHeight;
(*mOptions)["resizePadding"] = resizePadding;
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();
}