aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Timer.cpp
diff options
context:
space:
mode:
authorTitus <154823939+tituscmd@users.noreply.github.com>2025-05-16 23:01:19 +0200
committerGitHub <noreply@github.com>2025-05-16 23:01:19 +0200
commitbb8923b56e3c89a3e9b8dad70fc80f61f14deb17 (patch)
tree9729b3cd07a1320928338635c6f73678c1d4acd2 /src/displayapp/screens/Timer.cpp
parent4e1ee90286355caa54ac57d2eb5e59748a09a2de (diff)
Center text on timer button (#2229)
Diffstat (limited to 'src/displayapp/screens/Timer.cpp')
-rw-r--r--src/displayapp/screens/Timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp
index f6d5e73b..31cde733 100644
--- a/src/displayapp/screens/Timer.cpp
+++ b/src/displayapp/screens/Timer.cpp
@@ -59,8 +59,8 @@ Timer::Timer(Controllers::Timer& timerController) : timer {timerController} {
lv_obj_set_event_cb(btnPlayPause, btnEventHandler);
lv_obj_set_size(btnPlayPause, LV_HOR_RES, 50);
- txtPlayPause = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0);
+ // Create the label as a child of the button so it stays centered by default
+ txtPlayPause = lv_label_create(btnPlayPause, nullptr);
if (timer.IsRunning()) {
SetTimerRunning();