summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-16 09:42:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-16 10:48:19 +0200
commit0ea4515cf252069ccbc22847ab5f8262a8de0243 (patch)
treeb04a223b1a32f3d54017b29a125271c5c3220635
parente4df40e62e81b9f36327d5436e0228730143c240 (diff)
Resolves: tdf#108419 use spinfield preferred size as transparency widget size
Change-Id: I7b5c8aeb087efe007c687dc1f206bcb0e8b0173e Reviewed-on: https://gerrit.libreoffice.org/38865 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 19a41f4e6f2d..7392ab25a906 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -92,11 +92,8 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString&
maCommand( rCmd ),
mxFrame( rFrame )
{
- Size aSize( GetTextWidth( "-100 %" ), GetTextHeight() );
-
- aSize.Width() += 20;
- aSize.Height() += 6;
- SetSizePixel( aSize );
+ Size aSize(CalcMinimumSizeForText("-100 %"));
+ SetSizePixel(aSize);
if ( maCommand == ".uno:GrafGamma" )
{