[Spreadsheet] Use DontUseNativeColorDialog parameter when using QtCol… (#5326)

* [Spreadsheet] Use DontUseNativeColorDialog parameter when using QtColorDialog::getColor()
This commit is contained in:
Mark Ganson TheMarkster
2022-01-05 05:23:14 -06:00
committed by GitHub
parent dfa62af40f
commit 8d6ff3c07b

View File

@@ -65,7 +65,7 @@
#include <math.h>
#include <QScreen>
#include <Gui/FileDialog.h>
#include "qtcolorpicker.h"
/*! \class QtColorPicker
@@ -902,7 +902,12 @@ void ColorPickerPopup::getColorFromDialog()
{
//bool ok;
//QRgb rgb = QColorDialog::getRgba(lastSel.rgba(), &ok, parentWidget());
QColor col = QColorDialog::getColor(lastSel,parentWidget(),0,QColorDialog::ShowAlphaChannel);
QColor col;
if (Gui::DialogOptions::dontUseNativeColorDialog()){
col = QColorDialog::getColor(lastSel, parentWidget(), 0, QColorDialog::ShowAlphaChannel|QColorDialog::DontUseNativeDialog);
} else {
col = QColorDialog::getColor(lastSel, parentWidget(), 0, QColorDialog::ShowAlphaChannel);
}
if (!col.isValid())
return;