mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 02:04:45 +00:00
homescreen: Ensure signal is listened to for closing startup feedback on error
This commit is contained in:
parent
7e47315bcb
commit
529f42296a
8 changed files with 19 additions and 8 deletions
|
|
@ -66,6 +66,12 @@ Item {
|
||||||
width: flickContainer.width
|
width: flickContainer.width
|
||||||
height: flickContainer.height
|
height: flickContainer.height
|
||||||
|
|
||||||
|
// listen to app launch errors
|
||||||
|
Connections {
|
||||||
|
target: HomeScreenComponents.ApplicationListModel
|
||||||
|
onLaunchError: MobileShell.HomeScreenControls.closeAppLaunchAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
// horizontal pages
|
// horizontal pages
|
||||||
HomeScreenPages {
|
HomeScreenPages {
|
||||||
id: pages
|
id: pages
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ Repeater {
|
||||||
onLaunch: (x, y, icon, title) => {
|
onLaunch: (x, y, icon, title) => {
|
||||||
if (icon !== "") {
|
if (icon !== "") {
|
||||||
print(delegate.iconItem)
|
print(delegate.iconItem)
|
||||||
MobileShell.HomeScreenControls.openAppAnimation(
|
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ AbstractAppDrawer {
|
||||||
}
|
}
|
||||||
onLaunch: (x, y, icon, title, storageId) => {
|
onLaunch: (x, y, icon, title, storageId) => {
|
||||||
if (icon !== "") {
|
if (icon !== "") {
|
||||||
MobileShell.HomeScreenControls.openAppAnimation(
|
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ AbstractAppDrawer {
|
||||||
}
|
}
|
||||||
onLaunch: (x, y, icon, title, storageId) => {
|
onLaunch: (x, y, icon, title, storageId) => {
|
||||||
if (icon !== "") {
|
if (icon !== "") {
|
||||||
MobileShell.HomeScreenControls.openAppAnimation(
|
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,13 @@ FocusScope {
|
||||||
//lastRequestedPosition = pos.y;
|
//lastRequestedPosition = pos.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOpenAppAnimation(splashIcon, title, x, y, sourceIconSize) {
|
function onOpenAppLaunchAnimation(splashIcon, title, x, y, sourceIconSize) {
|
||||||
startupFeedback.open(splashIcon, title, x, y, sourceIconSize);
|
startupFeedback.open(splashIcon, title, x, y, sourceIconSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onCloseAppLaunchAnimation() {
|
||||||
|
startupFeedback.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasmoid.onScreenChanged: {
|
Plasmoid.onScreenChanged: {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ QtObject {
|
||||||
signal snapHomeScreenPosition()
|
signal snapHomeScreenPosition()
|
||||||
signal requestRelativeScroll(point pos)
|
signal requestRelativeScroll(point pos)
|
||||||
|
|
||||||
signal openAppAnimation(string splashIcon, string title, real x, real y, real sourceIconSize)
|
signal openAppLaunchAnimation(string splashIcon, string title, real x, real y, real sourceIconSize)
|
||||||
|
signal closeAppLaunchAnimation()
|
||||||
|
|
||||||
property var taskSwitcher
|
property var taskSwitcher
|
||||||
property QtObject homeScreenWindow
|
property QtObject homeScreenWindow
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ Components.BaseItem {
|
||||||
root.toggleFunction();
|
root.toggleFunction();
|
||||||
} else if (root.settingsCommand) {
|
} else if (root.settingsCommand) {
|
||||||
closeRequested();
|
closeRequested();
|
||||||
MobileShell.HomeScreenControls.openAppAnimation(
|
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||||
root.icon,
|
root.icon,
|
||||||
root.text,
|
root.text,
|
||||||
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
||||||
|
|
@ -60,7 +60,7 @@ Components.BaseItem {
|
||||||
function delegatePressAndHold() {
|
function delegatePressAndHold() {
|
||||||
if (root.settingsCommand) {
|
if (root.settingsCommand) {
|
||||||
closeRequested();
|
closeRequested();
|
||||||
MobileShell.HomeScreenControls.openAppAnimation(
|
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||||
root.icon,
|
root.icon,
|
||||||
root.text,
|
root.text,
|
||||||
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ NanoShell.FullScreenOverlay {
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let coords = mapToItem(flickable, 0, 0);
|
let coords = mapToItem(flickable, 0, 0);
|
||||||
MobileShell.HomeScreenControls.openAppAnimation("audio-volume-high", i18n("Audio Settings"), coords.x, coords.y, PlasmaCore.Units.iconSizes.medium);
|
MobileShell.HomeScreenControls.openAppLaunchAnimation("audio-volume-high", i18n("Audio Settings"), coords.x, coords.y, PlasmaCore.Units.iconSizes.medium);
|
||||||
plasmoid.nativeInterface.executeCommand("plasma-open-settings kcm_pulseaudio");
|
plasmoid.nativeInterface.executeCommand("plasma-open-settings kcm_pulseaudio");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue