+ if (popup_) {
+ popup_->set_position(mapToGlobal(rect().center()), Popup::Bottom);
+ popup_->show();
+ } else {
+ QColorDialog dlg(this);
+ dlg.setOption(QColorDialog::ShowAlphaChannel);
+ dlg.setOption(QColorDialog::DontUseNativeDialog);
+ connect(&dlg, SIGNAL(colorSelected(const QColor)),
+ this, SLOT(on_color_selected(const QColor)));
+ dlg.setCurrentColor(cur_color_);
+ dlg.exec();
+ }