diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml index db063362..1259cb5d 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml @@ -22,17 +22,13 @@ MobileShell.GridView { layer.enabled: true readonly property int reservedSpaceForLabel: metrics.height - required property real effectiveContentWidth + readonly property real effectiveContentWidth: width - leftMargin - rightMargin - cellWidth: effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) + cellWidth: gridView.effectiveContentWidth / Math.min(Math.floor(gridView.effectiveContentWidth / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) cellHeight: cellWidth + reservedSpaceForLabel - property int columns: Math.floor(effectiveContentWidth / cellWidth) + property int columns: Math.floor(gridView.effectiveContentWidth / cellWidth) property int rows: Math.ceil(Halcyon.ApplicationListModel.count / columns) - - cacheBuffer: Math.max(0, rows * cellHeight) - - onWidthChanged: gridView.forceLayout() function goToBeginning() { goToBeginningAnim.restart(); diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml index 8a9cbb2b..0db0f5c2 100644 --- a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml @@ -4,6 +4,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.15 as QQC2 import QtQuick.Layouts 1.1 +import QtQuick.Window 2.15 import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore @@ -65,16 +66,14 @@ Item { } QQC2.ScrollView { - Layout.fillWidth: true - Layout.fillHeight: true width: swipeView.width height: swipeView.height GridAppList { id: gridAppList - property real horizontalMargin: Math.max(Kirigami.Units.largeSpacing, swipeView.width * 0.1 / 2) + + property int horizontalMargin: Math.round(swipeView.width * 0.05) interactive: root.interactive - effectiveContentWidth: swipeView.width - leftMargin - rightMargin leftMargin: horizontalMargin rightMargin: horizontalMargin }