fix(cpn): Handling of the 'show splash' setting for B&W radios in Companion (#3336)
* Fix handling of the 'show splash' setting for B&W radios in Companion. * Remove 'TODO' comment.
This commit is contained in:
@@ -251,17 +251,11 @@ ui(new Ui::GeneralSetup)
|
||||
ui->rssiPowerOffWarnChkB->setChecked(!generalSettings.disableRssiPoweroffAlarm); // Default is zero=checked
|
||||
|
||||
if (IS_FAMILY_HORUS_OR_T16(firmware->getBoard())) {
|
||||
ui->splashScreenChkB->hide();
|
||||
ui->splashScreenDuration->hide();
|
||||
ui->splashScreenLabel->hide();
|
||||
}
|
||||
if (IS_TARANIS(firmware->getBoard())) {
|
||||
ui->splashScreenChkB->hide();
|
||||
ui->splashScreenDuration->setCurrentIndex(3-generalSettings.splashDuration);
|
||||
}
|
||||
else {
|
||||
ui->splashScreenDuration->hide();
|
||||
ui->splashScreenChkB->setChecked(!generalSettings.splashMode);
|
||||
ui->splashScreenDuration->setCurrentIndex(3-generalSettings.splashMode);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(PwrButtonPress)) {
|
||||
@@ -542,16 +536,9 @@ void GeneralSetupPanel::on_soundModeCB_currentIndexChanged(int index)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
|
||||
void GeneralSetupPanel::on_splashScreenChkB_stateChanged(int )
|
||||
{
|
||||
generalSettings.splashMode = ui->splashScreenChkB->isChecked() ? 0 : 1;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_splashScreenDuration_currentIndexChanged(int index)
|
||||
{
|
||||
generalSettings.splashDuration = 3-index;
|
||||
generalSettings.splashMode = 3-index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ class GeneralSetupPanel : public GeneralPanel
|
||||
virtual ~GeneralSetupPanel();
|
||||
|
||||
private slots:
|
||||
void on_splashScreenChkB_stateChanged(int);
|
||||
void on_splashScreenDuration_currentIndexChanged(int index);
|
||||
void on_alarmwarnChkB_stateChanged(int);
|
||||
void on_rssiPowerOffWarnChkB_stateChanged(int);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>809</width>
|
||||
<width>810</width>
|
||||
<height>880</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -1850,31 +1850,6 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item row="10" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="splashScreenChkB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show splash screen on startup</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Show splash screen on startup</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="splashScreenDuration">
|
||||
<property name="sizePolicy">
|
||||
|
||||
Reference in New Issue
Block a user