summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/PassKey.cpp
diff options
context:
space:
mode:
authorSteveAmor <SteveAmor@users.noreply.github.com>2022-01-02 22:27:43 (GMT)
committerSteveAmor <SteveAmor@users.noreply.github.com>2022-01-02 22:27:43 (GMT)
commitcc259b6a4ac93d507fa372a41ea653dedeb791ea (patch)
tree3c8b8b937b2b91149003195679ce5acda1154c4d /src/displayapp/screens/PassKey.cpp
parent94561b233136334c7507925b04a345adb0e6c769 (diff)
parente0013e730448f4dc142e3610f970f22c807ac41e (diff)
resolves conflicts
Diffstat (limited to 'src/displayapp/screens/PassKey.cpp')
-rw-r--r--src/displayapp/screens/PassKey.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/displayapp/screens/PassKey.cpp b/src/displayapp/screens/PassKey.cpp
new file mode 100644
index 0000000..9e43a54
--- /dev/null
+++ b/src/displayapp/screens/PassKey.cpp
@@ -0,0 +1,24 @@
+#include "PassKey.h"
+#include "displayapp/DisplayApp.h"
+
+using namespace Pinetime::Applications::Screens;
+
+PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) : Screen(app) {
+ passkeyLabel = lv_label_create(lv_scr_act(), nullptr);
+ lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xFFFF00));
+ lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
+ lv_label_set_text_fmt(passkeyLabel, "%06u", key);
+ lv_obj_align(passkeyLabel, nullptr, LV_ALIGN_CENTER, 0, -20);
+
+ backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
+ lv_obj_set_click(backgroundLabel, true);
+ lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
+ lv_obj_set_size(backgroundLabel, 240, 240);
+ lv_obj_set_pos(backgroundLabel, 0, 0);
+ lv_label_set_text(backgroundLabel, "");
+}
+
+PassKey::~PassKey() {
+ lv_obj_clean(lv_scr_act());
+}
+