mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-14 04:04:34 +00:00
Move field.set_style()s after all participating widgets' styles are reset.
This commit is contained in:
parent
c650536934
commit
760c73a7be
@ -217,8 +217,6 @@ void AnalogAudioView::set_options_widget(std::unique_ptr<Widget> new_widget) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnalogAudioView::on_show_options_frequency() {
|
void AnalogAudioView::on_show_options_frequency() {
|
||||||
field_frequency.set_style(&style_options_group);
|
|
||||||
|
|
||||||
auto widget = std::make_unique<FrequencyOptionsView>(options_view_rect, &style_options_group);
|
auto widget = std::make_unique<FrequencyOptionsView>(options_view_rect, &style_options_group);
|
||||||
|
|
||||||
widget->set_step(receiver_model.frequency_step());
|
widget->set_step(receiver_model.frequency_step());
|
||||||
@ -231,11 +229,10 @@ void AnalogAudioView::on_show_options_frequency() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
set_options_widget(std::move(widget));
|
set_options_widget(std::move(widget));
|
||||||
|
field_frequency.set_style(&style_options_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalogAudioView::on_show_options_rf_gain() {
|
void AnalogAudioView::on_show_options_rf_gain() {
|
||||||
field_lna.set_style(&style_options_group);
|
|
||||||
|
|
||||||
auto widget = std::make_unique<RadioGainOptionsView>(options_view_rect, &style_options_group);
|
auto widget = std::make_unique<RadioGainOptionsView>(options_view_rect, &style_options_group);
|
||||||
|
|
||||||
widget->set_rf_amp(receiver_model.rf_amp());
|
widget->set_rf_amp(receiver_model.rf_amp());
|
||||||
@ -244,19 +241,20 @@ void AnalogAudioView::on_show_options_rf_gain() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
set_options_widget(std::move(widget));
|
set_options_widget(std::move(widget));
|
||||||
|
field_lna.set_style(&style_options_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalogAudioView::on_show_options_modulation() {
|
void AnalogAudioView::on_show_options_modulation() {
|
||||||
const auto modulation = static_cast<ReceiverModel::Mode>(receiver_model.modulation());
|
const auto modulation = static_cast<ReceiverModel::Mode>(receiver_model.modulation());
|
||||||
if( modulation == ReceiverModel::Mode::AMAudio ) {
|
if( modulation == ReceiverModel::Mode::AMAudio ) {
|
||||||
options_modulation.set_style(&style_options_group);
|
|
||||||
auto widget = std::make_unique<AMOptionsView>(options_view_rect, &style_options_group);
|
auto widget = std::make_unique<AMOptionsView>(options_view_rect, &style_options_group);
|
||||||
set_options_widget(std::move(widget));
|
set_options_widget(std::move(widget));
|
||||||
|
options_modulation.set_style(&style_options_group);
|
||||||
}
|
}
|
||||||
if( modulation == ReceiverModel::Mode::NarrowbandFMAudio ) {
|
if( modulation == ReceiverModel::Mode::NarrowbandFMAudio ) {
|
||||||
options_modulation.set_style(&style_options_group);
|
|
||||||
auto widget = std::make_unique<NBFMOptionsView>(options_view_rect, &style_options_group);
|
auto widget = std::make_unique<NBFMOptionsView>(options_view_rect, &style_options_group);
|
||||||
set_options_widget(std::move(widget));
|
set_options_widget(std::move(widget));
|
||||||
|
options_modulation.set_style(&style_options_group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user