Closed Bios-Marcel closed 3 years ago
Looks funny. Occurs also in Metal and Nimbus. And for "OneDrive" folder.
It gets worse! Wait:
Okay, this one is a bit more annoying. It looks like the filechooser somehow has overlapping columns or so. This happens in the detailed view when selecting your own user folder. It appears like column 1 and 2 are correct and starting from 3 they are shifted to the left. This is just a assumption though. This happens on Java 11, but not on Java 8. Both JREs come from https://github.com/ojdkbuild/ojdkbuild and I am running a x64 Windows 10.
Same thing though, seems to affect all look and feels. Again, I am sure flatlaf isn't the right place for this, but I hope we can do something anyways.
Strange, have this too...
I guess I can try this out with java 15 tomorrow. Maybe it's already fixed 🤷
I have it in Java 15.
There are some strange characters in the date.
You can see the when you add System.out.println(s);
to FlatLabelUI.paintEnabledText()
.
BTW the column headers are also wrong. Date is in size (Größe) column. Path is in date (Änderungsdatum) column.
Regarding the strange dates in the last screenshot: There are left-to-right and right-to-left mark characters in the date:
<?01.?06.?2020 ??18:48> 200e 30 31 2e 200e 30 36 2e 200e 32 30 32 30 20 200f 200e 31 38 3a 34 38
0x200e
is left-to-right mark: https://en.wikipedia.org/wiki/Left-to-right_mark0x200f
is a right-to-left mark: https://en.wikipedia.org/wiki/Right-to-left_markThey come from native method sun.awt.shell.Win32ShellFolder2.doGetColumnValue()
.
Have not looked into the native code...
They are also visible in Windows L&F, but not in Nimbus or Metal.
Seems to depend on the used font. If using font "Dialog" in FlatLaf, they are not shown.
This can be reproduced in FlatLaf Demo: in menu use "Font > Dialog" to change font to Dialog, open file
chooser with Ctrl+O
, select current user (in combobox) and switch to "Details" (in toolbar).
Anyway, implemented a fix that removes those characters in commit 5b65ed87cdf6b587a2a8e38bc912d44e93f9749e
Regarding the initial issue, data displayed in wrong columns, this is a Java bug. The issue in first screenshot occurs even in Java 8. The issue in last screenshot occurs in Java 10+. Occurs also in other Lafs. Can't do much here.
Fair enough. Thank you :)
So, first, let me mention that this is not a flatlaf bug, since it's broken in the Windows L&F as well, but maybe it's possible to work around this issue, as I doubt that such a trivial swing bug will ever get fixed.
This happens when you switch to the details view and select "Desktop" in the combobox. So, for some weird reason the user folder is shown with an "element typ" that actually a date, but should be something like "Folder" or even empty.