diff --git a/containments/homescreen/package/contents/ui/HomeLauncher.qml b/containments/homescreen/package/contents/ui/HomeLauncher.qml index 6712de1..6f43814 100644 --- a/containments/homescreen/package/contents/ui/HomeLauncher.qml +++ b/containments/homescreen/package/contents/ui/HomeLauncher.qml @@ -1,50 +1,63 @@ import QtQuick 2.5 +import QtQuick.Layouts 1.2 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kio 1.0 as Kio import org.kde.plasma.components 2.0 as PlasmaComponents -Column { +Item { id: delegateRoot - width: applicationsView.cellWidth - height: applicationsView.cellHeight property int iconSize property var modelData: model property bool isDropTarget: delegateRoot != dragDelegate && root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole == modelData.ApplicationStorageIdRole property alias maximumLineCount: label.maximumLineCount - opacity: isDropTarget ? 0.3 : 1 - - PlasmaCore.IconItem { - id: icon - anchors.horizontalCenter: parent.horizontalCenter - width: delegateRoot.iconSize - height: delegateRoot.iconSize - usesPlasmaTheme: false - source: modelData.ApplicationIconRole - scale: root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole != modelData.ApplicationStorageIdRole ? 0.6 : 1 - Behavior on scale { - NumberAnimation { - duration: units.longDuration - easing.type: Easing.InOutQuad + width: applicationsView.cellWidth + height: applicationsView.cellHeight + + ColumnLayout { + anchors { + left: parent.left + right: parent.right + horizontalCenter: parent.horizonalCenter + verticalCenter: parent.verticalCenter + } + opacity: isDropTarget ? 0.3 : 1 + + PlasmaCore.IconItem { + id: icon + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: delegateRoot.iconSize + Layout.preferredHeight: delegateRoot.iconSize + usesPlasmaTheme: false + source: modelData.ApplicationIconRole + scale: root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole != modelData.ApplicationStorageIdRole ? 0.6 : 1 + Behavior on scale { + NumberAnimation { + duration: units.longDuration + easing.type: Easing.InOutQuad + } } } - } - PlasmaComponents.Label { - id: label - visible: text.length > 0 + PlasmaComponents.Label { + id: label + visible: text.length > 0 - anchors.horizontalCenter: parent.horizontalCenter - width: icon.width + Layout.alignment: Qt.AlignHCenter + Layout.fillWidth: true + Layout.leftMargin: units.gridUnit + Layout.rightMargin: units.gridUnit - wrapMode: Text.WordWrap - horizontalAlignment: Qt.AlignHCenter - verticalAlignment: Qt.AlignVCenter - maximumLineCount: 2 + wrapMode: Text.WordWrap + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + maximumLineCount: 1 + elide: Text.ElideRight - text: modelData.ApplicationNameRole - font.pixelSize: theme.defaultFont.pixelSize - color: PlasmaCore.ColorScope.textColor + text: modelData.ApplicationNameRole + font.pixelSize: theme.defaultFont.pixelSize + color: PlasmaCore.ColorScope.textColor + } } } diff --git a/containments/homescreen/package/contents/ui/SatelliteStripe.qml b/containments/homescreen/package/contents/ui/SatelliteStripe.qml index 0e88565..85154ab 100644 --- a/containments/homescreen/package/contents/ui/SatelliteStripe.qml +++ b/containments/homescreen/package/contents/ui/SatelliteStripe.qml @@ -1,25 +1,25 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore PlasmaCore.ColorScope { colorGroup: PlasmaCore.Theme.NormalColorGroup PlasmaCore.FrameSvgItem { z: -1 imagePath: "widgets/background" enabledBorders: PlasmaCore.FrameSvgItem.TopBorder | PlasmaCore.FrameSvgItem.BottomBorder anchors { fill: parent - topMargin: -margins.top - bottomMargin: -margins.bottom + topMargin: -margins.top / 2 + bottomMargin: -margins.bottom / 2 } } //cut away one line from the favorites bar - height: applicationsView.cellHeight - units.gridUnit/2 + height: applicationsView.cellHeight width: parent.width y: parent.height / 2 - height / 2 x: 0 }