Commit 3062d3a
committed
Create custom cursor for 100%, 150% and 200% zoom #872
At least on Windows and Linux, the operating system doesn't seem to
linearly scale the system cursor.
Instead, predefined cursor images are used for:
- ( ..., 150%) - Cursor at 100% monitor zoom
- [150%, 200%) - Cursor at 150% monitor zoom
- (200%, ...) - Cursor at 200% monitor zoom
SWT is linearly scaling the cursor icon. So if at e.g. 125% zoom, the
cursor inside the widget will be scaled to 125% zoom but is not scaled
outside the widget.
To account for this, the SWT-based cursor is replaced with three cursor
SVGs, one for each of those zoom levels. Note that the images are split
up to make sure the line width is exactly one for each cursor.
Closes #8721 parent e319539 commit 3062d3a
File tree
6 files changed
+93
-88
lines changed- org.eclipse.gef/src/org/eclipse/gef
- internal
- icons
6 files changed
+93
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
Lines changed: 10 additions & 86 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 18 | | |
29 | 19 | | |
30 | | - | |
31 | | - | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
| |||
37 | 25 | | |
38 | 26 | | |
39 | 27 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 28 | | |
57 | 29 | | |
58 | 30 | | |
59 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
60 | 34 | | |
61 | 35 | | |
62 | 36 | | |
63 | 37 | | |
64 | 38 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
83 | 42 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 43 | + | |
| 44 | + | |
102 | 45 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 46 | + | |
| 47 | + | |
124 | 48 | | |
125 | 49 | | |
126 | 50 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
130 | 139 | | |
131 | 140 | | |
132 | | - | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| |||
Lines changed: 22 additions & 0 deletions
Loading
Lines changed: 22 additions & 0 deletions
Loading
Lines changed: 22 additions & 0 deletions
Loading
0 commit comments