mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-27 08:46:01 -04:00
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:
parent
a8203a6372
commit
ced8012783
143 changed files with 1566 additions and 1154 deletions
|
@ -49,12 +49,12 @@ int32_t GlassView::map(int32_t value, int32_t fromLow, int32_t fromHigh, int32_t
|
|||
|
||||
void GlassView::update_display_beep() {
|
||||
if (beep_enabled) {
|
||||
button_beep_squelch.set_style(&Styles::green);
|
||||
button_beep_squelch.set_style(Theme::getInstance()->fg_green);
|
||||
// bip-XXdb
|
||||
button_beep_squelch.set_text("bip" + to_string_dec_int(beep_squelch, 3) + "db");
|
||||
receiver_model.set_headphone_volume(receiver_model.headphone_volume()); // WM8731 hack.
|
||||
} else {
|
||||
button_beep_squelch.set_style(&Styles::white);
|
||||
button_beep_squelch.set_style(Theme::getInstance()->bg_darkest);
|
||||
button_beep_squelch.set_text("bip OFF ");
|
||||
}
|
||||
}
|
||||
|
@ -305,10 +305,10 @@ void GlassView::plot_marker(uint8_t pos) {
|
|||
{
|
||||
shift_y = 16;
|
||||
}
|
||||
portapack::display.fill_rectangle({0, 100 + shift_y, SCREEN_W, 8}, Color::black()); // Clear old marker and whole marker rectangle btw
|
||||
portapack::display.fill_rectangle({pos - 2, 100 + shift_y, 5, 3}, Color::red()); // Red marker top
|
||||
portapack::display.fill_rectangle({pos - 1, 103 + shift_y, 3, 3}, Color::red()); // Red marker middle
|
||||
portapack::display.fill_rectangle({pos, 106 + shift_y, 1, 2}, Color::red()); // Red marker bottom
|
||||
portapack::display.fill_rectangle({0, 100 + shift_y, SCREEN_W, 8}, Theme::getInstance()->bg_darkest->background); // Clear old marker and whole marker rectangle btw
|
||||
portapack::display.fill_rectangle({pos - 2, 100 + shift_y, 5, 3}, Theme::getInstance()->fg_red->foreground); // Red marker top
|
||||
portapack::display.fill_rectangle({pos - 1, 103 + shift_y, 3, 3}, Theme::getInstance()->fg_red->foreground); // Red marker middle
|
||||
portapack::display.fill_rectangle({pos, 106 + shift_y, 1, 2}, Theme::getInstance()->fg_red->foreground); // Red marker bottom
|
||||
}
|
||||
|
||||
void GlassView::update_min(int32_t v) {
|
||||
|
@ -347,10 +347,10 @@ void GlassView::update_max(int32_t v) {
|
|||
|
||||
void GlassView::update_range_field() {
|
||||
if (!locked_range) {
|
||||
field_range.set_style(&Styles::white);
|
||||
field_range.set_style(Theme::getInstance()->bg_darkest);
|
||||
field_range.set_text(" " + to_string_dec_uint(search_span) + " ");
|
||||
} else {
|
||||
field_range.set_style(&Styles::red);
|
||||
field_range.set_style(Theme::getInstance()->fg_red);
|
||||
field_range.set_text(">" + to_string_dec_uint(search_span) + "<");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue