summaryrefslogtreecommitdiffstats
path: root/vcl/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-05 14:24:02 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-05 14:52:16 +0200
commit7b322f9aa315740625f265ce78dd06effd61531a (patch)
tree416754402fe3ed690c9fef5b34ba799a2fc03ad1 /vcl/source
parentClang:Null pointer passed as an argument to a 'nonnull' parameter (diff)
downloadcore-7b322f9aa315740625f265ce78dd06effd61531a.tar.gz
core-7b322f9aa315740625f265ce78dd06effd61531a.zip
paint Edit's native borders after background color
Change-Id: I3b5865d862ac7b9958d22d2ff1d3dc693cea2536
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/edit.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8c47e2c51555..2d5e53e489ea 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -556,7 +556,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
SetLineColor();
SetFillColor( GetControlBackground() );
- DrawRect( Rectangle( aPos, Size( GetOutputSizePixel().Width() - 2*mnXOffset, nTH ) ) );
+ DrawRect( Rectangle( aPos, Size( GetOutputSizePixel().Width() - 2*mnXOffset, GetOutputSizePixel().Height() ) ) );
Pop();
SetTextFillColor( GetControlBackground() );
@@ -566,6 +566,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
else
SetTextFillColor( IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor() );
+ ImplPaintBorder( 0, GetOutputSizePixel().Width() );
+
sal_Bool bDrawSelection = maSelection.Len() && ( HasFocus() || ( GetStyle() & WB_NOHIDESELECTION ) || mbActivePopup );
long nPos = nStart ? pDX[2*nStart] : 0;
@@ -1095,6 +1097,17 @@ void Edit::ImplClearBackground( long nXStart, long nXEnd )
aRect.Left() = nXStart;
aRect.Right() = nXEnd;
+ if( !(ImplUseNativeBorder( GetStyle() ) || IsPaintTransparent()) )
+ Erase( aRect );
+}
+
+void Edit::ImplPaintBorder( long nXStart, long nXEnd )
+{
+ Point aTmpPoint;
+ Rectangle aRect( aTmpPoint, GetOutputSizePixel() );
+ aRect.Left() = nXStart;
+ aRect.Right() = nXEnd;
+
if( ImplUseNativeBorder( GetStyle() ) || IsPaintTransparent() )
{
// draw the inner part by painting the whole control using its border window
@@ -1150,8 +1163,6 @@ void Edit::ImplClearBackground( long nXStart, long nXEnd )
}
}
- else
- Erase( aRect );
}
// -----------------------------------------------------------------------