From aac1da796aa1fc1a01a0cd8a6fac7d668a8c259e Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sun, 1 Dec 2013 13:24:54 +0200 Subject: fdo#71748 Fix color pickers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit includes the following changes: 1) Remove boxes from PNG files, and draw them ourselves. This will ensure that the color rec will always fit the box. Also it will make all color pickers look the same, and greatly simplify the code. (a part of the code was not reachable anyway.) 2) Fix color preview for toolbar large icons. (a regression of commit f59c47fc1e79050d3342924e6173b0f4b6ddaf02.) 3) Fix sidebar paragraph color picker initial drawing. reset should be called *after* the icon assignment. Change-Id: I13ae02bc3dd68dd14877ccc949784072c58bf211 Reviewed-on: https://gerrit.libreoffice.org/6882 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit e239f372c6abcd8371d0a666c828bf1c31195dd4) --- svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'svx/source/sidebar/paragraph/ParaPropertyPanel.cxx') diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 2457bcfc967a..dbb63b1c9608 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -345,9 +345,8 @@ void ParaPropertyPanel::InitToolBoxBGColor() { const sal_uInt16 nIdBackColor = mpTBxBackColor->GetItemId(UNO_PARABACKCOLOR); - mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_BACKGROUND_COLOR, nIdBackColor, mpTBxBackColor)); - mpTBxBackColor->SetItemImage(nIdBackColor, GetDisplayBackground().GetColor().IsDark()? maImgBackColorHigh : maImgBackColor); + mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(SID_BACKGROUND_COLOR, nIdBackColor, mpTBxBackColor)); mpTBxBackColor->SetItemBits( nIdBackColor, mpTBxBackColor->GetItemBits( nIdBackColor ) | TIB_DROPDOWNONLY ); Link aLink = LINK(this, ParaPropertyPanel, ToolBoxBackColorDDHandler); -- cgit v1.2.3