[Libreoffice-commits] core.git: svx/source

Prashant Pandey prashant3.yishu at gmail.com
Wed Sep 18 03:29:34 PDT 2013


 svx/source/tbxctrls/tbxcolorupdate.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit f59c47fc1e79050d3342924e6173b0f4b6ddaf02
Author: Prashant Pandey <prashant3.yishu at gmail.com>
Date:   Thu Sep 12 14:54:08 2013 +0530

    [Sidebar]: Fix the vague behaviour of color fill toolbox in Draw
    
    Currently, in 'Draw' when we make any object, say a rectangle and fill
    color inside it, then in the sidebar 'Fill and Controls', the color of
    the rectangle made is shown over the entire button. This is vague and
    the color is to be shown such that it is only filled inside the color-
    button appropriately.
    
    Change-Id: I31502a2931364d83569ff04f9ee8429bfe2225ad
    Reviewed-on: https://gerrit.libreoffice.org/5930
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 2893958..b3e4fc7 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -36,7 +36,7 @@ namespace svx
     /* Note:
        The initial color shown on the button is set in /core/svx/source/tbxctrls/tbxcolorupdate.cxx
        (ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) .
-       The initial color used by the button is set in /core/svx/source/tbxcntrls/tbcontrl.cxx
+       The initial color used by the button is set in /core/svx/source/tbxctrls/tbcontrl.cxx
        (SvxColorExtToolBoxControl::SvxColorExtToolBoxControl())
        and in case of writer for text(background)color also in /core/sw/source/ui/docvw/edtwin.cxx
        (SwEditWin::aTextBackColor and SwEditWin::aTextBackColor)
@@ -148,7 +148,16 @@ namespace svx
                     maUpdRect.Bottom() = maBmpSize.Height() - 3;
                 }
                 else
-                    maUpdRect = Rectangle( Point( 1, maBmpSize.Height() - 7 ), Size( maBmpSize.Width() - 2 ,6 ) );
+                {
+                    maUpdRect = Rectangle( Point( 0, 0 ), Size( maBmpSize.Width(), maBmpSize.Height() ) );
+
+                    // Now, fit the selected color inside the toolbox color-rectangle such that
+                    // the distinct boundaries of the rectangle of toolbox are also clearly visible.
+                    maUpdRect.Left() += 21;
+                    maUpdRect.Top() += 1;
+                    maUpdRect.Bottom() -= 1;
+                    maUpdRect.Right() -= 4;
+                }
 
                 pBmpAcc->DrawRect( maUpdRect );
 


More information about the Libreoffice-commits mailing list