summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Weather.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-05-12 04:18:02 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-05-12 04:18:02 (GMT)
commit6e9eafeba44fd0e698cf288704a5eb2fc6bd76aa (patch)
tree7d98fb3cbcaa05cf02585481c8e822005093c41f /src/displayapp/screens/Weather.cpp
parent6c3268c24be4555b68d4fd4e4bf488d5fce1369c (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));
}