mirror of https://github.com/f4exb/sdrangel.git
Merge pull request #1433 from srcejon/fix_1423
#1423 - Workaround Linux bug in color picker in map settings
This commit is contained in:
commit
fcbaaf7100
|
@ -25,9 +25,10 @@
|
||||||
MapColorDialog::MapColorDialog(const QColor &initial, QWidget *parent) :
|
MapColorDialog::MapColorDialog(const QColor &initial, QWidget *parent) :
|
||||||
QDialog(parent)
|
QDialog(parent)
|
||||||
{
|
{
|
||||||
m_colorDialog = new QColorDialog(initial);
|
m_colorDialog = new QColorDialog();
|
||||||
m_colorDialog->setWindowFlags(Qt::Widget);
|
m_colorDialog->setWindowFlags(Qt::Widget);
|
||||||
m_colorDialog->setOptions(QColorDialog::ShowAlphaChannel | QColorDialog::NoButtons | QColorDialog::DontUseNativeDialog);
|
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);
|
QVBoxLayout *v = new QVBoxLayout(this);
|
||||||
v->addWidget(m_colorDialog);
|
v->addWidget(m_colorDialog);
|
||||||
QHBoxLayout *h = new QHBoxLayout();
|
QHBoxLayout *h = new QHBoxLayout();
|
||||||
|
|
Loading…
Reference in New Issue