Skip to content
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

Theme and color cleanup #667

Closed
wants to merge 1 commit into from
Closed

Theme and color cleanup #667

wants to merge 1 commit into from

Conversation

Riksu9000
Copy link
Contributor

Use LVGL defined colors where possible.
Add some custom colors to Colors.h.
Swap arc background and foreground colors in theme, so that background is darker than foreground/filled part. In Metronome the colors get swapped and in Steps the background will be darker.
Commented shadow and outline styles as they're disabled in lv_conf.h
Set disabled colors for button and label in theme, so they don't have to be set in app.

Some grays have changed very slightly, like 0x88 to 0x80, which probably isn't noticable.

This ends up using 1368 less bytes of flash. I assume some colors were calculated at runtime as lv_color_hex() couldn't be made constexpr and changing some lv_color_hex() to LV_COLOR_MAKE() saved some bytes.

metronome
steps

@kieranc
Copy link
Contributor

kieranc commented Sep 16, 2021

Nice work, much needed. I've merged this with my current build, will monitor for any abnormalities...

@lman0
Copy link

lman0 commented Sep 29, 2021

hi,
@kieranc is this pr make infinitime faster? last longer?

@lman0
Copy link

lman0 commented Oct 29, 2021

hi @Avamander , since you have accepted/approved #792
you could do the same for this one as well and
infintime would gain more than 2kb memory (1368 +996)

@Avamander
Copy link
Collaborator

It has merge conflicts at the moment and a review gets outdated after a commit, something might accidentally slip past easier.

@lman0
Copy link

lman0 commented Oct 29, 2021

@Riksu9000 could you resolve the conflicts so @Avamander could review this pull?

@Riksu9000
Copy link
Contributor Author

Thanks for reminding me.

Something new has come up however. With the LVGL8 upgrade #734, the default color palette will change, which would make this PR obsolete. With LVGL8 we would instead need to stop using LVGL defined colors and define all our colors in Colors.h preferrably.

So if we'll upgrade to LVGL8 soon, it might not make sense to merge this.

@Riksu9000 Riksu9000 closed this Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants