mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
System File Chooser: Linux: show file dialog in dark if current FlatLaf theme is dark (PR #988)
Some checks failed
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
Error Prone / error-prone (push) Has been cancelled
Native Libraries / Natives (macos-latest) (push) Has been cancelled
Native Libraries / Natives (ubuntu-24.04-arm) (push) Has been cancelled
Native Libraries / Natives (ubuntu-latest) (push) Has been cancelled
Native Libraries / Natives (windows-latest) (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
Error Prone / error-prone (push) Has been cancelled
Native Libraries / Natives (macos-latest) (push) Has been cancelled
Native Libraries / Natives (ubuntu-24.04-arm) (push) Has been cancelled
Native Libraries / Natives (ubuntu-latest) (push) Has been cancelled
Native Libraries / Natives (windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -24,6 +24,7 @@ import java.awt.Window;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import javax.swing.*;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.extras.components.*;
|
||||
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
||||
import com.formdev.flatlaf.testing.FlatSystemFileChooserTest.DummyModalDialog;
|
||||
@@ -121,8 +122,9 @@ public class FlatSystemFileChooserLinuxTest
|
||||
|
||||
System.out.println( FlatNativeLinuxLibrary.isGtk3Available() );
|
||||
|
||||
int dark = FlatLaf.isLafDark() ? 1 : 0;
|
||||
if( direct ) {
|
||||
String[] files = FlatNativeLinuxLibrary.showFileChooser( owner, open,
|
||||
String[] files = FlatNativeLinuxLibrary.showFileChooser( owner, dark, open,
|
||||
title, okButtonLabel, currentName, currentFolder,
|
||||
optionsSet.get(), optionsClear.get(), callback, fileTypeIndex, fileTypes );
|
||||
|
||||
@@ -132,7 +134,7 @@ public class FlatSystemFileChooserLinuxTest
|
||||
|
||||
String[] fileTypes2 = fileTypes;
|
||||
new Thread( () -> {
|
||||
String[] files = FlatNativeLinuxLibrary.showFileChooser( owner, open,
|
||||
String[] files = FlatNativeLinuxLibrary.showFileChooser( owner, dark, open,
|
||||
title, okButtonLabel, currentName, currentFolder,
|
||||
optionsSet.get(), optionsClear.get(), callback, fileTypeIndex, fileTypes2 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user