Commit fdbb769
[Win32] Use exact selected font size from FontDialog
The FontDialog implementation creates a font handle based on the
selection in the dialog to extract information about the font size out
of that created font. Due to point/pixel conversion and roundings that
depend on the current DPI (affected by the primary monitor zoom), the
resulting font size selected differs from what the user has selected.
For example, when selecting a 10pt font, the result of the dialog will
contain a height of 9.75pt on a 100% monitor and of 10.2pt on a 125%
monitor.
At the same time, the dialog manages the logically selected size, i.e.,
in the given scenario the selected 10pt, which could be used instead.
This change replaces the complex and imprecise font height extraction
logic with a simple read of the actual value selected by the user.1 parent f878858 commit fdbb769
File tree
1 file changed
+1
-30
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets
1 file changed
+1
-30
lines changedLines changed: 1 addition & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 252 | + | |
282 | 253 | | |
283 | 254 | | |
284 | 255 | | |
| |||
0 commit comments