Now ColorBar buttons are reduced when the width is too small

This commit is contained in:
David Capello 2016-09-09 20:22:24 -03:00
parent 311d27078f
commit 954b45dd23

View File

@ -183,12 +183,7 @@ ColorBar::ColorBar(int align)
setColorSelector( setColorSelector(
Preferences::instance().colorBar.selector()); Preferences::instance().colorBar.selector());
Box* buttonsBox = new HBox(); addChild(&m_buttons);
buttonsBox->addChild(&m_buttons);
m_buttons.setMaxSize(gfx::Size(m_buttons.maxSize().w,
16*ui::guiscale()));
addChild(buttonsBox);
addChild(&m_splitter); addChild(&m_splitter);
HBox* fgBox = new HBox; HBox* fgBox = new HBox;
@ -238,6 +233,8 @@ ColorBar::ColorBar(int align)
m_buttons.addItem(theme->parts.palSort()); m_buttons.addItem(theme->parts.palSort());
m_buttons.addItem(theme->parts.palPresets()); m_buttons.addItem(theme->parts.palPresets());
m_buttons.addItem(theme->parts.palOptions()); m_buttons.addItem(theme->parts.palOptions());
m_buttons.setMaxSize(gfx::Size(m_buttons.sizeHint().w,
16*ui::guiscale()));
// Tooltips // Tooltips
TooltipManager* tooltipManager = new TooltipManager(); TooltipManager* tooltipManager = new TooltipManager();