diff --git a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml index aaa5c6ba..676ec079 100644 --- a/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml +++ b/containments/homescreens/halcyon/package/contents/ui/GridAppList.qml @@ -21,15 +21,13 @@ GridView { id: gridView clip: true - signal launched - readonly property int reservedSpaceForLabel: metrics.height cellWidth: width / Math.min(Math.floor(width / (PlasmaCore.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8) cellHeight: cellWidth + reservedSpaceForLabel property int columns: Math.floor(width / cellWidth) - property int rows: Math.ceil(model.count / columns) + property int rows: Math.ceil(Halcyon.ApplicationListModel.count / columns) cacheBuffer: Math.max(0, rows * cellHeight) @@ -37,13 +35,13 @@ GridView { header: Controls.Control { implicitWidth: gridView.width - topPadding: PlasmaCore.Units.largeSpacing + topPadding: PlasmaCore.Units.largeSpacing + Math.round(gridView.height * 0.2) bottomPadding: PlasmaCore.Units.largeSpacing leftPadding: PlasmaCore.Units.smallSpacing - contentItem: PlasmaExtras.Heading { + contentItem: PC3.Label { color: "white" - level: 1 + font.pointSize: 16 font.weight: Font.Bold text: i18n("Applications") } @@ -78,7 +76,6 @@ GridView { application.setMinimizedDelegate(delegate); application.runApplication(); - gridView.launched(); } } } diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml index c9a5971b..6172eaa8 100644 --- a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml @@ -58,12 +58,37 @@ Item { id: favouritesList clip: true interactive: root.interactive + boundsMovement: Flickable.StopAtBounds + boundsBehavior: Flickable.DragOverBounds + property real delegateHeight: PlasmaCore.Units.gridUnit * 3 anchors.fill: parent anchors.leftMargin: Math.round(parent.width * 0.1) anchors.rightMargin: Math.round(parent.width * 0.1) + // search widget open gesture + property bool openingSearchWidget: false + property real oldVerticalOvershoot: verticalOvershoot + onVerticalOvershootChanged: { + if (dragging && verticalOvershoot < 0) { + if (!openingSearchWidget) { + openingSearchWidget = true; + root.searchWidget.startGesture(); + } + + let offset = -(verticalOvershoot - oldVerticalOvershoot); + root.searchWidget.updateGestureOffset(-offset); + } + oldVerticalOvershoot = verticalOvershoot; + } + onDraggingChanged: { + if (!dragging && openingSearchWidget) { + openingSearchWidget = false; + root.searchWidget.endGesture(); + } + } + model: Halcyon.PinnedModel header: MobileShell.BaseItem { topPadding: Math.round(swipeView.height * 0.2) @@ -79,7 +104,6 @@ Item { delegate: DrawerListDelegate { id: delegate - width: favouritesList.width height: visible ? favouritesList.delegateHeight : 0 } @@ -134,13 +158,6 @@ Item { Layout.rightMargin: column.horizontalMargin Layout.fillWidth: true Layout.fillHeight: true - - // open search widget when pulled down - onDraggingChanged: { - if (!dragging && (contentY < originY - PlasmaCore.Units.gridUnit * 3)) { - searchWidget.open(); - } - } } } }