diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml index dd676b87..436e6498 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppDelegate.qml @@ -166,11 +166,12 @@ MobileShell.ExtendedAbstractButton { visible: text.length > 0 Layout.fillWidth: true - Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.preferredHeight: delegate.reservedSpaceForLabel - wrapMode: Text.WordWrap + Layout.topMargin: PlasmaCore.Units.smallSpacing Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing + + wrapMode: Text.WordWrap maximumLineCount: 2 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml index aa47e02e..1fe0b239 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml @@ -22,20 +22,21 @@ GridView { clip: true readonly property int reservedSpaceForLabel: metrics.height + readonly property real effectiveContentWidth: width - leftMargin - rightMargin - cellWidth: width / Math.min(Math.floor(width / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) + cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) cellHeight: cellWidth + reservedSpaceForLabel - property int columns: Math.floor(width / cellWidth) + property int columns: Math.floor(effectiveContentWidth / cellWidth) property int rows: Math.ceil(Halcyon.ApplicationListModel.count / columns) cacheBuffer: Math.max(0, rows * cellHeight) model: Halcyon.ApplicationListModel - header: Controls.Control { - implicitWidth: gridView.width - topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.25) + header: MobileShell.BaseItem { + implicitWidth: gridView.effectiveContentWidth + topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.2) bottomPadding: PlasmaCore.Units.largeSpacing leftPadding: PlasmaCore.Units.smallSpacing @@ -78,4 +79,21 @@ GridView { application.runApplication(); } } + + PC3.ScrollBar.vertical: PC3.ScrollBar { + id: scrollBar + interactive: true + enabled: true + Behavior on opacity { + OpacityAnimator { + duration: PlasmaCore.Units.longDuration * 2 + easing.type: Easing.InOutQuad + } + } + implicitWidth: PlasmaCore.Units.smallSpacing + contentItem: Rectangle { + radius: width/2 + color: Qt.rgba(1, 1, 1, 0.3) + } + } } diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml index 066e53b5..2204eb2b 100644 --- a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml @@ -158,12 +158,12 @@ Item { height: swipeView.height width: swipeView.width - property real horizontalMargin: Math.max(Kirigami.Units.largeSpacing, column.width * 0.1 / 2) + property real horizontalMargin: Math.max(Kirigami.Units.largeSpacing, root.width * 0.1 / 2) GridAppList { interactive: root.interactive - Layout.leftMargin: column.horizontalMargin - Layout.rightMargin: column.horizontalMargin + leftMargin: column.horizontalMargin + rightMargin: column.horizontalMargin Layout.fillWidth: true Layout.fillHeight: true }