Commit c877469
Adapt size of Dialogs with default size upon zoom change
When moved between monitors of different zoom, Dialogs may not show
their full contents anymore. This is caused by their shell and the used
fonts being linearly scaled in size according to the zoom, even though
font size and required area for a font of a size are not linearly
related. I.e., a font of double the size required more than double of
the width and height.
Since there are many ways to customize Dialogs and their sizes/layouts
during and after initialization, it's difficult to solve that problem in
general. It is, however, most severe for Dialogs that use the default
calculated size and are not resizable, as those Dialogs do not have
sophisticated layouts that adapt to the limited space and may easily
lead to cut offs the user cannot work around by resizing.
Thus, this change adds according zoom change and resize listeners to
identify if a Window uses the default computed size and, in that case,
recomputes it upon zoom change.1 parent 9c171a0 commit c877469
File tree
1 file changed
+55
-0
lines changed- bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs
1 file changed
+55
-0
lines changedLines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
1086 | 1088 | | |
1087 | 1089 | | |
1088 | 1090 | | |
| 1091 | + | |
1089 | 1092 | | |
1090 | 1093 | | |
1091 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1092 | 1147 | | |
1093 | 1148 | | |
1094 | 1149 | | |
| |||
0 commit comments