summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Weather.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-05-11 20:52:10 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-05-11 20:52:10 (GMT)
commit1d0023b502563d486a6e8c5d6dffbfdcd4e94c2a (patch)
tree0a2f91601b9530624a397bf2fde7aa851c3e639d /src/displayapp/screens/Weather.cpp
parent786ff1312a8c2afc3d2cf5aab320b6416d727734 (diff)
Use nullptr when aligning relative to parent
Diffstat (limited to 'src/displayapp/screens/Weather.cpp')
-rw-r--r--src/displayapp/screens/Weather.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/displayapp/screens/Weather.cpp b/src/displayapp/screens/Weather.cpp
index 1d0a83b..9174afb 100644
--- a/src/displayapp/screens/Weather.cpp
+++ b/src/displayapp/screens/Weather.cpp
@@ -97,7 +97,7 @@ std::unique_ptr<Screen> Weather::CreateScreenTemperature() {
current->expires);
}
lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, nullptr, LV_ALIGN_CENTER, 0, 0);
return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label));
}
@@ -130,7 +130,7 @@ std::unique_ptr<Screen> Weather::CreateScreenAir() {
current->expires);
}
lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, nullptr, LV_ALIGN_CENTER, 0, 0);
return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label));
}
@@ -159,7 +159,7 @@ std::unique_ptr<Screen> Weather::CreateScreenClouds() {
current->expires);
}
lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, nullptr, LV_ALIGN_CENTER, 0, 0);
return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label));
}
@@ -188,7 +188,7 @@ std::unique_ptr<Screen> Weather::CreateScreenPrecipitation() {
current->expires);
}
lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, nullptr, LV_ALIGN_CENTER, 0, 0);
return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label));
}
@@ -217,6 +217,6 @@ std::unique_ptr<Screen> Weather::CreateScreenHumidity() {
current->expires);
}
lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
- lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, nullptr, LV_ALIGN_CENTER, 0, 0);
return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label));
}