From 2acefee4d2fc63e9eed8caf7fb70ba3af36427c9 Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Sat, 30 Mar 2024 10:34:37 +0100 Subject: [PATCH] adjust GUI for more preset name room (#2068) --- firmware/application/apps/ui_looking_glass_app.cpp | 10 +++++----- firmware/application/apps/ui_looking_glass_app.hpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/firmware/application/apps/ui_looking_glass_app.cpp b/firmware/application/apps/ui_looking_glass_app.cpp index 5679c5a0..903f52a4 100644 --- a/firmware/application/apps/ui_looking_glass_app.cpp +++ b/firmware/application/apps/ui_looking_glass_app.cpp @@ -50,12 +50,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_text("[bip>" + to_string_dec_int(beep_squelch, 4) + "db]"); + // 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_text("[ beep OFF ]"); + button_beep_squelch.set_text("bip OFF "); } } @@ -548,8 +548,8 @@ GlassView::GlassView( button_beep_squelch.on_change = [this]() { int new_beep_squelch = beep_squelch + button_beep_squelch.get_encoder_delta(); - if (new_beep_squelch < -100) - new_beep_squelch = -100; + if (new_beep_squelch < -99) + new_beep_squelch = -99; if (new_beep_squelch > 20) new_beep_squelch = 20; beep_squelch = new_beep_squelch; diff --git a/firmware/application/apps/ui_looking_glass_app.hpp b/firmware/application/apps/ui_looking_glass_app.hpp index a19dd1e9..9d6568eb 100644 --- a/firmware/application/apps/ui_looking_glass_app.hpp +++ b/firmware/application/apps/ui_looking_glass_app.hpp @@ -173,7 +173,7 @@ class GlassView : public View { Labels labels{ {{0, 0 * 16}, "MIN: MAX: LNA VGA ", Color::light_grey()}, {{0, 1 * 16}, "RANGE: FILTER: AMP:", Color::light_grey()}, - {{0, 2 * 16}, "PRESET:", Color::light_grey()}, + {{0, 2 * 16}, "P:", Color::light_grey()}, {{0, 3 * 16}, "MARKER: MHz RXIQCAL", Color::light_grey()}, //{{0, 4 * 16}, "RES: STEPS:", Color::light_grey()}}; {{0, 4 * 16}, "RES: VOL:", Color::light_grey()}}; @@ -215,12 +215,12 @@ class GlassView : public View { {28 * 8, 1 * 16}}; OptionsField range_presets{ - {7 * 8, 2 * 16}, - 10, + {2 * 8, 2 * 16}, + 20, {}}; ButtonWithEncoder button_beep_squelch{ - {18 * 8, 2 * 16 + 4, 12 * 8, 1 * 8}, + {240 - 8 * 8, 2 * 16 + 4, 8 * 8, 1 * 8}, ""}; TextField field_marker{