Skip to content

Commit b6b5dac

Browse files
authored
Merge branch 'eclipse-platform:master' into master
2 parents d315024 + bef3ad7 commit b6b5dac

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ GC createNewGC(long hDC, GCData data) {
12911291
}
12921292

12931293
private int getMonitorZoom() {
1294-
return getMenu().getShell().getMonitor().zoom;
1294+
return getParent().getShell().getMonitor().zoom;
12951295
}
12961296

12971297
private int getMenuZoom() {
@@ -1425,7 +1425,7 @@ LRESULT wmMeasureChild (long wParam, long lParam) {
14251425
}
14261426

14271427
private Point calculateRenderedTextSize() {
1428-
GC gc = new GC(this.getMenu().getShell());
1428+
GC gc = new GC(this.getParent().getShell());
14291429
String textWithoutMnemonicCharacter = getText().replace("&", "");
14301430
Point points = gc.textExtent(textWithoutMnemonicCharacter);
14311431
gc.dispose();

0 commit comments

Comments
 (0)