appdrawer: avoid entering edit mode while in an half empty drawer

This commit is contained in:
Yari Polla 2022-05-25 16:29:30 +02:00
parent be159dadc1
commit 8dd6133582
2 changed files with 11 additions and 1 deletions

View file

@ -46,4 +46,9 @@ PlasmaCore.ColorScope {
onClicked: root.switchToGridRequested()
}
}
//HACK: Here only to steal inputs the would normally be delivered to home
MouseArea {
anchors.fill: parent
}
}

View file

@ -26,7 +26,12 @@ AbstractAppDrawer {
contentItem: GridView {
id: gridView
clip: true
interactive: root.homeScreenState.appDrawerInteractive
/*
* HACK: When the number of apps is less than the one that would fit in the first shown part of the drawer, make
* this flickable interactive, in order to steal inputs that would normally be delivered to home.
*/
interactive: contentHeight <= height ? true : root.homeScreenState.appDrawerInteractive
cellWidth: root.contentWidth / Math.floor(root.contentWidth / ((root.availableCellHeight - root.reservedSpaceForLabel) + PlasmaCore.Units.smallSpacing*4))
cellHeight: root.availableCellHeight