Fix metric spinbox tool item size

Instead of guessing, use the CalcMinimumSize(), which also knows
about theming.

Change-Id: I747571b48c81166d11d03f99ab564b1a25165ef3
This commit is contained in:
Jan-Marek Glogowski
2016-10-08 14:51:32 +00:00
parent d72f2a5e91
commit f3fdd6ead7

View File

@@ -248,9 +248,7 @@ SvxMetricField::SvxMetricField(
, ePoolUnit(MapUnit::MapCM)
, mxFrame(rFrame)
{
Size aSize(GetTextWidth( "99,99mm" ),GetTextHeight());
aSize.Width() += 20;
aSize.Height() += 6;
Size aSize( CalcMinimumSize() );
SetSizePixel( aSize );
aLogicalSize = PixelToLogic(aSize, MapUnit::MapAppFont);
SetUnit( FUNIT_MM );