summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-18 12:32:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-18 14:08:08 +0000
commit079852ce8fd9d45f3cc02829c03d0ca6ddd20aa7 (patch)
tree91d691f1b3c930eff9d9d51c23ab181ce3338a3f /vcl
parent52f7dfefde8d989032ea056f4cdba11cddde1f7c (diff)
scaling the width gives huge spaces at the end of long buttons
e.g. in the alien warn dialog Change-Id: I2e3acddb67b480d4d63a3f4cc77252886e0c9a1c
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/button.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a8407350ccf0..085c932a71e0 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1706,14 +1706,14 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
sal_uLong nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
- aSize.Width() += int( textSize.Width () * 1.15 );
- aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
+ aSize.Width() += textSize.Width();
+ aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
}
// cf. ImplDrawPushButton ...
if( (GetStyle() & WB_SMALLSTYLE) == 0 )
{
- aSize.Width() += 12;
+ aSize.Width() += 24;
aSize.Height() += 12;
}