From c6e6d3fe95db4250a6760fca437423ad203390ed Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 27 Jun 2011 21:43:33 -0300 Subject: [PATCH] Avoid to start with both colors selected (FG & BG) at the start in the color-bar. --- src/widgets/color_bar.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/widgets/color_bar.cpp b/src/widgets/color_bar.cpp index 7a8171d44..8d66e78df 100644 --- a/src/widgets/color_bar.cpp +++ b/src/widgets/color_bar.cpp @@ -115,10 +115,15 @@ ColorBar::ColorBar(int align) m_fgColor.Change.connect(&ColorBar::onFgColorButtonChange, this); m_bgColor.Change.connect(&ColorBar::onBgColorButtonChange, this); - // Get selected colors - setFgColor(get_config_color("ColorBar", "FG", getFgColor())); + // Set background color reading its value from the configuration. setBgColor(get_config_color("ColorBar", "BG", getBgColor())); + // Clear the selection of the BG color in the palette. + m_paletteView.clearSelection(); + + // Set foreground color reading its value from the configuration. + setFgColor(get_config_color("ColorBar", "FG", getFgColor())); + // Change color-bar background color (not ColorBar::setBgColor) Widget::setBgColor(((SkinTheme*)getTheme())->get_tab_selected_face_color()); m_paletteView.setBgColor(((SkinTheme*)getTheme())->get_tab_selected_face_color());