1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-27 06:03:51 +03:00

provide layoutWidth/Height from AppletAbilities

This commit is contained in:
Michail Vourlakos 2021-02-01 21:49:23 +02:00
parent a2d15e58d9
commit cdaefbc775

View File

@ -40,6 +40,26 @@ Item {
readonly property int thickness: _animations.hasThicknessAnimation ? _metrics.mask.thickness.zoomedForItems :
_metrics.mask.thickness.normalForItems
readonly property real layoutWidth: {
if (isLayoutListViewContainer) {
return plasmoid.formFactor !== PlasmaCore.Types.Vertical ? layout.parent.width : thickness;
} else if (isLayoutGridContainer) {
return plasmoid.formFactor !== PlasmaCore.Types.Vertical ? layout.width : thickness
}
return 0;
}
readonly property real layoutHeight: {
if (isLayoutListViewContainer) {
return plasmoid.formFactor === PlasmaCore.Types.Vertical ? layout.parent.height : thickness;
} else if (isLayoutGridContainer) {
return plasmoid.formFactor !== PlasmaCore.Types.Vertical ? layout.height : thickness
}
return 0;
}
//! basic
readonly property alias animations: _animations
readonly property alias containment: _containment