InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Refactor Colors in unique place

Open leroivi opened this issue 9 months ago • 5 comments

Bring the PineTime colors, the Settings colors, the InfiniTimeTheme colors and the LVGL colors in one and unique place so it is easier for developper to be consistent between different screens and bring their own colors.

Fix #559

leroivi avatar Mar 19 '25 17:03 leroivi

Build size and comparison to main:

Section Size Difference
text 383748B 3616B
data 944B 0B
bss 25064B 2520B

Run in InfiniEmu

github-actions[bot] avatar Mar 19 '25 17:03 github-actions[bot]

Sounds like a good refactoring, but why is the size difference so huge? Would this be possible with less impact?

minacode avatar Nov 08 '25 11:11 minacode

Sounds like a good refactoring, but why is the size difference so huge? Would this be possible with less impact?

Ok, I don't know, I will investigate. I suspect that the impact comes from numerous usage of the Color class that calls inline ctor and then inline cast. Maybe it'll be solve by not inlining them. Which impact would be acceptable ?

leroivi avatar Nov 10 '25 01:11 leroivi

Which impact would be acceptable ?

Please don't get me wrong. For me it's less about setting a specific number and more about understanding what is happening there. I can imagine a unified interface to be more efficient than three different ones. But even if it's not, I would like us to think about it.

minacode avatar Nov 10 '25 07:11 minacode

One thing that also immediately comes to my mind is to use the theme everywhere and to challenge how many colors we really need. But that would better be a separate PR, because it may restyle the UI.

minacode avatar Nov 10 '25 08:11 minacode