From 0f1b662f7b0a58193436d5845b3fc85b39142b9b Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 28 Nov 2015 00:15:17 +0100 Subject: [PATCH] LP-179 Remove border and set background color for comboboxes --- .../gcs/src/plugins/config/configinputwidget.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ground/gcs/src/plugins/config/configinputwidget.cpp b/ground/gcs/src/plugins/config/configinputwidget.cpp index b11baa679..c1523e331 100644 --- a/ground/gcs/src/plugins/config/configinputwidget.cpp +++ b/ground/gcs/src/plugins/config/configinputwidget.cpp @@ -1651,7 +1651,7 @@ void ConfigInputWidget::moveFMSlider() void ConfigInputWidget::highlightStabilizationMode(int pos) { QComboBox *comboboxFm = this->findChild("fmsModePos" + QString::number(pos + 1)); - QString customStyleSheet = "border-radius: 4px; border:3px solid #feb103;"; + QString customStyleSheet = "QComboBox:editable:!on{background: #feb103;}"; if (comboboxFm) { QString flightModeText = comboboxFm->currentText(); @@ -1667,11 +1667,11 @@ void ConfigInputWidget::highlightStabilizationMode(int pos) // Highlight current stabilization mode if any. if ((flightModeText.contains("Stabilized", Qt::CaseInsensitive)) && (flightModeText.contains(QString::number(i + 1), Qt::CaseInsensitive))) { - label->setStyleSheet("QLabel {" + customStyleSheet + "}"); - comboRoll->setStyleSheet("QComboBox {" + customStyleSheet + "}"); - comboPitch->setStyleSheet("QComboBox {" + customStyleSheet + "}"); - comboYaw->setStyleSheet("QComboBox {" + customStyleSheet + "}"); - comboThrust->setStyleSheet("QComboBox {" + customStyleSheet + "}"); + label->setStyleSheet("border-radius: 4px; border:3px solid #feb103;"); + comboRoll->setStyleSheet(customStyleSheet); + comboPitch->setStyleSheet(customStyleSheet); + comboYaw->setStyleSheet(customStyleSheet); + comboThrust->setStyleSheet(customStyleSheet); } else { label->setStyleSheet(""); comboRoll->setStyleSheet(""); @@ -1680,7 +1680,7 @@ void ConfigInputWidget::highlightStabilizationMode(int pos) comboThrust->setStyleSheet(""); if (!flightModeText.contains("Stabilized", Qt::CaseInsensitive)) { // Highlight PosHold, Return to Base, ... flightmodes - comboboxFm->setStyleSheet("QComboBox {" + customStyleSheet + "}"); + comboboxFm->setStyleSheet(customStyleSheet); } } }