From e546180e026f25a0f865ee47bed3513ff455841d Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Fri, 27 Aug 2021 00:08:55 +0100 Subject: [PATCH] Silent mode enabled rather than vibration enabled --- src/displayapp/screens/settings/QuickSettings.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index 54e2f3e22e..9a6fb44937 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -81,18 +81,18 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app, lv_obj_set_event_cb(btn3, ButtonEventHandler); lv_btn_set_checkable(btn3, true); lv_obj_add_style(btn3, LV_BTN_PART_MAIN, &btn_style); - lv_obj_set_style_local_bg_color(btn3, LV_BTN_PART_MAIN, LV_STATE_CHECKED, LV_COLOR_GREEN); + lv_obj_set_style_local_bg_color(btn3, LV_BTN_PART_MAIN, LV_STATE_CHECKED, LV_COLOR_RED); lv_obj_set_size(btn3, buttonWidth, buttonHeight); lv_obj_align(btn3, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, buttonXOffset, 0); btn3_lvl = lv_label_create(btn3, nullptr); lv_obj_set_style_local_text_font(btn3_lvl, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_sys_48); - if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::ON) { + if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF) { lv_obj_add_state(btn3, LV_STATE_CHECKED); - lv_label_set_text_static(btn3_lvl, Symbols::notificationsOn); - } else { lv_label_set_text_static(btn3_lvl, Symbols::notificationsOff); + } else { + lv_label_set_text_static(btn3_lvl, Symbols::notificationsOn); } btn4 = lv_btn_create(lv_scr_act(), nullptr); @@ -142,12 +142,12 @@ void QuickSettings::OnButtonEvent(lv_obj_t* object, lv_event_t event) { } else if (object == btn3 && event == LV_EVENT_VALUE_CHANGED) { if (lv_obj_get_state(btn3, LV_BTN_PART_MAIN) & LV_STATE_CHECKED) { + settingsController.SetVibrationStatus(Controllers::Settings::Vibration::OFF); + lv_label_set_text_static(btn3_lvl, Symbols::notificationsOff); + } else { settingsController.SetVibrationStatus(Controllers::Settings::Vibration::ON); motorController.RunForDuration(35); lv_label_set_text_static(btn3_lvl, Symbols::notificationsOn); - } else { - settingsController.SetVibrationStatus(Controllers::Settings::Vibration::OFF); - lv_label_set_text_static(btn3_lvl, Symbols::notificationsOff); } } else if (object == btn4 && event == LV_EVENT_PRESSED) {