Commit 3ca03ab
johan.andruejol
BUG: Fix high DPI display on windows with multiple screens
The issue arises when displaying Slicer on multiple high dpi screens. A
transparent bar is displayed below the toolbar and shifts the whole
rendering.
This comes from the Qt windows display plugin (QPA layer) that sets the
windows dpi awarness to PROCESS_PER_MONITOR_DPI_AWARE by default. Although
it is the appropriate value, Qt doesn't handle it properly.
Unfortunately, there is no API to call to change the ProcessDPIAwarness
value. We can however directly call the windows method SetProcessDPIAware()
that will superseed the Qt call and set the ProcessDPIAwarness to
PROCESS_SYSTEM_DPI_AWARE instead which solves the issue.
For reference:
http://doc.qt.io/qt-5/qpa.html
https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
git-svn-id: http://svn.slicer.org/Slicer4/trunk@26936 3bd1e089-480b-0410-8dfb-8563597acbee1 parent 6935859 commit 3ca03ab
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
0 commit comments