Repository navigation
Fix high-DPI and large font scaling - #135
Conversation
There was a problem hiding this comment.
Pull request overview
Updates WinForms startup configuration to improve High-DPI behavior by using the SDK-provided ApplicationConfiguration.Initialize() path and setting the project’s DPI mode to SystemAware.
Changes:
- Replaced explicit WinForms startup calls with
ApplicationConfiguration.Initialize()inProgram.cs. - Configured WinForms defaults via MSBuild properties (visual styles, text rendering, High DPI mode) in the GUI project file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Key2Joy.Gui/Program.cs | Switches WinForms initialization to ApplicationConfiguration.Initialize() prior to showing the startup form. |
| Key2Joy.Gui/Key2Joy.Gui.csproj | Sets WinForms app defaults including ApplicationHighDpiMode=SystemAware to address High-DPI scaling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var selected = Enum.Parse(enumConfigControlAttribute.EnumType, value.ToString()); | ||
| ComboBox control = new() | ||
| { | ||
| AutoSize = true, |
There was a problem hiding this comment.
ComboBox.AutoSize is documented as not relevant for System.Windows.Forms.ComboBox, so this won’t help with DPI/large-font sizing for enum controls and may give a false sense that the scaling issue is addressed here. Consider removing AutoSize and, if height needs to follow font scaling, set the control’s height based on PreferredHeight (or avoid forcing the height at all and rely on DPI autoscaling).
| AutoSize = true, |
Fixes scaling on systems with high DPI or large font sizes.
Closes #124