diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-01-14 15:23:26 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-01-14 15:23:26 +0000 |
commit | 4e511d5d06e842f74101c73bf4a6e82aedb17595 (patch) | |
tree | 9cbfd00185852142ab9a70a6c5c4913f30913f70 /vcl/source | |
parent | 13f9e8cd00351a447e2635f60b7d37f0ebdb3c41 (diff) |
INTEGRATION: CWS aquavcl04 (1.264.36); FILE MERGED
2007/12/10 17:03:03 pl 1.264.36.3: RESYNC: (1.266-1.267); FILE MERGED
2007/12/03 10:33:53 pl 1.264.36.2: RESYNC: (1.264-1.266); FILE MERGED
2007/11/14 12:38:37 pl 1.264.36.1: #i83635# make some layeout space for native controls
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/window.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 544d09a23558..1522792346f2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -4,9 +4,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.270 $ + * $Revision: 1.271 $ * - * last change: $Author: kz $ $Date: 2007-12-13 11:04:26 $ + * last change: $Author: ihi $ $Date: 2008-01-14 16:23:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -339,6 +339,30 @@ void Window::ImplInitAppFontData( Window* pWindow ) pSVData->maGDIData.mnAppFontX = nTextWidth * 10 / 8; pSVData->maGDIData.mnAppFontY = nTextHeight * 10; + // FIXME: this is currently only on aqua, check with other + // platforms + if( pSVData->maNWFData.mbNoFocusRects ) + { + // try to find out wether there is a large correction + // of control sizes, if yes, make app font scalings larger + // so dialog positioning is not completely off + ImplControlValue aControlValue; + Region aCtrlRegion( Rectangle( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) ) ); + Region aBoundingRgn( aCtrlRegion ); + Region aContentRgn( aCtrlRegion ); + if( pWindow->GetNativeControlRegion( CTRL_EDITBOX, PART_ENTIRE_CONTROL, aCtrlRegion, + CTRL_STATE_ENABLED, aControlValue, rtl::OUString(), + aBoundingRgn, aContentRgn ) ) + { + Rectangle aContentRect( aContentRgn.GetBoundRect() ); + // comment: the magical +6 is for the extra border in bordered + // (which is the standard) edit fields + if( aContentRect.GetHeight() - nTextHeight > (nTextHeight+4)/4 ) + pSVData->maGDIData.mnAppFontY = (aContentRect.GetHeight()-4) * 10; + } + } + + pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX; if ( pSVData->maAppData.mnDialogScaleX ) pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100; |