We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d315024 + bef3ad7 commit b6b5dacCopy full SHA for b6b5dac
1 file changed
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
@@ -1291,7 +1291,7 @@ GC createNewGC(long hDC, GCData data) {
1291
}
1292
1293
private int getMonitorZoom() {
1294
- return getMenu().getShell().getMonitor().zoom;
+ return getParent().getShell().getMonitor().zoom;
1295
1296
1297
private int getMenuZoom() {
@@ -1425,7 +1425,7 @@ LRESULT wmMeasureChild (long wParam, long lParam) {
1425
1426
1427
private Point calculateRenderedTextSize() {
1428
- GC gc = new GC(this.getMenu().getShell());
+ GC gc = new GC(this.getParent().getShell());
1429
String textWithoutMnemonicCharacter = getText().replace("&", "");
1430
Point points = gc.textExtent(textWithoutMnemonicCharacter);
1431
gc.dispose();
0 commit comments