summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/graphics/gui/dbutton.xml3
-rw-r--r--data/themes/jewelry/dbutton.xml3
-rw-r--r--src/touchmanager.cpp7
3 files changed, 9 insertions, 4 deletions
diff --git a/data/graphics/gui/dbutton.xml b/data/graphics/gui/dbutton.xml
index f6640dda3..ff625fcbb 100644
--- a/data/graphics/gui/dbutton.xml
+++ b/data/graphics/gui/dbutton.xml
@@ -2,8 +2,9 @@
<skinset name="Default" image="window.png">
<widget type="Window" xpos="486" ypos="232">
<option name="padding" value="20" />
+ <option name="clickborder" value="0" />
<option name="x" value="0" />
- <option name="y" value="0" />
+ <option name="y" value="10" />
<!-- Top Row -->
<part type="top-left-corner" xpos="0" ypos="0" width="10" height="5" />
diff --git a/data/themes/jewelry/dbutton.xml b/data/themes/jewelry/dbutton.xml
index e2c59b161..cf80579da 100644
--- a/data/themes/jewelry/dbutton.xml
+++ b/data/themes/jewelry/dbutton.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<skinset name="Default" image="window.png">
<widget type="Window" xpos="371" ypos="33">
+ <option name="clickborder" value="0" />
<option name="padding" value="20" />
<option name="x" value="0" />
- <option name="y" value="0" />
+ <option name="y" value="10" />
<!-- Top Row -->
<part type="top-left-corner" xpos="0" ypos="0" width="19" height="19" />
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp
index 18bcd4a0d..f18c8e12a 100644
--- a/src/touchmanager.cpp
+++ b/src/touchmanager.cpp
@@ -128,6 +128,9 @@ void TouchManager::loadTouchItem(TouchItem **item, std::string name,
y = skin->getOption("y", 10);
const int pad = skin->getPadding();
const int pad2 = 2 * pad;
+ const int border = skin->getOption("clickborder");
+ const int border2 = border * 2;
+ const int diff = pad - border;
switch (type)
{
case LEFT:
@@ -141,8 +144,8 @@ void TouchManager::loadTouchItem(TouchItem **item, std::string name,
default:
break;
}
- *item = new TouchItem(gcn::Rectangle(x, y,
- width + pad2, height + pad2), type,
+ *item = new TouchItem(gcn::Rectangle(x + diff, y + diff,
+ width + border2, height + border2), type,
eventPressed, eventReleased, images, icon,
x + pad, y + pad, width, height,
fAll, fPressed, fReleased, fOut);