Skip to content

Commit bb8923b

Browse files
authored
Center text on timer button (#2229)
1 parent 4e1ee90 commit bb8923b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/displayapp/screens/Timer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Timer::Timer(Controllers::Timer& timerController) : timer {timerController} {
5959
lv_obj_set_event_cb(btnPlayPause, btnEventHandler);
6060
lv_obj_set_size(btnPlayPause, LV_HOR_RES, 50);
6161

62-
txtPlayPause = lv_label_create(lv_scr_act(), nullptr);
63-
lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0);
62+
// Create the label as a child of the button so it stays centered by default
63+
txtPlayPause = lv_label_create(btnPlayPause, nullptr);
6464

6565
if (timer.IsRunning()) {
6666
SetTimerRunning();

0 commit comments

Comments
 (0)