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

Sidebar: Show default line-color in 'Draw'

Currently, the default color shown in Sidebar>Line>Color
is yellow and is not updated until and unless one hovers a
mouse on top of it. This is wrong and the default color of
the line-color should be updated and shown by default.

Change-Id: I213cba84a0fc726220acfe547955a96d6bb4446b
Reviewed-on: https://gerrit.libreoffice.org/5932Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8965bfda
......@@ -337,6 +337,9 @@ void LinePropertyPanel::NotifyItemUpdate(
(void)bIsEnabled;
const bool bDisabled(SFX_ITEM_DISABLED == eState);
// By default, fill and show the color of existing line-color
mpColorUpdater->Update( maColor );
switch(nSID)
{
case SID_ATTR_LINE_COLOR:
......@@ -359,7 +362,7 @@ void LinePropertyPanel::NotifyItemUpdate(
{
maColor = pItem->GetColorValue();
mbColorAvailable = true;
mpColorUpdater->Update(maColor);
mpColorUpdater->Update( maColor );
break;
}
}
......
......@@ -92,7 +92,11 @@ namespace svx
if( aColor.GetColor() == COL_AUTO )
aColor = Color( COL_TRANSPARENT );
if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged )
// For a shape selected in 'Draw', when color selected in Sidebar > Line > Color
// is COL_BLACK, then (maCurColor != aColor) becomes 'false', therefore we take
// explicit care of COL_BLACK from the last argument in the condition so that the
// Update() does its routine job appropriately !
if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged || ( aColor == COL_BLACK ) )
{
// create an empty bitmap, and copy the original bitmap inside
// (so that it grows in case the original bitmap was smaller)
......
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