Repository navigation
System: lay out inside the circle on round screens, in its own colours - #48
Merged
Merged
Conversation
On a round 240x240 panel the square layout ran off the edge: the arc, the frame rate line, and the start and end of the lower rows fell outside the circle. A round screen now gets one centred column, each line no wider than the circle is at its height, with the rows going on down while the circle leaves them two fifths of its width. A driver says its panel is round with a `round` attribute; a GC9A01's is taken to be. System also sets its own background and text colours. Started from a plain appkit.run(), which leaves LVGL's light theme on, its values and seconds were dark text on dark cards. Checked on an RP2040 with a round GC9A01 (MicroPython 1.30 preview) by capturing what the display was sent: every label sits inside the circle, Memory, Collect, Boot and Built show, and the display runs at 22 to 27 fps. The square layout, forced on the same board, now reads white on dark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a round 240x240 panel, System's square layout ran off the edge: the top of the arc, the frame-rate line and both ends of the lower rows fell outside the circle. A round screen now gets one centred column (arc with the seconds, frame rate on one line, interpreter, Tap and touch, then the rows), each line no wider than the circle is at its height. Rows go on down while the circle leaves them two fifths of its width, and a value too wide still ends in dots. A driver can say its panel is round with a
roundattribute; without one, a GC9A01 is taken to be round. The layout is used only when the app has the whole screen.An arc round the rim was tried first and dropped: its redraws took the display from about 21 fps to 9 to 12 on the RP2040, which is the number the screen is there to show. The column's arc is the square layout's smallest size.
System also sets its own background and text colours. Started from a plain
appkit.run(), which leaves LVGL's light theme on, its values and seconds came out as dark text on dark cards. Under a shell that applies the dark theme it looks as before.Checked on a Waveshare RP2040-Touch-LCD-1.28 (GC9A01, MicroPython 1.30 preview, 200 MHz) by recording every rectangle the display driver was sent and rebuilding the frame: every label and the arc sit inside the circle, Memory, Collect, Boot and Built show (Network onward are dropped), and the display runs at 22 to 27 fps with 2 to 3 ms per frame. The square layout, forced on the same board, reads white on dark. Not checked: a round panel larger than 400 px (where More appears), CPython desktops, and touch on the glass.