summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-09-13 15:33:05 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-09-13 15:33:05 +0000
commit0f9bea4a9b0b027fdab0f8e6731062def4a14e69 (patch)
tree4e0a26d1577d7f6d19bb0611f0d2b54764db7196 /vcl/source
parent8d86cff085efa878af7e8e841996d946336a7ad7 (diff)
INTEGRATION: CWS aquavclcarbonfixes (1.60.32); FILE MERGED
2007/08/31 14:12:40 pl 1.60.32.1: #i80701# change dropdowns, add focus ring
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/ilstbox.cxx39
1 files changed, 35 insertions, 4 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index f81fae643fae..c606a62e03c0 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ilstbox.cxx,v $
*
- * $Revision: 1.60 $
+ * $Revision: 1.61 $
*
- * last change: $Author: rt $ $Date: 2007-07-24 10:06:42 $
+ * last change: $Author: ihi $ $Date: 2007-09-13 16:33:05 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2807,7 +2807,17 @@ void ImplWin::Resize()
void ImplWin::GetFocus()
{
ShowFocus( maFocusRect );
- Invalidate();
+ if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
+ IsNativeWidgetEnabled() &&
+ IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
+ {
+ Window* pWin = GetParent()->GetWindow( WINDOW_BORDER );
+ if( ! pWin )
+ pWin = GetParent();
+ pWin->Invalidate();
+ }
+ else
+ Invalidate();
Control::GetFocus();
}
@@ -2816,7 +2826,17 @@ void ImplWin::GetFocus()
void ImplWin::LoseFocus()
{
HideFocus();
- Invalidate();
+ if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
+ IsNativeWidgetEnabled() &&
+ IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
+ {
+ Window* pWin = GetParent()->GetWindow( WINDOW_BORDER );
+ if( ! pWin )
+ pWin = GetParent();
+ pWin->Invalidate();
+ }
+ else
+ Invalidate();
Control::LoseFocus();
}
@@ -3007,6 +3027,17 @@ void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
Size aSz = GetParent()->GetSizePixel();
Point aPos = GetParent()->GetPosPixel();
aPos = GetParent()->GetParent()->OutputToScreenPixel( aPos );
+ // FIXME: this ugly hack is for Mac/Aqua
+ // should be replaced by a real mechanism to place the float rectangle
+ if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
+ GetParent()->IsNativeWidgetEnabled() )
+ {
+ sal_Int32 nLeft = 4, nTop = 4, nRight = 4, nBottom = 4;
+ aPos.X() += nLeft;
+ aPos.Y() += nTop;
+ aSz.Width() -= nLeft + nRight;
+ aSz.Height() -= nTop + nBottom;
+ }
Rectangle aRect( aPos, aSz );
// check if the control's parent is un-mirrored which is the case for form controls in a mirrored UI