[Libreoffice-commits] .: basctl/source vcl/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Thu Aug 16 01:23:24 PDT 2012


 basctl/source/basicide/baside2.cxx |    9 +++++
 vcl/source/window/split.cxx        |   56 +++++++++++++------------------------
 2 files changed, 30 insertions(+), 35 deletions(-)

New commits:
commit 9658704fc4c691dfea7411eb36951ddc5154538a
Author: Jean-Tiare LE BIGOT <admin at jtlebi.fr>
Date:   Sun Aug 12 17:08:16 2012 -0400

    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

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index fa2b050..3d2bfd8 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1397,6 +1397,15 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
 {
     SetBackground(GetSettings().GetStyleSettings().GetWindowColor());
 
+    Color splitterColor(GetSettings().GetStyleSettings().GetShadowColor());
+
+    aLeftSplit.SetLineColor(splitterColor);
+    aLeftSplit.SetFillColor(splitterColor);
+    aBottomSplit.SetLineColor(splitterColor);
+    aBottomSplit.SetFillColor(splitterColor);
+    aVertSplit.SetLineColor(splitterColor);
+    aVertSplit.SetFillColor(splitterColor);
+
     aLeftSplit.Show();
     aBottomSplit.Show();
     aVertSplit.Show();
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index ac2e9f7..d958c29 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 );
     }
 }
 


More information about the Libreoffice-commits mailing list