Bug 425570 - Long folder names create too much padding in breadcrumb
Summary: Long folder names create too much padding in breadcrumb
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: bars: location (show other bugs)
Version: 20.08.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-19 23:04 UTC by Squeaky Pancakes
Modified: 2020-08-22 11:49 UTC (History)
3 users (show)

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


Attachments
too much padding (13.06 KB, image/png)
2020-08-19 23:04 UTC, Squeaky Pancakes
Details
normal amount of padding (10.97 KB, image/png)
2020-08-19 23:04 UTC, Squeaky Pancakes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Squeaky Pancakes 2020-08-19 23:04:20 UTC
Created attachment 131027 [details]
too much padding

SUMMARY
The padding in the breadcrumb menu around folders with long names is way to big.

STEPS TO REPRODUCE
1. Create a folder with a long name
2. Go into folder
3. profit

OBSERVED RESULT


EXPECTED RESULT

Operating System: Artix Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.4.54-1-lts
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-3210M CPU @ 2.50GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000

ADDITIONAL INFORMATION
Comment 1 Squeaky Pancakes 2020-08-19 23:04:43 UTC
Created attachment 131028 [details]
normal amount of padding
Comment 2 Julian Steinmann 2020-08-20 11:45:13 UTC
Can confirm this behavior with Dolphin 20.11.70. Not sure why this padding is even dependant on the length of the folder name.
Comment 3 Bug Janitor Service 2020-08-20 17:04:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/109
Comment 4 David Faure 2020-08-22 11:49:03 UTC
Git commit c1e658c723fc2c5a4b7d9a03f193c07a909877af by David Faure, on behalf of Ismael Asensio.
Committed on 22/08/2020 at 11:48.
Pushed by dfaure into branch 'master'.

[filewidgets] Fix KUrlNavigatorButton padding on breadcrumb

Use `QFontMetrics::size(Qt::SingleLine, text).width()` instead of
`QFontMetrics::boundingRect(text).width()`. As suggested by @dfaure, from an
empiric point of view, this seems to be a better replacement for
`QFontMetrics::width()` when applied to strings than the other two alternatives.

See also https://invent.kde.org/system/dolphin/-/merge_requests/22
FIXED-IN: 5.74

M  +2    -2    src/filewidgets/kurlnavigatorbutton.cpp

https://invent.kde.org/frameworks/kio/commit/c1e658c723fc2c5a4b7d9a03f193c07a909877af