Disable flickering in ColorSelectionDialog 62/2562/2
authorjsimomaa <jani.simomaa@gmail.com>
Tue, 18 Dec 2018 13:10:14 +0000 (15:10 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 18 Dec 2018 13:50:33 +0000 (13:50 +0000)
gitlab #238

Change-Id: Ib21e8b4eb569172f96db1b463297abe12d3d061c

bundles/org.simantics.utils.ui/src/org/simantics/utils/ui/color/ColorGradientCanvas.java

index 11ba7642b6240b9883a968d02c31d62ad68fac22..c3506f8bbbcbb18efaee5995d3fbc6a697aa0841 100644 (file)
@@ -33,7 +33,7 @@ public class ColorGradientCanvas extends Canvas{
        int style;
        
        public ColorGradientCanvas(Composite parent, int style) {
-               super(parent,(style|SWT.BORDER)&(~(SWT.VERTICAL|SWT.HORIZONTAL)));
+               super(parent,(style|SWT.BORDER)&(~(SWT.VERTICAL|SWT.HORIZONTAL))|SWT.DOUBLE_BUFFERED);
                this.style = style & (SWT.VERTICAL | SWT.HORIZONTAL) ;
                addPaintListener(createPaintListener());
        }