From 888e1fe04cdb931f8cb34fd7f9b4fc4bb474b250 Mon Sep 17 00:00:00 2001
From: Phillipus
Date: Thu, 11 Jul 2024 15:28:28 +0100
Subject: [PATCH] [GEF] FigureUtilities uses a Shell with no style
- Set the style to SWT.NONE to stop the Shell momentarily appearing when the workbench theme changes
- See https://bugs.eclipse.org/bugs/show_bug.cgi?id=435915
---
.../src/org/eclipse/draw2d/FigureUtilities.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/org.eclipse.draw2d/src/org/eclipse/draw2d/FigureUtilities.java b/org.eclipse.draw2d/src/org/eclipse/draw2d/FigureUtilities.java
index b5e634274..dc79503e9 100644
--- a/org.eclipse.draw2d/src/org/eclipse/draw2d/FigureUtilities.java
+++ b/org.eclipse.draw2d/src/org/eclipse/draw2d/FigureUtilities.java
@@ -12,6 +12,7 @@
import java.util.ArrayList;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontMetrics;
@@ -72,7 +73,10 @@ public static FontMetrics getFontMetrics(Font f) {
*/
protected static GC getGC() {
if (gc == null) {
- gc = new GC(new Shell());
+ // Phillipus set this to SWT.NONE to stop this Shell momentarily appearing when the workbench theme changes
+ // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=435915
+ //gc = new GC(new Shell());
+ gc = new GC(new Shell(SWT.NONE));
appliedFont = gc.getFont();
}
return gc;