File chooser shortcuts panel#522
Conversation
|
There are several expectations with file choosers:
I don't think FlatLaf should care about item 3 because there are other libraries that do it and it breaks the idea of a look and feel (I saw discussions on that topic lately, this is just my opinion). This PR is more about 1 and 2:
That being said, and correct me if I am wrong, it looks like the Windows 7 file chooser, or the AWT file chooser. All the file choosers that I can see on my Windows 10 have a tree on the left. My native file chooser are more like the second one from this (random) link: So, it is definitely an improvement, it solves item 1, but it is a partial answer to item 2. I understand the constraints so I know that it is not possible to support item 2 completely (like having a tree on the left, and editable crumb bar at the top). I do welcome this change! Keep up the good work! |
This PR adds a shortcuts panel to the left side of all file choosers (class
JFileChooser):On Windows, the content of the shortcuts panel is the same as in the Java Windows L&F.
On macOS and Linux the shortcuts panel is empty and hidden.
However you can customize the content. E.g.
Downsides
The get the list of shortcut folders and to get the large icons, FlatLaf uses API that is not available in all Java versions.
So for Java 9 to 16 you'll get following warning on stdout when a file chooser is opened.
If you use
--illegal-access=deny, then the shortcuts panel will be empty (Java 9 to 11),and small icons are scaled up (Java 9 to 18).
CC @Chrriis