Commit 8e938bd
committed
[90] Fix cursor initialization when using fractional scaling
Recent Eclipse version support fractional zoom level as opposed to 100%
or 200% zoom. Because no icons exist for those levels, an
IllegalArgumentException is thrown when trying to create the
corresponding cursors.
In order to solve this, one has to consider the following cases:
1) Newer SWT versions provide a Cursor constructor that accepts an
ImageDataProvider. This constructor always creates image data matching
the device zoom.
2) Win32: Older SWT versions automatically upscale the image data to
match the device zoom. Therefore the original image data must be at 100%
zoom.
3) On other operating systems, the image data should be pre-scaled, as
no further scaling is done by SWT.1 parent 0be4aeb commit 8e938bd
File tree
1 file changed
+41
-4
lines changed- bundles/org.eclipse.gmf.runtime.gef.ui/src/org/eclipse/gmf/runtime/gef/ui/internal/l10n
1 file changed
+41
-4
lines changedLines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | | - | |
41 | | - | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
45 | 73 | | |
46 | 74 | | |
47 | 75 | | |
| |||
56 | 84 | | |
57 | 85 | | |
58 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
59 | 96 | | |
0 commit comments