[core] Add new parameter to BaseApp/Preferences/Dialog called DontUseNativeColorDialog, default to true
This commit is contained in:
@@ -782,7 +782,11 @@ void ColorButton::onChooseColor()
|
||||
if (d->modal) {
|
||||
QColor currentColor = d->col;
|
||||
QColorDialog cd(d->col, this);
|
||||
cd.setOptions(QColorDialog::DontUseNativeDialog);
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Dialog");
|
||||
bool notNativeColorDialog = group->GetBool("DontUseNativeColorDialog", true);
|
||||
if (notNativeColorDialog)
|
||||
cd.setOptions(QColorDialog::DontUseNativeDialog);
|
||||
cd.setOption(QColorDialog::ColorDialogOption::ShowAlphaChannel, d->allowTransparency);
|
||||
|
||||
if (d->autoChange) {
|
||||
@@ -808,7 +812,11 @@ void ColorButton::onChooseColor()
|
||||
if (d->cd.isNull()) {
|
||||
d->old = d->col;
|
||||
d->cd = new QColorDialog(d->col, this);
|
||||
d->cd->setOptions(QColorDialog::DontUseNativeDialog);
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Dialog");
|
||||
bool notNativeColorDialog = group->GetBool("DontUseNativeColorDialog", true);
|
||||
if (notNativeColorDialog)
|
||||
d->cd->setOptions(QColorDialog::DontUseNativeDialog);
|
||||
d->cd->setOption(QColorDialog::ColorDialogOption::ShowAlphaChannel, d->allowTransparency);
|
||||
d->cd->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(d->cd, SIGNAL(rejected()),
|
||||
|
||||
Reference in New Issue
Block a user