Skip to content

Commit f6c5753

Browse files
HeikoKlareakoch-yatta
authored andcommitted
[Win32] Initialize nativeZoom of TrayItem
The Tray implementation uses the default constructor of the Widget class. When using that constructor, the nativeZoom of the widget is not initialized. In case of a Tray, contained TrayItems inherit that zoom and will fail to get an image set because the zoom is zero. With this change, a TrayItem will initialize its native zoom based on the zoom of the context device.
1 parent 8c1409a commit f6c5753

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public class TrayItem extends Item {
7979
public TrayItem (Tray parent, int style) {
8080
super (parent, style);
8181
this.parent = parent;
82+
this.nativeZoom = display.getDeviceZoom();
8283
parent.createItem (this, parent.getItemCount ());
8384
createUpdateWidget (true);
8485
}

0 commit comments

Comments
 (0)