Bug 435771 - Filenames with .mkv or .pdf extension have their labels incorrectly cropped when "Maximum lines" is set.
Summary: Filenames with .mkv or .pdf extension have their labels incorrectly cropped w...
Status: RESOLVED DUPLICATE of bug 432530
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (show other bugs)
Version: 21.04.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-15 13:38 UTC by Alexander M.
Modified: 2024-05-07 08:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
If you can't say it, show it. (16.58 KB, image/png)
2021-04-15 13:38 UTC, Alexander M.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander M. 2021-04-15 13:38:46 UTC
Created attachment 137632 [details]
If you can't say it, show it.

SUMMARY

First, a disclaimer: this may well have additional parameters as to when it's triggered or what triggers it. What I have tested is my own configuration, because the possible combinations are too many. You'll hopefully understand when you read further.

Now the issue: I use Dolphin in Icons view mode and set the file label to show a maximum of 3 lines of a filename before it crops it; I also have the size of a file shown as an additional line, which becomes the 4th line when the label is at max size.

I noticed that with MKV files, when the part of the filename ("part" as in character sequences separated by spaces) that needs to be cropped is the last one before the extension, then that part will be cropped one character later and the cropped label will actually span 4 lines instead of 3 because the extension part will overflow, with that extra 4th line overlapping the actual 4th line that displays the size.

My attempt at describing this is lame, I know, and pictures speak volumes compared to words in this case, so please take a look at the screenshot. Short explanation:

1) First three files have a filename of "1 - This is a really long name to be tested.XXX"

2) Next three files have a filename of "2 - This is a reeeeeeeeeeeeeeeeeeeeeeeeeeally long name to be tested.XXX"

3) Last three files have a filename of "3 - This is a really long name to be teeeeeeeeeeeeeeeeeested.XXX"

Notice how in the third case, the file with the .mkv extension is exhibiting the issue I'm trying to describe. Also note that all of these files are actually text files with a modified extension, and copies of each other: I just created "1 - This is a really long name to be tested.txt" and duplicated/renamed that as needed. In other words, it obviously doesn't have to be an actual MKV file in order to trigger this.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux with latest stable versions of everything KDE and Qt5.


ADDITIONAL INFO:

I've found this old bug report here from back in the 4.x days that describes the exact same issue, so maybe this is a regression:

https://bugs.kde.org/show_bug.cgi?id=337104

In my case it's not a dot that produces it, but I have also noticed that in other problematic files, when there is a dot in the last part/word of the filename, the cropped label will end in ".....mkv", i.e. 4 dots + .mkv", instead of "....mkv", i.e. 3 dots + .mkv (as it is for pretty much every other extension I've tried).
Comment 1 Alexander M. 2021-05-08 07:52:36 UTC
Turns out this doesn't only happen with MKV files, I just had it happen with a PDF. 

Steps to reproduce:

1. Create a file called "Copy of RAM Ineffectiveness - Original - Sheet1.pdf"
2. Ta-da.

Notes:
- Changing the extension to something like .txt or even .mkv "fixes" the issue.
- Even just adding an extra extension like .txt or even .mkv also "fixes" the issue.

I have yet to identify a common denominator between the two cases (three, if you count bug 337104) but I'd expect that the issue is not explicitly tied to these specific extensions.
Comment 2 Dilam 2024-05-07 08:35:52 UTC

*** This bug has been marked as a duplicate of bug 432530 ***