Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
Apply a few changes that were requested in the PR during the review. # Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/Messages.h # src/displayapp/screens/settings/Settings.cpp
This commit is contained in:
@@ -21,7 +21,11 @@ Settings::Settings(Pinetime::Applications::DisplayApp* app, Pinetime::Controller
|
||||
},
|
||||
[this]() -> std::unique_ptr<Screen> {
|
||||
return CreateScreen3();
|
||||
}},
|
||||
},
|
||||
[this]() -> std::unique_ptr<Screen> {
|
||||
return CreateScreen4();
|
||||
},
|
||||
},
|
||||
Screens::ScreenListModes::UpDown} {
|
||||
}
|
||||
|
||||
@@ -34,7 +38,6 @@ bool Settings::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||
}
|
||||
|
||||
std::unique_ptr<Screen> Settings::CreateScreen1() {
|
||||
|
||||
std::array<Screens::List::Applications, 4> applications {{
|
||||
{Symbols::sun, "Display", Apps::SettingDisplay},
|
||||
{Symbols::eye, "Wake Up", Apps::SettingWakeUp},
|
||||
@@ -42,17 +45,17 @@ std::unique_ptr<Screen> Settings::CreateScreen1() {
|
||||
{Symbols::home, "Watch face", Apps::SettingWatchFace},
|
||||
}};
|
||||
|
||||
return std::make_unique<Screens::List>(0, 3, app, settingsController, applications);
|
||||
return std::make_unique<Screens::List>(0, 4, app, settingsController, applications);
|
||||
}
|
||||
|
||||
std::unique_ptr<Screen> Settings::CreateScreen2() {
|
||||
std::array<Screens::List::Applications, 4> applications {{
|
||||
{Symbols::shoe, "Steps", Apps::SettingSteps},
|
||||
{Symbols::clock, "Set date", Apps::SettingSetDate},
|
||||
{Symbols::clock, "Set time", Apps::SettingSetTime},
|
||||
{Symbols::batteryHalf, "Battery", Apps::BatteryInfo}}};
|
||||
|
||||
std::array<Screens::List::Applications, 4> applications {{{Symbols::shoe, "Steps", Apps::SettingSteps},
|
||||
{Symbols::clock, "Set date", Apps::SettingSetDate},
|
||||
{Symbols::clock, "Set time", Apps::SettingSetTime},
|
||||
{Symbols::batteryHalf, "Battery", Apps::BatteryInfo}}};
|
||||
|
||||
return std::make_unique<Screens::List>(1, 3, app, settingsController, applications);
|
||||
return std::make_unique<Screens::List>(1, 4, app, settingsController, applications);
|
||||
}
|
||||
|
||||
std::unique_ptr<Screen> Settings::CreateScreen3() {
|
||||
@@ -61,8 +64,20 @@ std::unique_ptr<Screen> Settings::CreateScreen3() {
|
||||
{Symbols::clock, "Chimes", Apps::SettingChimes},
|
||||
{Symbols::tachometer, "Shake Calib.", Apps::SettingShakeThreshold},
|
||||
{Symbols::check, "Firmware", Apps::FirmwareValidation},
|
||||
{Symbols::list, "About", Apps::SysInfo}
|
||||
{Symbols::list, "Airplane mode", Apps::SettingAirplaneMode}
|
||||
}};
|
||||
|
||||
return std::make_unique<Screens::List>(2, 3, app, settingsController, applications);
|
||||
return std::make_unique<Screens::List>(2, 4, app, settingsController, applications);
|
||||
}
|
||||
|
||||
std::unique_ptr<Screen> Settings::CreateScreen4() {
|
||||
|
||||
std::array<Screens::List::Applications, 4> applications {{
|
||||
{Symbols::list, "About", Apps::SysInfo},
|
||||
{Symbols::none, "None", Apps::None},
|
||||
{Symbols::none, "None", Apps::None},
|
||||
{Symbols::none, "None", Apps::None}
|
||||
}};
|
||||
|
||||
return std::make_unique<Screens::List>(3, 4, app, settingsController, applications);
|
||||
}
|
||||
|
Reference in New Issue
Block a user