diff options
author | Prashant Pandey <prashant3.yishu@gmail.com> | 2013-09-12 14:54:08 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-18 10:29:15 +0000 |
commit | f59c47fc1e79050d3342924e6173b0f4b6ddaf02 (patch) | |
tree | c1dba831cebbd0d797fd9270d24ecd7181e90d0e /svx | |
parent | DOCX styles: Generate the styleIds similar ways as MSO does. (diff) | |
download | core-f59c47fc1e79050d3342924e6173b0f4b6ddaf02.tar.gz core-f59c47fc1e79050d3342924e6173b0f4b6ddaf02.zip |
[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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 289395868748..b3e4fc7c0618 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 ); |