Merge pull request #1433 from srcejon/fix_1423

#1423 - Workaround Linux bug in color picker in map settings
This commit is contained in:
Edouard Griffiths 2022-09-21 13:57:45 +02:00 committed by GitHub
commit fcbaaf7100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -25,9 +25,10 @@
MapColorDialog::MapColorDialog(const QColor &initial, QWidget *parent) :
QDialog(parent)
{
m_colorDialog = new QColorDialog(initial);
m_colorDialog = new QColorDialog();
m_colorDialog->setWindowFlags(Qt::Widget);
m_colorDialog->setOptions(QColorDialog::ShowAlphaChannel | QColorDialog::NoButtons | QColorDialog::DontUseNativeDialog);
m_colorDialog->setCurrentColor(initial); // Needs to be set after setOptions on Linux, which seems to overwrite QColorDialog(initial)
QVBoxLayout *v = new QVBoxLayout(this);
v->addWidget(m_colorDialog);
QHBoxLayout *h = new QHBoxLayout();