-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Center text on timer button #2229
base: main
Are you sure you want to change the base?
Conversation
Build size and comparison to main:
|
b93c2e7
to
6f9caa4
Compare
7ea3030
to
d033f19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a nicer way to do it
txtPlayPause = lv_label_create(lv_scr_act(), nullptr); | ||
lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0); | ||
txtPlayPause = lv_label_create(btnPlayPause, nullptr); | ||
// lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's now auto aligned I think this line can be fully deleted. Maybe if you would like to point out the alignment a comment above the label creation would work nicely
Hey everybody!
This PR is made to center the "Start"/"Pause" text on the button in the timer app. The previous implementation created the text object and aligned it to the button object, this implementation creates the text object with a pointer to the button object and thus makes it centered at all times!
Here's a screenshot of InfiniEmu running it:
