1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

#1452 - Workaround Linux bug in color picker in map settings

This commit is contained in:
Jon Beniston 2022-09-21 11:04:37 +01:00
parent 008e53104d
commit 729fe1e1a9

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();