Drop down button in ColorBar switches (open/close) the PalettePopup

This commit is contained in:
David Capello 2014-04-17 14:38:21 -03:00
parent 6b53e46108
commit 3466d17d27

View File

@ -189,11 +189,16 @@ void ColorBar::onPaletteButtonClick()
void ColorBar::onPaletteButtonDropDownClick()
{
if (!m_palettePopup.isVisible()) {
gfx::Rect bounds = m_paletteButton.getBounds();
m_palettePopup.showPopup(
gfx::Rect(bounds.x+bounds.w, bounds.y,
JI_SCREEN_W/2, JI_SCREEN_H/2));
}
else {
m_palettePopup.closeWindow(NULL);
}
}
void ColorBar::onPaletteIndexChange(int index)