diff --git a/app/lib/flatlaf-0.27.jar b/app/lib/flatlaf-0.27.jar new file mode 100644 index 000000000..b9894b437 Binary files /dev/null and b/app/lib/flatlaf-0.27.jar differ diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index cdac3059f..a1da882da 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -61,6 +61,8 @@ import processing.app.syntax.PdeKeywords; import processing.app.syntax.SketchTextAreaDefaultInputMap; import processing.app.tools.MenuScroller; import processing.app.tools.ZipDeflater; +import com.formdev.flatlaf.FlatLightLaf; +import com.formdev.flatlaf.FlatDarkLaf; import javax.swing.*; import java.awt.*; @@ -244,12 +246,19 @@ public class Base { Theme.init(); System.setProperty("swing.aatext", PreferencesData.get("editor.antialias", "true")); - // Set the look and feel before opening the window + try { + UIManager.setLookAndFeel( new FlatLightLaf() ); + } catch( Exception ex ) { + System.err.println( "Failed to initialize LaF" ); + } + + /* try { BaseNoGui.getPlatform().setLookAndFeel(); } catch (Exception e) { // ignore } + */ // Use native popups so they don't look so crappy on osx JPopupMenu.setDefaultLightWeightPopupEnabled(false); diff --git a/build/windows/launcher/config.xml b/build/windows/launcher/config.xml index 6ff7ebc57..2fbf14b67 100644 --- a/build/windows/launcher/config.xml +++ b/build/windows/launcher/config.xml @@ -37,6 +37,7 @@ %EXEDIR%/lib/commons-logging-1.0.4.jar %EXEDIR%/lib/commons-net-3.3.jar %EXEDIR%/lib/commons-io-2.6.jar + %EXEDIR%/lib/flatlaf-0.27.jar %EXEDIR%/lib/jackson-annotations-2.9.5.jar %EXEDIR%/lib/jackson-core-2.9.5.jar %EXEDIR%/lib/jackson-databind-2.9.5.jar diff --git a/build/windows/launcher/config_debug.xml b/build/windows/launcher/config_debug.xml index 238f7b724..95e150aab 100644 --- a/build/windows/launcher/config_debug.xml +++ b/build/windows/launcher/config_debug.xml @@ -37,6 +37,7 @@ %EXEDIR%/lib/commons-logging-1.0.4.jar %EXEDIR%/lib/commons-net-3.3.jar %EXEDIR%/lib/commons-io-2.6.jar + %EXEDIR%/lib/flatlaf-0.27.jar %EXEDIR%/lib/jackson-annotations-2.9.5.jar %EXEDIR%/lib/jackson-core-2.9.5.jar %EXEDIR%/lib/jackson-databind-2.9.5.jar