File tree 1 file changed +18
-0
lines changed
bundles/org.eclipse.swt/Eclipse SWT Tests/win32/org/eclipse/swt/graphics
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 25
25
@ ExtendWith (WithMonitorSpecificScalingExtension .class )
26
26
class ImagesWin32Tests {
27
27
28
+ private static final String SWT_AUTOSCALE_METHOD = "swt.autoScale.method" ;
29
+ private static String originalAutoScaleMethod ;
30
+
31
+ @ BeforeAll
32
+ static void setUpAutoScaleMethodSmooth () {
33
+ originalAutoScaleMethod = System .getProperty (SWT_AUTOSCALE_METHOD );
34
+ System .setProperty (SWT_AUTOSCALE_METHOD , "smooth" );
35
+ }
36
+
37
+ @ AfterAll
38
+ static void restoreAutoScaleMethod () {
39
+ if (originalAutoScaleMethod != null ) {
40
+ System .setProperty (SWT_AUTOSCALE_METHOD , originalAutoScaleMethod );
41
+ } else {
42
+ System .clearProperty (SWT_AUTOSCALE_METHOD );
43
+ }
44
+ }
45
+
28
46
@ Test
29
47
public void testImageIconTypeShouldNotChangeAfterCallingGetHandleForDifferentZoom () {
30
48
Image icon = Display .getDefault ().getSystemImage (SWT .ICON_ERROR );
You can’t perform that action at this time.
0 commit comments