Compare commits

..

4 Commits

7 changed files with 26 additions and 39 deletions

View File

@@ -72,36 +72,14 @@ jobs:
# tar.exe: Couldn't open ~/.gradle/caches/modules-2/modules-2.lock: Permission denied
run: ./gradlew build-natives --no-daemon
- name: Upload unsigned Windows DLLs for signing by SignPath.org
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
id: windows-unsigned
uses: actions/upload-artifact@v4
- name: Sign Windows DLLs
if: matrix.os == 'windows-latest'
uses: skymatic/code-sign-action@v3
with:
name: FlatLaf-natives-windows-unsigned
path: flatlaf-natives/flatlaf-natives-windows/build/lib/main/release/**/*.dll
- name: Sign Windows DLLs using SignPath.org
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
uses: signpath/github-action-submit-signing-request@v2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
project-slug: FlatLaf
signing-policy-slug: release-signing
artifact-configuration-slug: windows-dlls
github-artifact-id: ${{ steps.windows-unsigned.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: flatlaf-natives/flatlaf-natives-windows/build/lib/signed
- name: Copy signed Windows DLLs to flatlaf-core
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
shell: bash
run: |
SRC=flatlaf-natives/flatlaf-natives-windows/build/lib/signed
DEST=flatlaf-core/src/main/resources/com/formdev/flatlaf/natives
cp $SRC/aarch64/flatlaf-natives-windows.dll $DEST/flatlaf-windows-arm64.dll
cp $SRC/x86/flatlaf-natives-windows.dll $DEST/flatlaf-windows-x86.dll
cp $SRC/x86-64/flatlaf-natives-windows.dll $DEST/flatlaf-windows-x86_64.dll
certificate: '${{ secrets.CODE_SIGN_CERT_BASE64 }}'
password: '${{ secrets.CODE_SIGN_CERT_PASSWORD }}'
certificatesha1: '${{ secrets.CODE_SIGN_CERT_SHA1 }}'
folder: 'flatlaf-core/src/main/resources/com/formdev/flatlaf/natives'
- name: Sign macOS natives
if: matrix.os == 'DISABLED--macos-latest'
@@ -134,7 +112,7 @@ jobs:
# cleanup
security delete-keychain $KEYCHAIN_PATH
- name: Set artifacts pattern for upload step
- name: Set artifacts pattern
shell: bash
run: |
case ${{ matrix.os }} in

View File

@@ -5,11 +5,15 @@ FlatLaf Change Log
- ComboBox: Added UI property `ComboBox.buttonFocusedEditableBackground`. (issue
#1068)
- Dialog: Some client properties (e.g. `JRootPane.titleBarShowTitle`) did not
work before the dialog was made visible. (issue #1081)
- Popup: Fixed scrolling popup painting issue on Windows 10 when a glass pane is
visible and frame is maximized. (issue #1071)
- Slider: Styling `thumbSize` or `focusWidth` did not update slider size/layout.
(PR #1074)
- ToolBar: Grip disappeared when switching between Look and Feels. (issue #1075)
- macOS: Popups (menus and combobox lists) were not always hidden when window is
resized. (issue #1082)
- Extras:
- UI defaults inspector: Fixed NPE if color of `FlatLineBorder` is null. Also
use `FlatLineBorder` line color as cell background color in "Value" column.

View File

@@ -80,9 +80,6 @@ Otherwise, download `flatlaf-<version>.jar` here:
[Native Libraries distribution](https://www.formdev.com/flatlaf/native-libraries/)
for instructions on how to redistribute FlatLaf native libraries with your
application.
- Windows DLLs: Free code signing provided by
[SignPath.io](https://about.signpath.io/), certificate by
[SignPath Foundation](https://signpath.org/).
- If repackaging FlatLaf (and other) JARs into a single fat/uber JAR:
- add `Multi-Release: true` to `META-INF/MANIFEST.MF`
- keep `META-INF/versions/` and `META-INF/services/` directories

View File

@@ -310,8 +310,8 @@ public abstract class FlatLaf
// install submenu usability helper
subMenuUsabilityHelperInstalled = SubMenuUsabilityHelper.install();
// install Linux popup menu canceler
if( SystemInfo.isLinux )
// install Linux/macOS popup menu canceler
if( SystemInfo.isLinux || SystemInfo.isMacOS )
linuxPopupMenuCanceler = new LinuxPopupMenuCanceler();
// listen to desktop property changes to update UI if system font or scaling changes

View File

@@ -30,7 +30,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
* Cancels (hides) popup menus on Linux.
* Cancels (hides) popup menus on Linux and macOS.
* <p>
* On Linux, popups are not hidden under following conditions, which results in
* misplaced popups:
@@ -41,7 +41,13 @@ import javax.swing.event.ChangeListener;
* <li>window deactivated (e.g. activated other application)
* </ul>
*
* On Windows and macOS, popups are automatically hidden.
* On macOS, popups are usually automatically hidden, but not always.
* When resizing a window, then it depends where clicking to start resizing (and on the Java version).
* E.g. with Java 25, clicking at bottom-right corner inside of the window does not hide the popups.
* But clicking on same corner outside of the window, hides the popup.
*
* <p>
* On Windows, popups are automatically hidden.
* <p>
* The implementation is similar to what's done in
* {@code javax.swing.plaf.basic.BasicPopupMenuUI.MouseGrabber},

View File

@@ -484,7 +484,7 @@ public class FlatTitlePane
}
protected void frameStateChanged() {
if( window == null || rootPane.getWindowDecorationStyle() != JRootPane.FRAME )
if( window == null || rootPane.getWindowDecorationStyle() == JRootPane.NONE )
return;
updateVisibility();

View File

@@ -524,7 +524,9 @@ public class FlatSVGIcon
private URL getIconURL( String name, boolean dark ) {
if( dark ) {
int dotIndex = name.lastIndexOf( '.' );
name = name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex );
name = (dotIndex > 0)
? name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex )
: name + "_dark";
}
ClassLoader cl = (classLoader != null) ? classLoader : FlatSVGIcon.class.getClassLoader();