From 361fb56985614891f594d314098fc5a57ab868cb Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 16 Jan 2023 17:25:17 +0100 Subject: [PATCH 1/2] Update FlatLaf from 2.6 to 3.0; added macOS light and dark themes --- platform/libs.flatlaf/external/binaries-list | 2 +- .../{flatlaf-2.6-license.txt => flatlaf-3.0-license.txt} | 4 ++-- platform/libs.flatlaf/manifest.mf | 2 +- platform/libs.flatlaf/nbproject/project.properties | 8 ++++---- platform/libs.flatlaf/nbproject/project.xml | 5 +++-- .../src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties | 4 ++-- .../src/org/netbeans/swing/laf/flatlaf/Installer.java | 8 +++++++- 7 files changed, 20 insertions(+), 13 deletions(-) rename platform/libs.flatlaf/external/{flatlaf-2.6-license.txt => flatlaf-3.0-license.txt} (99%) diff --git a/platform/libs.flatlaf/external/binaries-list b/platform/libs.flatlaf/external/binaries-list index b51d5449fe21..3b4e924a201e 100644 --- a/platform/libs.flatlaf/external/binaries-list +++ b/platform/libs.flatlaf/external/binaries-list @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -4DD2BA228E3C57EB3D80E3927B5A6A33265EB69B com.formdev:flatlaf:2.6 +B5410F3F9137FEBC7D916CA4E0A7E9F6DDEB5B9A com.formdev:flatlaf:3.0 diff --git a/platform/libs.flatlaf/external/flatlaf-2.6-license.txt b/platform/libs.flatlaf/external/flatlaf-3.0-license.txt similarity index 99% rename from platform/libs.flatlaf/external/flatlaf-2.6-license.txt rename to platform/libs.flatlaf/external/flatlaf-3.0-license.txt index 1ea20258dd88..6e52972a1dfe 100644 --- a/platform/libs.flatlaf/external/flatlaf-2.6-license.txt +++ b/platform/libs.flatlaf/external/flatlaf-3.0-license.txt @@ -1,7 +1,7 @@ Name: FlatLaf Look and Feel Description: FlatLaf Look and Feel -Version: 2.6 -Files: flatlaf-2.6.jar +Version: 3.0 +Files: flatlaf-3.0.jar License: Apache-2.0 Origin: FormDev Software GmbH. URL: https://www.formdev.com/flatlaf/ diff --git a/platform/libs.flatlaf/manifest.mf b/platform/libs.flatlaf/manifest.mf index 504eb06344ac..2191e9c3047a 100644 --- a/platform/libs.flatlaf/manifest.mf +++ b/platform/libs.flatlaf/manifest.mf @@ -4,4 +4,4 @@ OpenIDE-Module: org.netbeans.libs.flatlaf/1 OpenIDE-Module-Install: org/netbeans/libs/flatlaf/Installer.class OpenIDE-Module-Specification-Version: 1.13 AutoUpdate-Show-In-Client: false -OpenIDE-Module-Implementation-Version: 2.6 +OpenIDE-Module-Implementation-Version: 3.0 diff --git a/platform/libs.flatlaf/nbproject/project.properties b/platform/libs.flatlaf/nbproject/project.properties index 7991fef7e145..3bdb59b5818e 100644 --- a/platform/libs.flatlaf/nbproject/project.properties +++ b/platform/libs.flatlaf/nbproject/project.properties @@ -31,11 +31,11 @@ spec.version.base.fatal.warning=false # # So when FlatLaf is updated, the OpenIDE-Module-Implementation-Version entry # in manifest.mf needs to be updated to match the new FlatLaf version. -release.external/flatlaf-2.6.jar=modules/ext/flatlaf-2.6.jar +release.external/flatlaf-3.0.jar=modules/ext/flatlaf-3.0.jar -release.external/flatlaf-2.6.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86.dll=modules/lib/flatlaf-windows-x86.dll -release.external/flatlaf-2.6.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86_64.dll=modules/lib/flatlaf-windows-x86_64.dll -release.external/flatlaf-2.6.jar!/com/formdev/flatlaf/natives/libflatlaf-linux-x86_64.so=modules/lib/libflatlaf-linux-x86_64.so +release.external/flatlaf-3.0.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86.dll=modules/lib/flatlaf-windows-x86.dll +release.external/flatlaf-3.0.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86_64.dll=modules/lib/flatlaf-windows-x86_64.dll +release.external/flatlaf-3.0.jar!/com/formdev/flatlaf/natives/libflatlaf-linux-x86_64.so=modules/lib/libflatlaf-linux-x86_64.so jnlp.verify.excludes=\ modules/lib/flatlaf-windows-x86.dll,\ modules/lib/flatlaf-windows-x86_64.dll,\ diff --git a/platform/libs.flatlaf/nbproject/project.xml b/platform/libs.flatlaf/nbproject/project.xml index 95e90a3eabfb..10230d2be2be 100644 --- a/platform/libs.flatlaf/nbproject/project.xml +++ b/platform/libs.flatlaf/nbproject/project.xml @@ -44,11 +44,12 @@ com.formdev.flatlaf + com.formdev.flatlaf.themes com.formdev.flatlaf.util - ext/flatlaf-2.6.jar - external/flatlaf-2.6.jar + ext/flatlaf-3.0.jar + external/flatlaf-3.0.jar diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties index be48cc194dc6..72b253d074ae 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties @@ -84,8 +84,8 @@ nb.completion.selectedForeground=@selectionForeground #---- TabControlIcon ---- -TabControlIcon.foreground=$ComboBox.buttonArrowColor -TabControlIcon.disabledForeground=$ComboBox.buttonDisabledArrowColor +TabControlIcon.foreground=tint(@foreground,40%) +TabControlIcon.disabledForeground=lighten($TabControlIcon.foreground,25%) TabControlIcon.rolloverBackground=$Button.toolbar.hoverBackground TabControlIcon.pressedBackground=$Button.toolbar.pressedBackground TabControlIcon.close.rolloverBackground=#c74f50 diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java index 03543ac2b592..7f62f144360d 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java @@ -21,6 +21,8 @@ import com.formdev.flatlaf.FlatLaf; import com.formdev.flatlaf.FlatDarkLaf; import com.formdev.flatlaf.FlatLightLaf; +import com.formdev.flatlaf.themes.FlatMacDarkLaf; +import com.formdev.flatlaf.themes.FlatMacLightLaf; import javax.swing.UIManager; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; @@ -29,7 +31,9 @@ @NbBundle.Messages({ "LBL_FLATLAF_LIGHT=FlatLaf Light", - "LBL_FLATLAF_DARK=FlatLaf Dark" + "LBL_FLATLAF_DARK=FlatLaf Dark", + "LBL_FLATLAF_MACOS_LIGHT=FlatLaf macOS Light", + "LBL_FLATLAF_MACOS_DARK=FlatLaf macOS Dark" }) public class Installer extends ModuleInstall { @@ -37,6 +41,8 @@ public class Installer extends ModuleInstall { public void validate() throws IllegalStateException { UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_LIGHT(), FlatLightLaf.class.getName())); UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_DARK(), FlatDarkLaf.class.getName())); + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_MACOS_LIGHT(), FlatMacLightLaf.class.getName())); + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_MACOS_DARK(), FlatMacDarkLaf.class.getName())); // tell FlatLaf that it should look for .properties files in the given package FlatLaf.registerCustomDefaultsSource("org.netbeans.swing.laf.flatlaf", getClass().getClassLoader()); From 06e18b548bb877d24aa94e7e1646cf003c6829d8 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Mon, 23 Jan 2023 00:12:31 +0100 Subject: [PATCH 2/2] FlatLaf: renamed macOS themes to Cupertino --- .../src/org/netbeans/swing/laf/flatlaf/Installer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java index 7f62f144360d..0c6fcc2b4b5e 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java @@ -32,8 +32,8 @@ @NbBundle.Messages({ "LBL_FLATLAF_LIGHT=FlatLaf Light", "LBL_FLATLAF_DARK=FlatLaf Dark", - "LBL_FLATLAF_MACOS_LIGHT=FlatLaf macOS Light", - "LBL_FLATLAF_MACOS_DARK=FlatLaf macOS Dark" + "LBL_FLATLAF_CUPERTINO_LIGHT=FlatLaf Cupertino Light", + "LBL_FLATLAF_CUPERTINO_DARK=FlatLaf Cupertino Dark" }) public class Installer extends ModuleInstall { @@ -41,8 +41,8 @@ public class Installer extends ModuleInstall { public void validate() throws IllegalStateException { UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_LIGHT(), FlatLightLaf.class.getName())); UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_DARK(), FlatDarkLaf.class.getName())); - UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_MACOS_LIGHT(), FlatMacLightLaf.class.getName())); - UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_MACOS_DARK(), FlatMacDarkLaf.class.getName())); + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_CUPERTINO_LIGHT(), FlatMacLightLaf.class.getName())); + UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(Bundle.LBL_FLATLAF_CUPERTINO_DARK(), FlatMacDarkLaf.class.getName())); // tell FlatLaf that it should look for .properties files in the given package FlatLaf.registerCustomDefaultsSource("org.netbeans.swing.laf.flatlaf", getClass().getClassLoader());