Commit 2129e73
committed
Design improvement for scaling win32 widgets
This commit improves thes design implementation for widgets in win32 by
moving away from DPIZoomChangeRegistry to an event-driven design using
ZoomChanged event and inheritance. All the classes extending widget must
override handleDPIChange method. The Widget class registers a listener
for ZoomChanged event and Shell (Control) on getting a DPI_CHANGED event
from the OS notifies its ZoomChanged listener as the root of the event
which executes all the handleDPIChange methods for all the parent
classes in hierarchial order and sending the event down in the widget
tree vy notifying ZoomChanged listeners of other associated or children
widgets.1 parent c588cde commit 2129e73
32 files changed
Lines changed: 272 additions & 499 deletions
File tree
- bundles/org.eclipse.swt
- Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom
- Eclipse SWT Tests/win32/org/eclipse/swt/internal
- Eclipse SWT
- common/org/eclipse/swt/widgets
- win32/org/eclipse/swt
- internal
- widgets
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
2026 | 2027 | | |
2027 | 2028 | | |
2028 | 2029 | | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
2032 | | - | |
2033 | | - | |
2034 | | - | |
2035 | | - | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
2039 | | - | |
2040 | | - | |
2041 | | - | |
2042 | | - | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
2043 | 2043 | | |
2044 | 2044 | | |
Lines changed: 11 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
759 | 758 | | |
760 | 759 | | |
761 | 760 | | |
| 761 | + | |
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
| |||
10901 | 10901 | | |
10902 | 10902 | | |
10903 | 10903 | | |
10904 | | - | |
10905 | | - | |
10906 | | - | |
10907 | | - | |
10908 | | - | |
10909 | | - | |
10910 | | - | |
10911 | | - | |
10912 | | - | |
10913 | | - | |
10914 | | - | |
10915 | | - | |
10916 | | - | |
| 10904 | + | |
| 10905 | + | |
| 10906 | + | |
10917 | 10907 | | |
10918 | | - | |
10919 | | - | |
10920 | | - | |
10921 | | - | |
| 10908 | + | |
| 10909 | + | |
| 10910 | + | |
| 10911 | + | |
10922 | 10912 | | |
10923 | 10913 | | |
10924 | 10914 | | |
10925 | | - | |
10926 | | - | |
| 10915 | + | |
| 10916 | + | |
| 10917 | + | |
10927 | 10918 | | |
10928 | 10919 | | |
10929 | 10920 | | |
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
227 | 237 | | |
Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
| |||
1561 | 1559 | | |
1562 | 1560 | | |
1563 | 1561 | | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1568 | 1565 | | |
1569 | | - | |
| 1566 | + | |
| 1567 | + | |
1570 | 1568 | | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1574 | 1572 | | |
1575 | 1573 | | |
1576 | 1574 | | |
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| |||
658 | 654 | | |
659 | 655 | | |
660 | 656 | | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
667 | 661 | | |
668 | | - | |
| 662 | + | |
669 | 663 | | |
670 | 664 | | |
671 | | - | |
672 | | - | |
| 665 | + | |
| 666 | + | |
673 | 667 | | |
674 | | - | |
| 668 | + | |
675 | 669 | | |
676 | 670 | | |
677 | 671 | | |
0 commit comments