Skip to content

Commit

Permalink
Merge main into system-file-chooser
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCharly committed Jan 23, 2025
2 parents 3283cfe + f30dd87 commit 1121165
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 42 deletions.
58 changes: 37 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +65,6 @@ jobs:
# - latest Java version(s)
java:
- 8
- 11 # LTS
- 17 # LTS
- 21 # LTS
- 23 # latest
Expand All @@ -42,38 +76,20 @@ 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:
java-version: ${{ matrix.java }}
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-' )) &&
Expand All @@ -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/' ) &&
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public interface FlatSystemProperties
* (requires Windows 11 or macOS)
* <p>
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
* <strong>Default</strong> {@code true}; except on macOS 14.4+ where it is {@code false}
* <strong>Default</strong> {@code true}; except in FlatLaf 3.5.x on macOS 14.4+ where it was {@code false}
*
* @since 3.5.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,8 @@ private static boolean isWindows11BorderSupported() {
}

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();
}

Expand Down
Binary file modified flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/libflatlaf-linux-arm64.so
100644 → 100755
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ @implementation WindowData
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 ) {
Expand All @@ -122,6 +125,8 @@ @implementation WindowData

[nsWindow.contentView.layer removeAllAnimations];
[nsWindow invalidateShadow];

JNI_COCOA_CATCH()
}];

return TRUE;
Expand Down Expand Up @@ -159,6 +164,8 @@ @implementation WindowData
WindowData* windowData = getWindowData( nsWindow, true );

[FlatJNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
JNI_COCOA_TRY()

// NSLog( @"\n%@\n\n", [nsWindow.contentView.superview _subtreeDescription] );

// add/remove toolbar
Expand Down Expand Up @@ -237,6 +244,8 @@ @implementation WindowData
windowData.didExitFullScreenObserver = nil;
}
}

JNI_COCOA_CATCH()
}];

return TRUE;
Expand Down

0 comments on commit 1121165

Please sign in to comment.