Skip to content

Commit

Permalink
Squeeze in button unlock option in Wake Up settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Groth Christensen committed Sep 7, 2023
1 parent cf1d287 commit 79a329f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ namespace Pinetime {
}
};

std::bitset<5> getWakeUpModes() const {
std::bitset<6> getWakeUpModes() const {
return settings.wakeUpMode;
}

Expand Down Expand Up @@ -298,7 +298,7 @@ namespace Pinetime {

WatchFaceInfineat watchFaceInfineat;

std::bitset<5> wakeUpMode {0};
std::bitset<6> wakeUpMode {0};
uint16_t shakeWakeThreshold = 150;

Controllers::BrightnessController::Levels brightLevel = Controllers::BrightnessController::Levels::Medium;
Expand Down
6 changes: 3 additions & 3 deletions src/displayapp/screens/settings/SettingWakeUp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using namespace Pinetime::Applications::Screens;

constexpr std::array<SettingWakeUp::Option, 5> SettingWakeUp::options;
constexpr std::array<SettingWakeUp::Option, 6> SettingWakeUp::options;

namespace {
void event_handler(lv_obj_t* obj, lv_event_t event) {
Expand All @@ -27,15 +27,15 @@ SettingWakeUp::SettingWakeUp(Pinetime::Controllers::Settings& settingsController
lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
lv_obj_set_style_local_border_width(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);

lv_obj_set_pos(container1, 10, 35);
lv_obj_set_pos(container1, 10, 0);
lv_obj_set_width(container1, LV_HOR_RES - 20);
lv_obj_set_height(container1, LV_VER_RES - 20);
lv_cont_set_layout(container1, LV_LAYOUT_COLUMN_LEFT);

lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(title, "Wake Up");
lv_label_set_align(title, LV_LABEL_ALIGN_CENTER);
lv_obj_align(title, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 15, 15);
lv_obj_align(title, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 15, -4);

lv_obj_t* icon = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
Expand Down

0 comments on commit 79a329f

Please sign in to comment.