Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filechooser "Desktop" view shows incorrect details for user folder #249

Closed
Bios-Marcel opened this issue Jan 25, 2021 · 9 comments
Closed
Milestone

Comments

@Bios-Marcel
Copy link
Contributor

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.

Windows vs Flatlaf

@DevCharly
Copy link
Collaborator

Looks funny. Occurs also in Metal and Nimbus. And for "OneDrive" folder.

@Bios-Marcel
Copy link
Contributor Author

It gets worse! Wait:

@Bios-Marcel
Copy link
Contributor Author

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.

grafik

@DevCharly
Copy link
Collaborator

Strange, have this too...

@Bios-Marcel
Copy link
Contributor Author

I guess I can try this out with java 15 tomorrow. Maybe it's already fixed 🤷

@DevCharly
Copy link
Collaborator

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.

DevCharly added a commit that referenced this issue Feb 12, 2021
… selected in "Look in" combobox (Windows 10 only; issue #249)
@DevCharly
Copy link
Collaborator

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 

They 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 5b65ed8

@DevCharly DevCharly added this to the 1.0 milestone Feb 12, 2021
@DevCharly
Copy link
Collaborator

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.

@Bios-Marcel
Copy link
Contributor Author

Fair enough. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants