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

@ -80,11 +80,11 @@ SearchView::SearchView(
nav.push<FrequencySaveView>(entry.frequency);
};
text_mean.set_style(&Styles::grey);
text_slices.set_style(&Styles::grey);
text_rate.set_style(&Styles::grey);
progress_timers.set_style(&Styles::grey);
big_display.set_style(&Styles::grey);
text_mean.set_style(Theme::getInstance()->fg_medium);
text_slices.set_style(Theme::getInstance()->fg_medium);
text_rate.set_style(Theme::getInstance()->fg_medium);
progress_timers.set_style(Theme::getInstance()->fg_medium);
big_display.set_style(Theme::getInstance()->fg_medium);
field_frequency_min.set_step(100'000);
bind(field_frequency_min, settings_.freq_min, nav, [this](auto) {
@ -184,7 +184,7 @@ void SearchView::do_detection() {
recent_entries_view.set_dirty();
text_infos.set("Locked ! ");
big_display.set_style(&Styles::green);
big_display.set_style(Theme::getInstance()->fg_green);
locked = true;
locked_bin = bin_max;
@ -209,7 +209,7 @@ void SearchView::do_detection() {
recent_entries_view.set_dirty();
text_infos.set("Listening");
big_display.set_style(&Styles::grey);
big_display.set_style(Theme::getInstance()->fg_medium);
}
}
}
@ -219,10 +219,10 @@ void SearchView::do_detection() {
search_counter++;
// Refresh red tick
portapack::display.fill_rectangle({last_tick_pos, 90, 1, 6}, Color::black());
portapack::display.fill_rectangle({last_tick_pos, 90, 1, 6}, Theme::getInstance()->fg_red->background);
if (bin_max > -1) {
last_tick_pos = (Coord)(bin_max / slices_nb);
portapack::display.fill_rectangle({last_tick_pos, 90, 1, 6}, Color::red());
portapack::display.fill_rectangle({last_tick_pos, 90, 1, 6}, Theme::getInstance()->fg_red->foreground);
}
}