gui: elide long filenames with tooltip in document list#1457
gui: elide long filenames with tooltip in document list#1457apyrgio merged 1 commit intofreedomofpress:mainfrom
Conversation
|
Thanks a lot for the changes, that looks great. I've added a small question, and then we can merge! |
|
The addition of ellipsis is a welcome one, and I'll merge it once the tests pass. One thing I didn't manage to reproduce though is the push of the "Start another conversion" button to the right. Truth is, I have tested it only on a Fedora container, not a VM, but since it works in your machine and is in the correct direction, I think it's safe to merge. |
|
If this helps with reproduction: OS: Fedora 43 |
|
Ok, I tried it out in a Fedora 43 VM as well, using Gnome, but I still can't reproduce it. But, wait a sec:
The "Start another conversion" button is not present in the 0.10.0 release yet. So... could it be that this is what you're observing? In any case, the tests have passed, so I'll merge this PR. |
|
The version was actually the problem. Feel a bit silly for missing that. Thanks for merging. |
When a file with a very long name is selected, the application window would resize awkwardly or push elements out of the viewport.
For example (on Fedora Linux), without this fix, the "Start another conversion" button gets pushed completely off-screen when selecting a file with a long filename, making it impossible for the user to trigger another conversion. See the "Before" image below.
This PR improves the UI by:
QFontMetrics.elidedText()withElideMiddleto shorten the displayed filename if it exceeds the available width.Fixes #143
Before
After