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>
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5ab14d2..864214b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2054,8 +2054,9 @@
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 61d6aa2..b0e26f0 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>