summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-06-06 17:14:53 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-06-06 15:48:19 +0200
commit302a00a3190743f5e6d2b61e5b40e493c4744b7e (patch)
tree21ce09afb0bc7a8aa678a009d9733a8ca0e7b528
parentb48672b3108488e2739a49e6f6e327a48c96ed70 (diff)
tdf#124947 fix hit area of the radio buttons, size in ios theme
The hit area of the radio buttons was not calculated correctly, so sometimes when you hit the radio button at the "wrong" place, nothing happened. This fixes the hit area to correctly cover the radio button and the text. Another issue was that the ios theme size of the radio button was not defined correctly (32px instead of 26px), which increased the error when calculating the hit are even more. The height of the radio button should be the same as defined in the definition.xml, and not bigger (or smaller). Change-Id: I4b03f36ca9d9c82bd6dc442bd6e06af938c62bdd Reviewed-on: https://gerrit.libreoffice.org/73592 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/source/control/button.cxx5
-rw-r--r--vcl/uiconfig/theme_definitions/ios/definition.xml2
2 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5ab14d2c2db2..864214b66e43 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2054,8 +2054,9 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle );
- rMouseRect = tools::Rectangle( aPos, aSize );
- rMouseRect.SetLeft( rPos.X() );
+ rMouseRect = tools::Rectangle(aPos, aSize);
+ rMouseRect.SetLeft(rPos.X());
+ rMouseRect.SetTop(rPos.Y());
rStateRect.SetLeft( rPos.X() );
rStateRect.SetTop( rMouseRect.Top() );
diff --git a/vcl/uiconfig/theme_definitions/ios/definition.xml b/vcl/uiconfig/theme_definitions/ios/definition.xml
index 61d6aa21578e..b0e26f01079c 100644
--- a/vcl/uiconfig/theme_definitions/ios/definition.xml
+++ b/vcl/uiconfig/theme_definitions/ios/definition.xml
@@ -85,7 +85,7 @@
</pushbutton>
<radiobutton>
- <part value="Entire" width="32" height="32">
+ <part value="Entire" width="26" height="26">
<state enabled="true" pressed="false" button-value="true">
<image source="tick-on.svg" />
</state>