Center text on timer button (#2229)

This commit is contained in:
Titus 2025-05-16 23:01:19 +02:00 committed by GitHub
parent 4e1ee90286
commit bb8923b56e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,8 +59,8 @@ Timer::Timer(Controllers::Timer& timerController) : timer {timerController} {
lv_obj_set_event_cb(btnPlayPause, btnEventHandler); lv_obj_set_event_cb(btnPlayPause, btnEventHandler);
lv_obj_set_size(btnPlayPause, LV_HOR_RES, 50); lv_obj_set_size(btnPlayPause, LV_HOR_RES, 50);
txtPlayPause = lv_label_create(lv_scr_act(), nullptr); // Create the label as a child of the button so it stays centered by default
lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0); txtPlayPause = lv_label_create(btnPlayPause, nullptr);
if (timer.IsRunning()) { if (timer.IsRunning()) {
SetTimerRunning(); SetTimerRunning();