From 083bfa6f389ea30ef36311457b75a559203b4a4e Mon Sep 17 00:00:00 2001 From: "Klare, Heiko" Date: Wed, 11 Feb 2026 14:06:38 +0100 Subject: [PATCH] [Win32] Update images of tree columns upon DPI change When moving a shell with a tree that uses images in any other than the first column to another monitor, those images will be lost in case the other monitor has a different zoom such that the UI is rescaled. The reason is that the DPI change handling for TreeItem does not consider the other images of the tree item at all. This change explicitly resets all images of a tree item upon DPI change. Contributes to https://github.com/eclipse-platform/eclipse.platform.swt/issues/3075 --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java index 5f39d048e9..6f96cf3b3a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java @@ -1815,6 +1815,11 @@ String getNameText () { @Override void handleDPIChange(Event event, float scalingFactor) { super.handleDPIChange(event, scalingFactor); + if (images != null) { + for (int i = 1; i < images.length; i++) { + setImage(i, images[i]); + } + } if (font != null) { setFont(font); }