From 352eff2fd6715b21c69dbbb428eb5e687d302ffc Mon Sep 17 00:00:00 2001 From: David Capello Date: Sat, 9 May 2015 12:30:05 -0300 Subject: [PATCH] Add tooltips to ColorBar buttons --- src/app/ui/color_bar.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/ui/color_bar.cpp b/src/app/ui/color_bar.cpp index a6c0069fe..1279bc56e 100644 --- a/src/app/ui/color_bar.cpp +++ b/src/app/ui/color_bar.cpp @@ -44,6 +44,7 @@ #include "ui/separator.h" #include "ui/splitter.h" #include "ui/system.h" +#include "ui/tooltips.h" #include @@ -172,6 +173,15 @@ ColorBar::ColorBar(int align) m_buttons.addItem(theme->get_part(PART_PAL_PRESETS)); m_buttons.addItem(theme->get_part(PART_PAL_OPTIONS)); + // Tooltips + TooltipManager* tooltipManager = new TooltipManager(); + addChild(tooltipManager); + tooltipManager->addTooltipFor(m_buttons.getItem((int)PalButton::EDIT), "Edit Color", JI_BOTTOM); + tooltipManager->addTooltipFor(m_buttons.getItem((int)PalButton::SORT), "Sort & Gradients", JI_BOTTOM); + tooltipManager->addTooltipFor(m_buttons.getItem((int)PalButton::PRESETS), "Presets", JI_BOTTOM); + tooltipManager->addTooltipFor(m_buttons.getItem((int)PalButton::OPTIONS), "Options", JI_BOTTOM); + tooltipManager->addTooltipFor(&m_remapButton, "Matches old indexes with new indexes", JI_BOTTOM); + onColorButtonChange(getFgColor()); UIContext::instance()->addObserver(this);