mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 10:44:46 +00:00
use the lastspacer when needed
This commit is contained in:
parent
4024edb277
commit
4500b17a92
1 changed files with 21 additions and 3 deletions
|
|
@ -99,6 +99,26 @@ Item {
|
||||||
scrollUpIndicator.opacity = 0;
|
scrollUpIndicator.opacity = 0;
|
||||||
scrollDownIndicator.opacity = 0;
|
scrollDownIndicator.opacity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkLastSpacer() {
|
||||||
|
appletsSpace.lastSpacer.parent = root
|
||||||
|
|
||||||
|
var expands = false;
|
||||||
|
|
||||||
|
for (var container in appletsSpace.layout.children) {
|
||||||
|
var item = appletsSpace.layout.children[container];
|
||||||
|
if (item.Layout && item.Layout.fillHeight) {
|
||||||
|
expands = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!expands) {
|
||||||
|
appletsSpace.lastSpacer.parent = appletsSpace.layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//END functions
|
//END functions
|
||||||
|
|
||||||
//BEGIN slots
|
//BEGIN slots
|
||||||
|
|
@ -165,10 +185,8 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: applet && applet.Layout.fillHeight
|
Layout.fillHeight: applet && applet.Layout.fillHeight
|
||||||
Layout.onFillHeightChanged: {
|
Layout.onFillHeightChanged: {
|
||||||
if (plasmoid.formFactor == PlasmaCore.Types.Vertical) {
|
|
||||||
checkLastSpacer();
|
checkLastSpacer();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: plasmoid
|
target: plasmoid
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue