From 36a4348e0b714e4dbb9b99bc88b7f6ca40d58590 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 13 Sep 2007 15:33:18 +0000 Subject: INTEGRATION: CWS aquavclcarbonfixes (1.39.30); FILE MERGED 2007/09/03 10:02:29 hdu 1.39.30.2: #i80701# fix warning on wntmsci builds 2007/08/31 14:12:40 pl 1.39.30.1: #i80701# change dropdowns, add focus ring --- vcl/source/control/lstbox.cxx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index a6666acb86d8..0a2e7eb4992b 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -4,9 +4,9 @@ * * $RCSfile: lstbox.cxx,v $ * - * $Revision: 1.39 $ + * $Revision: 1.40 $ * - * last change: $Author: rt $ $Date: 2007-07-24 10:06:54 $ + * last change: $Author: ihi $ $Date: 2007-09-13 16:33:18 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -156,6 +156,25 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle ) GetBorder( nLeft, nTop, nRight, nBottom ); mnDDHeight = (USHORT)(GetTextHeight() + nTop + nBottom + 4); + // FIXME: this is currently only on mac/aqua + if( ImplGetSVData()->maNWFData.mbNoFocusRects && + IsNativeWidgetEnabled() && + IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) ) + { + ImplControlValue aControlValue; + Region aCtrlRegion( Rectangle( Point(), Size( 20, mnDDHeight ) ) ); + Region aBoundingRgn( aCtrlRegion ); + Region aContentRgn( aCtrlRegion ); + if( GetNativeControlRegion( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aCtrlRegion, + CTRL_STATE_ENABLED, aControlValue, rtl::OUString(), + aBoundingRgn, aContentRgn ) ) + { + sal_Int32 nHeight = aBoundingRgn.GetBoundRect().GetHeight(); + if( nHeight > mnDDHeight ) + mnDDHeight = static_cast(nHeight); + } + } + mpFloatWin = new ImplListBoxFloatingWindow( this ); mpFloatWin->SetAutoWidth( TRUE ); mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) ); -- cgit v1.2.3