@@ -15,7 +15,7 @@ namespace {
1515 }
1616}
1717
18- constexpr std::array<uint16_t , 6 > SettingDisplay::options;
18+ constexpr std::array<uint16_t , 7 > SettingDisplay::options;
1919
2020SettingDisplay::SettingDisplay (Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
2121 : app {app}, settingsController {settingsController} {
@@ -46,7 +46,11 @@ SettingDisplay::SettingDisplay(Pinetime::Applications::DisplayApp* app, Pinetime
4646 char buffer[4 ];
4747 for (unsigned int i = 0 ; i < options.size (); i++) {
4848 cbOption[i] = lv_checkbox_create (container1, nullptr );
49- snprintf (buffer, sizeof (buffer), " %2" PRIu16 " s" , options[i] / 1000 );
49+ if (options[i] == 0 ) {
50+ sprintf (buffer, " %s" , " Always On" );
51+ } else {
52+ sprintf (buffer, " %2ds" , options[i] / 1000 );
53+ }
5054 lv_checkbox_set_text (cbOption[i], buffer);
5155 cbOption[i]->user_data = this ;
5256 lv_obj_set_event_cb (cbOption[i], event_handler);
@@ -64,6 +68,12 @@ SettingDisplay::~SettingDisplay() {
6468}
6569
6670void SettingDisplay::UpdateSelected (lv_obj_t * object, lv_event_t event) {
71+ if (settingsController.GetScreenTimeOut () == 0 ) {
72+ settingsController.SetAlwaysOnDisplay (true );
73+ } else {
74+ settingsController.SetAlwaysOnDisplay (false );
75+ }
76+
6777 if (event == LV_EVENT_CLICKED) {
6878 for (unsigned int i = 0 ; i < options.size (); i++) {
6979 if (object == cbOption[i]) {
0 commit comments