Commit 1799f06
committed
Modify gc.data.nativeDeviceZoom to use autoscaled zoom when
swt.autoScale is fixed
This change ensures that images and fonts share the same zoom level when
a fixed autoscale value is used.
Previously, when different GCs were created for images and widgets,
their native zoom levels could differ, causing inconsistencies.
For example, in LineNumberRuler, one GC is created from an image and
another from a widget for text measurement. The differing native zooms
led to incorrect text width calculations when applied across GCs.
This update aligns nativeDeviceZoom to the autoscaled zoom value
Fixes #23111 parent 74feaa5 commit 1799f06
File tree
4 files changed
+45
-17
lines changed- bundles/org.eclipse.swt/Eclipse SWT
- common/org/eclipse/swt/internal
- win32/org/eclipse/swt
- graphics
- widgets
4 files changed
+45
-17
lines changedLines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
350 | 374 | | |
351 | 375 | | |
352 | 376 | | |
| |||
378 | 402 | | |
379 | 403 | | |
380 | 404 | | |
381 | | - | |
| 405 | + | |
382 | 406 | | |
383 | 407 | | |
384 | 408 | | |
385 | 409 | | |
386 | | - | |
| 410 | + | |
387 | 411 | | |
388 | 412 | | |
389 | 413 | | |
| |||
400 | 424 | | |
401 | 425 | | |
402 | 426 | | |
403 | | - | |
| 427 | + | |
404 | 428 | | |
405 | 429 | | |
406 | 430 | | |
| |||
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| |||
2712 | 2712 | | |
2713 | 2713 | | |
2714 | 2714 | | |
2715 | | - | |
| 2715 | + | |
2716 | 2716 | | |
2717 | 2717 | | |
2718 | 2718 | | |
| |||
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
2805 | | - | |
| 2805 | + | |
2806 | 2806 | | |
2807 | 2807 | | |
2808 | 2808 | | |
| |||
3945 | 3945 | | |
3946 | 3946 | | |
3947 | 3947 | | |
3948 | | - | |
| 3948 | + | |
3949 | 3949 | | |
3950 | 3950 | | |
3951 | 3951 | | |
| |||
4378 | 4378 | | |
4379 | 4379 | | |
4380 | 4380 | | |
4381 | | - | |
| 4381 | + | |
4382 | 4382 | | |
4383 | | - | |
| 4383 | + | |
4384 | 4384 | | |
4385 | 4385 | | |
4386 | 4386 | | |
| |||
5015 | 5015 | | |
5016 | 5016 | | |
5017 | 5017 | | |
5018 | | - | |
| 5018 | + | |
5019 | 5019 | | |
5020 | 5020 | | |
5021 | 5021 | | |
5022 | 5022 | | |
5023 | | - | |
| 5023 | + | |
5024 | 5024 | | |
5025 | 5025 | | |
5026 | 5026 | | |
| |||
5939 | 5939 | | |
5940 | 5940 | | |
5941 | 5941 | | |
5942 | | - | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
| 5945 | + | |
| 5946 | + | |
5943 | 5947 | | |
5944 | 5948 | | |
5945 | 5949 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
| 773 | + | |
774 | 774 | | |
775 | | - | |
| 775 | + | |
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1763 | 1763 | | |
1764 | 1764 | | |
1765 | 1765 | | |
1766 | | - | |
| 1766 | + | |
1767 | 1767 | | |
1768 | 1768 | | |
1769 | 1769 | | |
| |||
0 commit comments