[Bug 59919] New: `Control.DeviceDpi` missing (https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.devicedpi?view=netframework-4.8)
http://bugs.winehq.org/show_bug.cgi?id=59919 Bug ID: 59919 Summary: `Control.DeviceDpi` missing (https://learn.microsoft.com/en-us/dotnet/api/system.w indows.forms.control.devicedpi?view=netframework-4.8) Product: Framework Mono Version: main Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: System.Windows.Forms Assignee: wine-bugs@list.winehq.org Reporter: matthias.klaey@gmx.ch CC: madewokherd@gmail.com Distribution: --- Neither "https://github.com/mono/mono/blob/main/mcs/class/System.Windows.Forms/System..." nor "https://gitlab.winehq.org/mono/mono/-/blob/main/mcs/class/System.Windows.For..." provides `Control.DeviceDpi`, making it unnecessarily harder to implement DPI scale aware applications. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59919 --- Comment #1 from matthias.klaey@gmx.ch <matthias.klaey@gmx.ch> --- Note the dependency to the following `App.config` tag: <System.Windows.Forms.ApplicationConfigurationSection> <add key="DpiAwareness" value="PerMonitorV2" /> </System.Windows.Forms.ApplicationConfigurationSection> But even if `DpiAwareness` cannot fully be implemented, at least the `Control.DeviceDpi` property could be added, throwing e.g. a `NotSupportedException`. This would allow an application to do a runtime check like drafted below, rather than having to apply a #if (!MONO) compilation conditional. if (!EnvironmentIsMono) { var dpi = Control.DeviceDpi; ... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59919 --- Comment #2 from matthias.klaey@gmx.ch <matthias.klaey@gmx.ch> --- Additional reference: Mono #21630 Unrecognized configuration section System.Windows.Forms.ApplicationConfigurationSection (https://github.com/mono/mono/issues/21630) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59919 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|`Control.DeviceDpi` missing |Control.DeviceDpi missing |(https://learn.microsoft.co | |m/en-us/dotnet/api/system.w | |indows.forms.control.device | |dpi?view=netframework-4.8) | URL| |https://learn.microsoft.com | |/en-us/dotnet/api/system.wi | |ndows.forms.control.deviced | |pi?view=netframework-4.8 --- Comment #3 from Ken Sharp <imwellcushtymelike@gmail.com> --- https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.de... Which application is affected by this? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59919 --- Comment #4 from Esme Povirk <madewokherd@gmail.com> --- You can query DPI through System.Drawing, I think, but yeah, it's not great. And worse, most controls in Mono's winforms are not themselves DPI-aware. It led to the in-development wayland driver returning scaled Graphics objects and not reporting accurate DPI. Given that we're unlikely to find someone who can actually implement DPI awareness for most of the controls, I'm not sure how to handle it. We may want to just do the scaled Graphics object thing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla