diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 36424279..efd4c2ea 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -59,8 +59,9 @@ SystemStatusView::SystemStatusView() { }; } -void SystemStatusView::set_back_visible(bool new_value) { - button_back.hidden(!new_value); +void SystemStatusView::set_back_enabled(bool new_value) { + button_back.set_text(new_value ? back_text_enabled : back_text_disabled); + button_back.set_focusable(new_value); } void SystemStatusView::set_title(const std::string new_value) { @@ -193,7 +194,7 @@ SystemView::SystemView( { parent_rect.width(), static_cast(parent_rect.height() - status_view_height) } }); navigation_view.on_view_changed = [this](const View& new_view) { - this->status_view.set_back_visible(!this->navigation_view.is_top()); + this->status_view.set_back_enabled(!this->navigation_view.is_top()); this->status_view.set_title(new_view.title()); }; diff --git a/firmware/application/ui_navigation.hpp b/firmware/application/ui_navigation.hpp index 48c40990..75b0aa2c 100644 --- a/firmware/application/ui_navigation.hpp +++ b/firmware/application/ui_navigation.hpp @@ -66,15 +66,17 @@ public: SystemStatusView(); - void set_back_visible(bool new_value); + void set_back_enabled(bool new_value); void set_title(const std::string new_value); private: static constexpr auto default_title = "PortaPack"; + static constexpr auto back_text_enabled = " < "; + static constexpr auto back_text_disabled = " * "; Button button_back { { 0 * 8, 0 * 16, 3 * 8, 16 }, - " < ", + back_text_disabled, }; Text title {