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.4 to 2.5 #4696

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/libs.flatlaf/external/binaries-list
Expand Up @@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.

691E1F12C78F42E0DFD9FC37BC599042A1EBDD0D com.formdev:flatlaf:2.4
53B5104BDF92CBC7A650E075ED7296DD0AB77CF3 com.formdev:flatlaf:2.5
@@ -1,7 +1,7 @@
Name: FlatLaf Look and Feel
Description: FlatLaf Look and Feel
Version: 2.4
Files: flatlaf-2.4.jar
Version: 2.5
Files: flatlaf-2.5.jar
License: Apache-2.0
Origin: FormDev Software GmbH.
URL: https://www.formdev.com/flatlaf/
Expand Down
3 changes: 2 additions & 1 deletion platform/libs.flatlaf/manifest.mf
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/flatlaf/Bundle.properties
OpenIDE-Module: org.netbeans.libs.flatlaf/1
OpenIDE-Module-Install: org/netbeans/libs/flatlaf/Installer.class
OpenIDE-Module-Specification-Version: 1.12
AutoUpdate-Show-In-Client: false

OpenIDE-Module-Implementation-Version: 2.5
21 changes: 20 additions & 1 deletion platform/libs.flatlaf/nbproject/project.properties
Expand Up @@ -20,4 +20,23 @@ javac.compilerargs=-Xlint:unchecked
javac.source=1.8
nbm.target.cluster=platform

release.external/flatlaf-2.4.jar=modules/ext/flatlaf-2.4.jar
spec.version.base.fatal.warning=false

# It is stated, that access to packages outside com.formdev.flatlaf and
# com.formdev.flatlaf.util is not a supported API. Setting the implementation
# version allows modules, that need to do this (SwingX integration) to access
# internals
#
# https://github.com/apache/netbeans/pull/4619
#
# 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.5.jar=modules/ext/flatlaf-2.5.jar

release.external/flatlaf-2.5.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86.dll=modules/lib/flatlaf-windows-x86.dll
release.external/flatlaf-2.5.jar!/com/formdev/flatlaf/natives/flatlaf-windows-x86_64.dll=modules/lib/flatlaf-windows-x86_64.dll
release.external/flatlaf-2.5.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,\
modules/lib/libflatlaf-linux-x86_64.so
23 changes: 20 additions & 3 deletions platform/libs.flatlaf/nbproject/project.xml
Expand Up @@ -24,14 +24,31 @@
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
<code-name-base>org.netbeans.libs.flatlaf</code-name-base>
<module-dependencies/>
<module-dependencies>
<dependency>
<code-name-base>org.openide.modules</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.66</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.ui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.26</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages>
<package>com.formdev.flatlaf</package>
<package>com.formdev.flatlaf.util</package>
</public-packages>
<class-path-extension>
<runtime-relative-path>ext/flatlaf-2.4.jar</runtime-relative-path>
<binary-origin>external/flatlaf-2.4.jar</binary-origin>
<runtime-relative-path>ext/flatlaf-2.5.jar</runtime-relative-path>
<binary-origin>external/flatlaf-2.5.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
34 changes: 34 additions & 0 deletions platform/libs.flatlaf/src/org/netbeans/libs/flatlaf/Installer.java
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.libs.flatlaf;

import com.formdev.flatlaf.FlatSystemProperties;
import java.io.File;
import org.openide.modules.InstalledFileLocator;
import org.openide.modules.ModuleInstall;

public class Installer extends ModuleInstall {

@Override
public void validate() {
super.validate();
File libDirectory = InstalledFileLocator.getDefault().locate("modules/lib", "org.netbeans.libs.flatlaf", false); //NOI18N
System.setProperty( FlatSystemProperties.NATIVE_LIBRARY_PATH, libDirectory.getAbsolutePath() );
}
}
Expand Up @@ -38,6 +38,10 @@ public void validate() throws IllegalStateException {

// tell FlatLaf that it should look for .properties files in the given package
FlatLaf.registerCustomDefaultsSource("org.netbeans.swing.laf.flatlaf", getClass().getClassLoader());

// don't allow FlatLaf to update UI on system font changes because this would
// invoke UIManager.setLookAndFeel() and SwingUtilities.updateComponentTreeUI()
System.setProperty( "flatlaf.updateUIOnSystemFontChange", "false" );
}

}