-
Notifications
You must be signed in to change notification settings - Fork 0
Clean up and improve UI sizes and spacing #43
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
Conversation
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.
Pull request overview
This PR improves UI sizing and spacing across multiple handheld gaming device platforms by introducing separate edge and internal padding concepts, adding platform-specific scale modifiers, and refining submenu option layouts. The changes enable better content density on small screens while respecting device bezels.
- Introduces
SCALE_MODIFIERandEDGE_PADDINGplatform definitions to customize UI sizing for devices with physical bezels - Replaces monolithic
ui.paddingwith separateui.padding(internal spacing) andui.edge_padding(screen edge distance) throughout the codebase - Adds new submenu option sizing system with
ui.option_sizedistinct from button icons, plus proportional text truncation for label/value pairs
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| workspace/zero28/platform/platform.h | Adds SCALE_MODIFIER (0.92) and EDGE_PADDING (0) for 2.8" display |
| workspace/trimuismart/platform/platform.h | Adds SCALE_MODIFIER (0.88) and EDGE_PADDING (0) for 2.4" display |
| workspace/tg5040/platform/platform.h | Adds EDGE_PADDING (5) for larger display variants |
| workspace/my282/platform/platform.h | Adds SCALE_MODIFIER (0.92) and EDGE_PADDING (5) for 2.8" display |
| workspace/miyoomini/platform/platform.h | Adds conditional SCALE_MODIFIER and EDGE_PADDING based on device variant |
| workspace/magicmini/platform/platform.h | Adds SCALE_MODIFIER (0.92) and EDGE_PADDING (0) for 2.8" display |
| workspace/all/common/api.h | Adds GFX_centerGlyph helper, updates UI_Layout struct with new padding and option sizing fields, adds ASSET_OPTION_WHITE enum |
| workspace/all/common/api.c | Updates dp_scale baseline to 120.0f, implements edge_padding logic, adds option sizing calculations, refactors asset scaling with virtual assets |
| workspace/all/utils/minui-presenter/minui-presenter.c | Replaces ui.padding with ui.edge_padding for screen edge positioning |
| workspace/all/utils/minui-list/minui-list.c | Updates to use ui.edge_padding, changes fonts from large to medium for option labels, adds ui.option_size and baseline offsets |
| workspace/all/minui/minui.c | Replaces ui.padding with ui.edge_padding for screen edge calculations |
| workspace/all/minarch/minarch.c | Adds calculateProportionalWidths function, updates option rendering with new sizing, improves text truncation, updates scroll indicator positioning |
| workspace/all/paks/Input/src/minput.c | Replaces ui.padding with ui.edge_padding for button positioning |
| workspace/all/paks/Clock/src/clock.c | Replaces ui.padding with ui.edge_padding for layout calculation |
Comments suppressed due to low confidence (2)
workspace/all/common/api.c:90
- The comment states the baseline is 144.0, but the actual code at line 110 uses 120.0f. The comment should be updated to match the implementation: 'ppi / 120.0 (handheld gaming device baseline)'.
* 2. Calculate raw dp_scale: ppi / 144.0 (handheld gaming device baseline)
workspace/all/common/api.c:64
- The comment states the scale factor is 'PPI / 144', but the actual implementation at line 110 uses 'ppi / 120.0f'. Update the comment to: '// Global display scale factor (PPI / 120)'.
// Global display scale factor (PPI / 144)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.