Left-elide file/folders while keeping their extension visible
ClosedPublic

Authored by meven on May 16 2020, 8:01 AM.

Details

Summary

Tweak behavior introduced in D19471.

BUG: 404955

Test Plan

Before:


After:

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.May 16 2020, 8:01 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMay 16 2020, 8:01 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
meven requested review of this revision.May 16 2020, 8:01 AM
meven edited the test plan for this revision. (Show Details)May 16 2020, 8:04 AM
meven updated this revision to Diff 82990.May 16 2020, 8:04 AM

Clean up

meven updated this revision to Diff 82991.May 16 2020, 8:09 AM

Improve function naming

ngraham accepted this revision.May 16 2020, 1:39 PM

Yeah, I feel bad about this. Nobody liked the change and I feel like I can understand the complaints. This looks like a better solution to me. Nicely done!

This revision is now accepted and ready to land.May 16 2020, 1:39 PM
ngraham edited the summary of this revision. (Show Details)May 16 2020, 1:39 PM
meven updated this revision to Diff 83002.May 16 2020, 3:44 PM

Avoid displaying the extension if it represents more than a third of available space

elvisangelaccio accepted this revision.May 17 2020, 9:10 PM

Very nice. Please push to release/20.04. Thanks!

This revision was automatically updated to reflect the committed changes.
cfeck added a subscriber: cfeck.May 18 2020, 10:21 AM
cfeck added inline comments.
src/kitemviews/kstandarditemlistwidget.cpp
1118

Did you test if using https://bugs.kde.org/show_bug.cgi?id=404955#c11 made things too slow?

meven marked an inline comment as done.May 18 2020, 12:21 PM
meven added inline comments.
src/kitemviews/kstandarditemlistwidget.cpp
1118

I didn't, probably a good idea to use QMimeDatabase::mimeTypesForFileName here instead of this naive file extension detection.