diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 3841cb979..bb554d05c 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -309,6 +309,12 @@ ModalMessageView::ModalMessageView( } }); text_message.set(message); + + const int text_message_width = message.size() * 8; + text_message.set_parent_rect({ + (240 - text_message_width) / 2, 7 * 16, + text_message_width, 16 + }); } void ModalMessageView::focus() { diff --git a/firmware/application/ui_navigation.hpp b/firmware/application/ui_navigation.hpp index b53a237cf..65fcf2fe8 100644 --- a/firmware/application/ui_navigation.hpp +++ b/firmware/application/ui_navigation.hpp @@ -223,10 +223,7 @@ public: private: const std::string title_; - Text text_message { - { 0 * 8, 7 * 16, 30 * 8, 16 }, - "" - }; + Text text_message { }; Button button_done { { 10 * 8, 13 * 16, 10 * 8, 24 },