mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
Add tooltips to ColorBar buttons
This commit is contained in:
parent
62a3594598
commit
352eff2fd6
@ -44,6 +44,7 @@
|
||||
#include "ui/separator.h"
|
||||
#include "ui/splitter.h"
|
||||
#include "ui/system.h"
|
||||
#include "ui/tooltips.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user