Kaydet (Commit) f59c47fc authored tarafından Prashant Pandey's avatar Prashant Pandey Kaydeden (comit) Caolán McNamara

[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/5930Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e47c7970
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment