diff options
author | Prashant Pandey <prashant3.yishu@gmail.com> | 2013-09-13 01:27:39 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-30 19:54:01 +0000 |
commit | 9379a922c07df3cdb7d567cc88dfaaa39ead3681 (patch) | |
tree | 63860ecc914cd63c673d31f751f52c66f2d004a2 /svx | |
parent | 8965bfda9753568a038303d9935f7a451282a857 (diff) |
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/5932
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/sidebar/line/LinePropertyPanel.cxx | 5 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 45c64d637440..d4e632e213c2 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -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; } } diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index b3e4fc7c0618..53376bf1d692 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -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) |