summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/displayapp/screens/Clock.cpp16
-rw-r--r--src/displayapp/screens/Clock.h3
-rw-r--r--src/displayapp/screens/settings/SettingWatchFace.cpp11
-rw-r--r--src/libs/lv_conf.h3
5 files changed, 31 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index acbfba18..5b83812d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -421,6 +421,7 @@ list(APPEND SOURCE_FILES
displayapp/icons/bg_clock.c
displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp
+ displayapp/screens/PineTimeStyle.cpp
##
@@ -470,6 +471,7 @@ list(APPEND SOURCE_FILES
displayapp/fonts/jetbrains_mono_76.c
displayapp/fonts/jetbrains_mono_42.c
displayapp/fonts/lv_font_sys_48.c
+ displayapp/fonts/open_sans_light.c
displayapp/lv_pinetime_theme.c
systemtask/SystemTask.cpp
diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp
index 14299840..e0c1f62b 100644
--- a/src/displayapp/screens/Clock.cpp
+++ b/src/displayapp/screens/Clock.cpp
@@ -14,6 +14,7 @@
#include "../DisplayApp.h"
#include "WatchFaceDigital.h"
#include "WatchFaceAnalog.h"
+#include "PineTimeStyle.h"
using namespace Pinetime::Applications::Screens;
@@ -42,6 +43,9 @@ Clock::Clock(DisplayApp* app,
[this]() -> std::unique_ptr<Screen> {
return WatchFaceAnalogScreen();
},
+ [this]() -> std::unique_ptr<Screen> {
+ return PineTimeStyleScreen();
+ },
// Examples for more watch faces
//[this]() -> std::unique_ptr<Screen> { return WatchFaceMinimalScreen(); },
//[this]() -> std::unique_ptr<Screen> { return WatchFaceCustomScreen(); }
@@ -80,6 +84,16 @@ std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
app, dateTimeController, batteryController, bleController, notificatioManager, settingsController);
}
+std::unique_ptr<Screen> Clock::PineTimeStyleScreen() {
+ return std::make_unique<Screens::PineTimeStyle>(app,
+ dateTimeController,
+ batteryController,
+ bleController,
+ notificatioManager,
+ settingsController,
+ heartRateController);
+}
+
/*
// Examples for more watch faces
std::unique_ptr<Screen> Clock::WatchFaceMinimalScreen() {
@@ -91,4 +105,4 @@ std::unique_ptr<Screen> Clock::WatchFaceCustomScreen() {
return std::make_unique<Screens::WatchFaceCustom>(app, dateTimeController, batteryController, bleController, notificatioManager,
settingsController);
}
-*/ \ No newline at end of file
+*/
diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h
index 9879985f..920d58bb 100644
--- a/src/displayapp/screens/Clock.h
+++ b/src/displayapp/screens/Clock.h
@@ -47,9 +47,10 @@ namespace Pinetime {
Controllers::HeartRateController& heartRateController;
Controllers::MotionController& motionController;
- ScreenList<2> screens;
+ ScreenList<3> screens;
std::unique_ptr<Screen> WatchFaceDigitalScreen();
std::unique_ptr<Screen> WatchFaceAnalogScreen();
+ std::unique_ptr<Screen> PineTimeStyleScreen();
// Examples for more watch faces
// std::unique_ptr<Screen> WatchFaceMinimalScreen();
diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp
index 457cebf6..33d41416 100644
--- a/src/displayapp/screens/settings/SettingWatchFace.cpp
+++ b/src/displayapp/screens/settings/SettingWatchFace.cpp
@@ -59,6 +59,15 @@ SettingWatchFace::SettingWatchFace(Pinetime::Applications::DisplayApp* app, Pine
}
optionsTotal++;
+ cbOption[optionsTotal] = lv_checkbox_create(container1, nullptr);
+ lv_checkbox_set_text_static(cbOption[optionsTotal], " PineTimeStyle");
+ cbOption[optionsTotal]->user_data = this;
+ lv_obj_set_event_cb(cbOption[optionsTotal], event_handler);
+ if (settingsController.GetClockFace() == 2) {
+ lv_checkbox_set_checked(cbOption[optionsTotal], true);
+ }
+
+ optionsTotal++;
}
SettingWatchFace::~SettingWatchFace() {
@@ -81,4 +90,4 @@ void SettingWatchFace::UpdateSelected(lv_obj_t* object, lv_event_t event) {
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/libs/lv_conf.h b/src/libs/lv_conf.h
index 761baba2..cabc1859 100644
--- a/src/libs/lv_conf.h
+++ b/src/libs/lv_conf.h
@@ -417,6 +417,7 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in
LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed) \
LV_FONT_DECLARE(jetbrains_mono_42) \
LV_FONT_DECLARE(jetbrains_mono_76) \
+ LV_FONT_DECLARE(open_sans_light) \
LV_FONT_DECLARE(lv_font_sys_48)
/* Enable it if you have fonts with a lot of characters.
@@ -758,4 +759,4 @@ typedef void* lv_obj_user_data_t;
/*--END OF LV_CONF_H--*/
-#endif /*LV_CONF_H*/ \ No newline at end of file
+#endif /*LV_CONF_H*/