mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
LP-179 Remove border and set background color for comboboxes
This commit is contained in:
parent
990e7eb3c9
commit
0f1b662f7b
@ -1651,7 +1651,7 @@ void ConfigInputWidget::moveFMSlider()
|
|||||||
void ConfigInputWidget::highlightStabilizationMode(int pos)
|
void ConfigInputWidget::highlightStabilizationMode(int pos)
|
||||||
{
|
{
|
||||||
QComboBox *comboboxFm = this->findChild<QComboBox *>("fmsModePos" + QString::number(pos + 1));
|
QComboBox *comboboxFm = this->findChild<QComboBox *>("fmsModePos" + QString::number(pos + 1));
|
||||||
QString customStyleSheet = "border-radius: 4px; border:3px solid #feb103;";
|
QString customStyleSheet = "QComboBox:editable:!on{background: #feb103;}";
|
||||||
|
|
||||||
if (comboboxFm) {
|
if (comboboxFm) {
|
||||||
QString flightModeText = comboboxFm->currentText();
|
QString flightModeText = comboboxFm->currentText();
|
||||||
@ -1667,11 +1667,11 @@ void ConfigInputWidget::highlightStabilizationMode(int pos)
|
|||||||
|
|
||||||
// Highlight current stabilization mode if any.
|
// Highlight current stabilization mode if any.
|
||||||
if ((flightModeText.contains("Stabilized", Qt::CaseInsensitive)) && (flightModeText.contains(QString::number(i + 1), Qt::CaseInsensitive))) {
|
if ((flightModeText.contains("Stabilized", Qt::CaseInsensitive)) && (flightModeText.contains(QString::number(i + 1), Qt::CaseInsensitive))) {
|
||||||
label->setStyleSheet("QLabel {" + customStyleSheet + "}");
|
label->setStyleSheet("border-radius: 4px; border:3px solid #feb103;");
|
||||||
comboRoll->setStyleSheet("QComboBox {" + customStyleSheet + "}");
|
comboRoll->setStyleSheet(customStyleSheet);
|
||||||
comboPitch->setStyleSheet("QComboBox {" + customStyleSheet + "}");
|
comboPitch->setStyleSheet(customStyleSheet);
|
||||||
comboYaw->setStyleSheet("QComboBox {" + customStyleSheet + "}");
|
comboYaw->setStyleSheet(customStyleSheet);
|
||||||
comboThrust->setStyleSheet("QComboBox {" + customStyleSheet + "}");
|
comboThrust->setStyleSheet(customStyleSheet);
|
||||||
} else {
|
} else {
|
||||||
label->setStyleSheet("");
|
label->setStyleSheet("");
|
||||||
comboRoll->setStyleSheet("");
|
comboRoll->setStyleSheet("");
|
||||||
@ -1680,7 +1680,7 @@ void ConfigInputWidget::highlightStabilizationMode(int pos)
|
|||||||
comboThrust->setStyleSheet("");
|
comboThrust->setStyleSheet("");
|
||||||
if (!flightModeText.contains("Stabilized", Qt::CaseInsensitive)) {
|
if (!flightModeText.contains("Stabilized", Qt::CaseInsensitive)) {
|
||||||
// Highlight PosHold, Return to Base, ... flightmodes
|
// Highlight PosHold, Return to Base, ... flightmodes
|
||||||
comboboxFm->setStyleSheet("QComboBox {" + customStyleSheet + "}");
|
comboboxFm->setStyleSheet(customStyleSheet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user