Commit 0b654afd authored by Nate Graham's avatar Nate Graham 🔩

[Folder View] implement a minimum width for icon view to ensure that labels...

[Folder View] implement a minimum width for icon view to ensure that labels are never rendered useless

Currently with Folder-View-on-the-desktop, items' labels become illegibe when the icon size is very small.

This patch implements a minimum width when using on-the-desktop icon view to make sure that the label is never uselessly short when using very small icons.

BUG: 379432
FIXED-IN: 5.12.8

Test Plan:
Smallest size, before: {F6426124}
Smallest size, after: {F6426126}
Equal padding on either side of the container itself still works: {F6426129}

There is no change for sizes corresponding to the fourth tick on the slider and beyond

Reviewers: #plasma, #vdg, hein

Reviewed By: #plasma, hein

Subscribers: abetts, broulik, plasma-devel

Tags: #plasma

Differential Revision:
parent ed34cc5f
......@@ -588,8 +588,9 @@ FocusScope {
} else {
var iconWidth = iconSize + (2 * units.largeSpacing) + (2 * units.smallSpacing);
if (root.isContainment && isRootView && scrollArea.viewportWidth > 0) {
var extraWidth = calcExtraSpacing(iconWidth, scrollArea.viewportWidth);
return iconWidth + extraWidth;
var minIconWidth = Math.max(iconWidth, units.iconSizes.small * 8);
var extraWidth = calcExtraSpacing(minIconWidth, scrollArea.viewportWidth);
return minIconWidth + extraWidth;
} else {
return iconWidth;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment