From 9658704fc4c691dfea7411eb36951ddc5154538a Mon Sep 17 00:00:00 2001 From: Jean-Tiare LE BIGOT Date: Sun, 12 Aug 2012 17:08:16 -0400 Subject: Set ide sizer color to dark grey; was dark black The color setting was picked from SplitWindow::Paint() for visual consistency with the sizers used in Impress for example. This commit also resurects presumably dead code. In fact GDB let me see that only the short path was taken. This has an impact on Calc's window splitters and on more visibly on the basic IDE which now looks much nicer :) EDITS: restricted this commit impact to IDE as a poc Change-Id: I9a051fd894feccff4bbc7db7efe1160cb2c3a2c6 --- vcl/source/window/split.cxx | 56 +++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index ac2e9f7cb41e..d958c298263e 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -158,6 +158,9 @@ Splitter::Splitter( Window* pParent, WinBits nStyle ) : { ImplInitSplitterData(); ImplInit( pParent, nStyle ); + + SetLineColor(); + SetFillColor(); } // ----------------------------------------------------------------------- @@ -171,6 +174,9 @@ Splitter::Splitter( Window* pParent, const ResId& rResId ) : ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); + SetLineColor(); + SetFillColor(); + if ( !(nStyle & WB_HIDE) ) Show(); } @@ -748,46 +754,26 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt ) void Splitter::Paint( const Rectangle& rPaintRect ) { - if( HasFocus() || mbKbdSplitting ) - { - Color oldFillCol = GetFillColor(); - Color oldLineCol = GetLineColor(); - - SetLineColor(); - SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() ); - DrawRect( rPaintRect ); - - Color aSelectionBorderCol( GetSettings().GetStyleSettings().GetActiveColor() ); - SetFillColor( aSelectionBorderCol ); - SetLineColor(); - - Polygon aPoly( rPaintRect ); - PolyPolygon aPolyPoly( aPoly ); - DrawTransparent( aPolyPoly, 85 ); + DrawRect( rPaintRect ); - SetLineColor( aSelectionBorderCol ); - SetFillColor(); + Polygon aPoly( rPaintRect ); + PolyPolygon aPolyPoly( aPoly ); + DrawTransparent( aPolyPoly, 85 ); - if( mbKbdSplitting ) - { - LineInfo aInfo( LINE_DASH ); - //aInfo.SetDashLen( 2 ); - //aInfo.SetDashCount( 1 ); - aInfo.SetDistance( 1 ); - aInfo.SetDotLen( 2 ); - aInfo.SetDotCount( 1 ); - - DrawPolyLine( aPoly, aInfo ); - } - else - DrawRect( rPaintRect ); - - SetFillColor( oldFillCol); - SetLineColor( oldLineCol); + if( mbKbdSplitting ) + { + LineInfo aInfo( LINE_DASH ); + //aInfo.SetDashLen( 2 ); + //aInfo.SetDashCount( 1 ); + aInfo.SetDistance( 1 ); + aInfo.SetDotLen( 2 ); + aInfo.SetDotCount( 3 ); + + DrawPolyLine( aPoly, aInfo ); } else { - Window::Paint( rPaintRect ); + DrawRect( rPaintRect ); } } -- cgit v1.2.3