mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/Halcyon: trigger children using signals instead of focus property
This commit is contained in:
parent
4fc8582da5
commit
c3882691bc
3 changed files with 16 additions and 15 deletions
|
|
@ -17,12 +17,6 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
|||
Item {
|
||||
id: root
|
||||
layer.enabled: true
|
||||
|
||||
onFocusChanged: {
|
||||
if (focus) {
|
||||
favoritesGrid.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
required property bool interactive
|
||||
required property var searchWidget
|
||||
|
|
@ -41,6 +35,14 @@ Item {
|
|||
|
||||
signal openConfigureRequested()
|
||||
|
||||
Connections {
|
||||
target: parent
|
||||
|
||||
function onFocusRequested() {
|
||||
favoritesGrid.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
function goToBeginning() {
|
||||
goToBeginningAnim.restart();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ MobileShell.GridView {
|
|||
cacheBuffer: cellHeight * 20 // 10 rows above and below
|
||||
reuseItems: true
|
||||
|
||||
Controls.ScrollBar.vertical: Controls.ScrollBar {
|
||||
policy: Controls.ScrollBar.AlwaysOn
|
||||
}
|
||||
Controls.ScrollBar.vertical: Controls.ScrollBar {}
|
||||
|
||||
onFocusChanged: {
|
||||
if (focus) {
|
||||
Connections {
|
||||
target: parent
|
||||
|
||||
function onFocusRequested() {
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Item {
|
|||
anchors.rightMargin: root.rightMargin
|
||||
|
||||
function focusChild() {
|
||||
currentItem.childFocus = true;
|
||||
currentItem.focusRequested();
|
||||
}
|
||||
|
||||
onCurrentIndexChanged: focusChild()
|
||||
|
|
@ -74,8 +74,7 @@ Item {
|
|||
height: swipeView.height
|
||||
width: swipeView.width
|
||||
|
||||
|
||||
property alias childFocus: favoritesView.focus
|
||||
signal focusRequested()
|
||||
|
||||
// open wallpaper menu when held on click
|
||||
TapHandler {
|
||||
|
|
@ -101,7 +100,7 @@ Item {
|
|||
width: swipeView.width
|
||||
height: swipeView.height
|
||||
|
||||
property alias childFocus: gridAppList.focus
|
||||
signal focusRequested()
|
||||
|
||||
GridAppList {
|
||||
id: gridAppList
|
||||
|
|
|
|||
Loading…
Reference in a new issue