Center text on timer button (#2229)
This commit is contained in:
parent
4e1ee90286
commit
bb8923b56e
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue