summaryrefslogtreecommitdiff
path: root/vcl/aqua
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2010-12-08 19:15:37 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2010-12-08 19:15:37 +0100
commit623ab0e0da586fd1d9d756f59f4655a736896bb7 (patch)
treeff22e1cb476151de01ae8eeec3bceb025b6eea0e /vcl/aqua
parent7cbfd9da26a31ca6f32eea39f71af00590d4a93b (diff)
vcl118: #i115837# add a murphy factor to checkbox width
Diffstat (limited to 'vcl/aqua')
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index d19290d8320a..c6703b58be88 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -813,7 +813,6 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
[pBtn setEnabled: NO];
linebreakCell( [pBtn cell], rText );
[pBtn sizeToFit];
- [pCurParent addSubview: [pBtn autorelease]];
rRightColumn.push_back( ColumnItem( pBtn ) );
@@ -825,10 +824,17 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
[pBtn setTag: nTag];
aCheckRect = [pBtn frame];
+ // #i115837# add a murphy factor; it can apparently occasionally happen
+ // that sizeToFit does not a perfect job and that the button linebreaks again
+ // if - and only if - there is already a '\n' contained in the text and the width
+ // is minimally of
+ aCheckRect.size.width += 1;
// move to rCurY
aCheckRect.origin.y = rCurY - aCheckRect.size.height;
[pBtn setFrame: aCheckRect];
+
+ [pCurParent addSubview: [pBtn autorelease]];
// update rCurY
rCurY = aCheckRect.origin.y - 5;