Simplify drawing splash screen using wxPaintDC and Fix scaling issues #494

Open
opened 2026-04-05 16:21:42 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @yw4z on 3/3/2026

Reduces calls and simplifies code
will update after testing on macOS and Linux

TESTED ON

• Windows 11 (multi monitor setup. one has %100 scaling and other one has %150 scaling)
• Linux Mint X11 - Ubuntu Wayland with different scalings

COMPARISON

• Current code calls font scale 3 times. set font sizes correctly and call font scale 1 time just for required one
• Current code sets dynamic text after painting that causes multiple times of rendering. i used fixed text so window only paint one time. Checked SetText() function still works without issue
• This one not loads config for dark mode check and wxGetApp().UpdateFrameDarkUI(this); not required since its just a painted frame
• Removed monitor dpi checks since paint dc already uses scaled values
• Reduced amount of variables

FIXES

• Fonts not uses correct size on scaled monitors
before- text are not properly scaled on 150% scaling. probably it will get much bigger on higher scaling
FMRn33C2L4

after - text sizes are exact same with 100% sacaling
Dayp8PBSW0

*Originally created by @yw4z on 3/3/2026* Reduces calls and simplifies code will update after testing on macOS and Linux ### TESTED ON • Windows 11 (multi monitor setup. one has %100 scaling and other one has %150 scaling) • Linux Mint X11 - Ubuntu Wayland with different scalings ### COMPARISON • Current code calls font scale 3 times. set font sizes correctly and call font scale 1 time just for required one • Current code sets dynamic text after painting that causes multiple times of rendering. i used fixed text so window only paint one time. Checked SetText() function still works without issue • This one not loads config for dark mode check and wxGetApp().UpdateFrameDarkUI(this); not required since its just a painted frame • Removed monitor dpi checks since paint dc already uses scaled values • Reduced amount of variables ### FIXES • Fonts not uses correct size on scaled monitors **before- text are not properly scaled on 150% scaling. probably it will get much bigger on higher scaling** <img width="1920" height="1080" alt="FMRn33C2L4" src="https://github.com/user-attachments/assets/c0cabb78-1331-4c45-9153-7e89d64d773c" /> **after - text sizes are exact same with 100% sacaling** <img width="1920" height="1080" alt="Dayp8PBSW0" src="https://github.com/user-attachments/assets/204bc85d-64b3-45b1-ae3b-bfc3f6ac1d20" />
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#494