Theme system (#2164)

* Themes instead of Styles
* Colors changed to theme colors
* Reworked style management
* Theme settings app
* warn, menu dual set
* Added Aqua style
This commit is contained in:
Totoo 2024-05-27 21:02:52 +02:00 committed by GitHub
parent a8203a6372
commit ced8012783
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
143 changed files with 1566 additions and 1154 deletions

View file

@ -54,8 +54,8 @@ IQTrimView::IQTrimView(NavigationView& nav)
};
};
text_samples.set_style(&Styles::light_grey);
text_max.set_style(&Styles::light_grey);
text_samples.set_style(Theme::getInstance()->fg_light);
text_max.set_style(Theme::getInstance()->fg_light);
field_start.on_change = [this](int32_t v) {
if (field_end.value() < v)
@ -149,9 +149,9 @@ void IQTrimView::refresh_ui() {
// show max power in red if amplification is too high, causing clipping
uint32_t clipping_limit = (fs::capture_file_sample_size(path_) == sizeof(complex8_t)) ? 0x80 : 0x8000;
if ((field_amplify.value() * info_->max_iq) > clipping_limit)
text_max.set_style(&Styles::red);
text_max.set_style(Theme::getInstance()->fg_red);
else
text_max.set_style(&Styles::light_grey);
text_max.set_style(Theme::getInstance()->fg_light);
set_dirty();
}