mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 08:15:09 +03:00
Unit tests: re-enable testing scaled UI
avoid using UI_SCALE_ENABLED = false because if this test is executed first, class UIScale does not register listeners to UIManager, which prevents updating user scale factor on font changes and testing scaled UI fails
This commit is contained in:
@@ -40,7 +40,7 @@ public class TestFlatStyleClasses
|
||||
|
||||
@BeforeAll
|
||||
static void setup() {
|
||||
System.setProperty( FlatSystemProperties.UI_SCALE_ENABLED, "false" );
|
||||
System.setProperty( FlatSystemProperties.UI_SCALE, "1x" );
|
||||
TestUtils.setup( false );
|
||||
|
||||
UIManager.put( "[style]Button.primary", BUTTON_PRIMARY );
|
||||
@@ -100,7 +100,7 @@ public class TestFlatStyleClasses
|
||||
@AfterAll
|
||||
static void cleanup() {
|
||||
TestUtils.cleanup();
|
||||
System.clearProperty( FlatSystemProperties.UI_SCALE_ENABLED );
|
||||
System.clearProperty( FlatSystemProperties.UI_SCALE );
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.formdev.flatlaf.FlatSystemProperties;
|
||||
*/
|
||||
public class TestUtils
|
||||
{
|
||||
public static final float[] FACTORS = new float[] { 1f }; //, 1.25f, 1.5f, 1.75f, 2f, 2.25f, 2.5f, 2.75f, 3f, 3.25f, 3.5f, 3.75f, 4f, 5f, 6f };
|
||||
public static final float[] FACTORS = new float[] { 1f, 1.25f, 1.5f, 1.75f, 2f, 2.25f, 2.5f, 2.75f, 3f, 3.25f, 3.5f, 3.75f, 4f, 5f, 6f };
|
||||
|
||||
public static void setup( boolean withFocus ) {
|
||||
System.setProperty( FlatSystemProperties.UI_SCALE, "1x" );
|
||||
|
||||
Reference in New Issue
Block a user