summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-04-12 11:18:53 +0000
committerOliver Bolte <obo@openoffice.org>2005-04-12 11:18:53 +0000
commit0a03d42bdbdbf2c026a3f764d904f8b9a38d5a1d (patch)
tree3ff58acf10db314df0ce1cdf84b242a89a4da9b4 /vcl
parent2e00c78dc432db65942963d78fd5b60eb3235ad4 (diff)
INTEGRATION: CWS vclfinal01 (1.50.122); FILE MERGED
2005/04/04 17:34:32 pl 1.50.122.1: #i46636# fix HAS_BACKGROUND_TEXTURE handling for comboboxes and listboxes
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/ilstbox.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 12f2a35de7c5..390c62ef786b 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ilstbox.cxx,v $
*
- * $Revision: 1.50 $
+ * $Revision: 1.51 $
*
- * last change: $Author: rt $ $Date: 2004-11-26 20:41:57 $
+ * last change: $Author: obo $ $Date: 2005-04-12 12:18:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2645,7 +2645,7 @@ void ImplWin::ImplDraw( bool bLayout )
if( ! bLayout )
{
if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL)
- && ! IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) )
+ && IsNativeControlSupported(CTRL_LISTBOX, HAS_BACKGROUND_TEXTURE) )
{
// Repaint the (focused) area similarly to
// ImplSmallBorderWindowView::DrawWindow() in
@@ -2678,6 +2678,17 @@ void ImplWin::ImplDraw( bool bLayout )
if( bMouseOver )
nState |= CTRL_STATE_ROLLOVER;
+ // if parent has no border, then nobody has drawn the background
+ // since no border window exists. so draw it here.
+ WinBits nParentStyle = pWin->GetStyle();
+ if( ! (nParentStyle & WB_BORDER) || (nParentStyle & WB_NOBORDER) )
+ {
+ Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() );
+ Region aParentReg( aParentRect );
+ pWin->DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aParentReg,
+ nState, aControlValue, rtl::OUString() );
+ }
+
bNativeOK = DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
}