Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FlatLaf from 2.6 to 3.0 and add macOS light and dark themes #5298

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/libs.flatlaf/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion platform/libs.flatlaf/manifest.mf
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions platform/libs.flatlaf/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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,\
Expand Down
5 changes: 3 additions & 2 deletions platform/libs.flatlaf/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
</module-dependencies>
<public-packages>
<package>com.formdev.flatlaf</package>
<package>com.formdev.flatlaf.themes</package>
<package>com.formdev.flatlaf.util</package>
</public-packages>
<class-path-extension>
<runtime-relative-path>ext/flatlaf-2.6.jar</runtime-relative-path>
<binary-origin>external/flatlaf-2.6.jar</binary-origin>
<runtime-relative-path>ext/flatlaf-3.0.jar</runtime-relative-path>
<binary-origin>external/flatlaf-3.0.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,14 +31,18 @@

@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 {

@Override
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());
Expand Down