diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57acad88..48e0ef63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,43 @@ on: jobs: build: + name: build (11) runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: gradle/actions/wrapper-validation@v4 + + - name: Setup Java 11 + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: temurin # pre-installed on ubuntu-latest + cache: gradle + + - name: Check with Error Prone + run: ./gradlew errorprone clean + + - name: Build with Gradle + run: ./gradlew build + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: FlatLaf-build-artifacts + path: | + flatlaf-*/build/libs + flatlaf-*/flatlaf-*/build/libs + !**/*-javadoc.jar + !**/*-sources.jar + + + build-on: + runs-on: ubuntu-latest + needs: build + if: github.repository == 'JFormDesigner/FlatLaf' + strategy: matrix: # test against @@ -30,7 +65,6 @@ jobs: # - latest Java version(s) java: - 8 - - 11 # LTS - 17 # LTS - 21 # LTS - 23 # latest @@ -42,9 +76,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: gradle/actions/wrapper-validation@v4 - if: matrix.java == '8' - - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v4 with: @@ -52,28 +83,13 @@ jobs: distribution: temurin # Java 8, 11, 17 and 21 are pre-installed on ubuntu-latest cache: gradle - - name: Check with Error Prone - if: matrix.java == '11' - run: ./gradlew errorprone clean -Dtoolchain=${{ matrix.toolchain }} - - name: Build with Gradle run: ./gradlew build -Dtoolchain=${{ matrix.toolchain }} - - name: Upload artifacts - uses: actions/upload-artifact@v4 - if: matrix.java == '11' - with: - name: FlatLaf-build-artifacts - path: | - flatlaf-*/build/libs - flatlaf-*/flatlaf-*/build/libs - !**/*-javadoc.jar - !**/*-sources.jar - snapshot: runs-on: ubuntu-latest - needs: build + needs: build-on if: | github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/heads/develop-' )) && @@ -98,7 +114,7 @@ jobs: release: runs-on: ubuntu-latest - needs: build + needs: build-on if: | github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) && diff --git a/.github/workflows/natives.yml b/.github/workflows/natives.yml index dfe1ef56..6ff056e4 100644 --- a/.github/workflows/natives.yml +++ b/.github/workflows/natives.yml @@ -21,27 +21,24 @@ jobs: strategy: matrix: os: - - windows - - macos - - ubuntu + - windows-latest + - macos-latest + - ubuntu-latest + - ubuntu-24.04-arm - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: gradle/actions/wrapper-validation@v4 - - name: install libxt-dev - if: matrix.os == 'ubuntu' - run: sudo apt install libxt-dev - - - name: install libgtk-3-dev - if: matrix.os == 'ubuntu' - run: sudo apt install libgtk-3-dev + - name: install libxt-dev and libgtk-3-dev + if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' + run: sudo apt install libxt-dev libgtk-3-dev - name: Download libgtk-3.so for arm64 - if: matrix.os == 'ubuntu' + if: matrix.os == 'ubuntu-latest' working-directory: flatlaf-natives/flatlaf-natives-linux/lib/aarch64 run: | pwd @@ -54,7 +51,7 @@ jobs: ls -l - name: install g++-aarch64-linux-gnu - if: matrix.os == 'ubuntu' + if: matrix.os == 'ubuntu-latest' run: sudo apt install g++-aarch64-linux-gnu - name: Setup Java 11 diff --git a/CHANGELOG.md b/CHANGELOG.md index 166c56d9..3f86e20c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FlatLaf Change Log #### New features and improvements +- macOS: Re-enabled rounded popup border (see PR #772) on macOS 14.4+ (was + disabled in 3.5.x). - CheckBox: Support styling indeterminate state of [tri-state check boxes](https://www.javadoc.io/doc/com.formdev/flatlaf-extras/latest/com/formdev/flatlaf/extras/components/FlatTriStateCheckBox.html). (PR #936; issue #919) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java index 1d333eaa..a344f220 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java @@ -143,7 +143,7 @@ public interface FlatSystemProperties * (requires Windows 11 or macOS) *
* Allowed Values {@code false} and {@code true}
- * Default {@code true}; except on macOS 14.4+ where it is {@code false}
+ * Default {@code true}; except in FlatLaf 3.5.x on macOS 14.4+ where it was {@code false}
*
* @since 3.5.2
*/
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
index 7ab53ece..9b14bab2 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
@@ -365,14 +365,8 @@ public class FlatPopupFactory
}
private static boolean isMacOSBorderSupported() {
- // do not use rounded border on macOS 14.4+ because it may freeze the application
- // and crash the macOS WindowServer process (reports vary from Finder restarts to OS restarts)
- // https://github.com/apache/netbeans/issues/7560#issuecomment-2226439215
- // https://github.com/apache/netbeans/issues/6647#issuecomment-2070124442
- boolean isMacOS_14_4_orLater = (SystemInfo.osVersion >= SystemInfo.toVersion( 14, 4, 0, 0 ));
-
return SystemInfo.isMacOS &&
- FlatSystemProperties.getBoolean( FlatSystemProperties.USE_ROUNDED_POPUP_BORDER, !isMacOS_14_4_orLater ) &&
+ FlatSystemProperties.getBoolean( FlatSystemProperties.USE_ROUNDED_POPUP_BORDER, true ) &&
FlatNativeMacLibrary.isLoaded();
}
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-linux-arm64.so b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-linux-arm64.so
old mode 100644
new mode 100755
index c1a663f3..bcbafedc
Binary files a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-linux-arm64.so and b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-linux-arm64.so differ
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib
index 96b21340..5d683a24 100755
Binary files a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib and b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib differ
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib
index 80c44180..b356acc9 100755
Binary files a/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib and b/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib differ
diff --git a/flatlaf-natives/flatlaf-natives-macos/src/main/objcpp/MacWindow.mm b/flatlaf-natives/flatlaf-natives-macos/src/main/objcpp/MacWindow.mm
index c309260a..c45f0bb8 100644
--- a/flatlaf-natives/flatlaf-natives-macos/src/main/objcpp/MacWindow.mm
+++ b/flatlaf-natives/flatlaf-natives-macos/src/main/objcpp/MacWindow.mm
@@ -102,10 +102,13 @@ JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setW
return FALSE;
[FlatJNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+ JNI_COCOA_TRY()
+
nsWindow.hasShadow = YES;
nsWindow.contentView.wantsLayer = YES;
nsWindow.contentView.layer.cornerRadius = radius;
nsWindow.contentView.layer.masksToBounds = YES;
+ nsWindow.contentView.layer.opaque = NO;
nsWindow.contentView.layer.borderWidth = borderWidth;
if( borderWidth > 0 ) {
@@ -122,6 +125,8 @@ JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setW
[nsWindow.contentView.layer removeAllAnimations];
[nsWindow invalidateShadow];
+
+ JNI_COCOA_CATCH()
}];
return TRUE;
@@ -159,6 +164,8 @@ JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setW
WindowData* windowData = getWindowData( nsWindow, true );
[FlatJNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+ JNI_COCOA_TRY()
+
// NSLog( @"\n%@\n\n", [nsWindow.contentView.superview _subtreeDescription] );
// add/remove toolbar
@@ -237,6 +244,8 @@ JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setW
windowData.didExitFullScreenObserver = nil;
}
}
+
+ JNI_COCOA_CATCH()
}];
return TRUE;