effects/desktopgrid: Fix grid's size and scale w.r.t. row/column spacing
This patch makes grid actually account for the spacing, so that when fully shown it won't cut off bottom or right edge of desktops. It can be easily seen with a wallpaper that has visible features on the edges such as borders, or by settings rowSpacing & columnSpacing to an absurdly high value.
This commit is contained in:
parent
5af891ec8e
commit
fc757be20a
1 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ Rectangle {
|
||||||
id: grid
|
id: grid
|
||||||
|
|
||||||
property Item currentItem
|
property Item currentItem
|
||||||
readonly property real targetScale: 1 / Math.max(rows, columns)
|
readonly property real targetScale: Math.min(parent.width / width, parent.height / height)
|
||||||
property real panelOpacity: 1
|
property real panelOpacity: 1
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
|
@ -186,8 +186,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
width: parent.width * columns
|
width: (parent.width + columnSpacing) * columns - columnSpacing
|
||||||
height: parent.height * rows
|
height: (parent.height + rowSpacing) * rows - rowSpacing
|
||||||
rowSpacing: PlasmaCore.Units.gridUnit
|
rowSpacing: PlasmaCore.Units.gridUnit
|
||||||
columnSpacing: PlasmaCore.Units.gridUnit
|
columnSpacing: PlasmaCore.Units.gridUnit
|
||||||
rows: container.effect.gridRows
|
rows: container.effect.gridRows
|
||||||
|
|
Loading…
Reference in a new issue