Commit 5ae880f8 authored by Zren (Chris Holland)'s avatar Zren (Chris Holland)

Slightly reduce vertical gutter width.

Removed 1 smallSpacing from the top and bottom padding of each cell.

Allows more rows to fit on screen. Results in less goofy-looking
vertical gutters with the default of two text rows (as most labels
only have one, it's a lot of dead space on screen in the common case).

Based on user feedback.

Reviewers: #plasma, hein

Differential Revision: https://phabricator.kde.org/D9201
parent 1466a873
......@@ -228,8 +228,12 @@ Item {
return parent.height;
}
return (icon.height + (2 * units.smallSpacing) + (label.lineCount
* theme.mSize(theme.defaultFont).height) + (3 * units.smallSpacing));
// Note: frameLoader.y = units.smallSpacing (acts as top margin)
return (units.smallSpacing // icon.anchors.topMargin (acts as top padding)
+ icon.height
+ units.smallSpacing // label.anchors.topMargin (acts as spacing between icon and label)
+ (label.lineCount * theme.mSize(theme.defaultFont).height)
+ units.smallSpacing); // leftover (acts as bottom padding)
}
PlasmaCore.IconItem {
......@@ -259,7 +263,7 @@ Item {
]
anchors {
topMargin: (2 * units.smallSpacing)
topMargin: units.smallSpacing
leftMargin: units.smallSpacing
}
......
......@@ -598,7 +598,7 @@ FocusScope {
+ Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom,
listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2;
} else {
var iconHeight = iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) + (6 * units.smallSpacing);
var iconHeight = iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) + (4 * units.smallSpacing);
if (root.isContainment && isRootView && scrollArea.viewportHeight > 0) {
var extraHeight = calcExtraSpacing(iconHeight, scrollArea.viewportHeight);
return iconHeight + extraHeight;
......
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