mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +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
|
||||
height: flickContainer.height
|
||||
|
||||
// listen to app launch errors
|
||||
Connections {
|
||||
target: HomeScreenComponents.ApplicationListModel
|
||||
onLaunchError: MobileShell.HomeScreenControls.closeAppLaunchAnimation()
|
||||
}
|
||||
|
||||
// horizontal pages
|
||||
HomeScreenPages {
|
||||
id: pages
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ Repeater {
|
|||
onLaunch: (x, y, icon, title) => {
|
||||
if (icon !== "") {
|
||||
print(delegate.iconItem)
|
||||
MobileShell.HomeScreenControls.openAppAnimation(
|
||||
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||
icon,
|
||||
title,
|
||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ AbstractAppDrawer {
|
|||
}
|
||||
onLaunch: (x, y, icon, title, storageId) => {
|
||||
if (icon !== "") {
|
||||
MobileShell.HomeScreenControls.openAppAnimation(
|
||||
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||
icon,
|
||||
title,
|
||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ AbstractAppDrawer {
|
|||
}
|
||||
onLaunch: (x, y, icon, title, storageId) => {
|
||||
if (icon !== "") {
|
||||
MobileShell.HomeScreenControls.openAppAnimation(
|
||||
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||
icon,
|
||||
title,
|
||||
delegate.iconItem.Kirigami.ScenePosition.x + delegate.iconItem.width/2,
|
||||
|
|
|
|||
|
|
@ -69,9 +69,13 @@ FocusScope {
|
|||
//lastRequestedPosition = pos.y;
|
||||
}
|
||||
|
||||
function onOpenAppAnimation(splashIcon, title, x, y, sourceIconSize) {
|
||||
function onOpenAppLaunchAnimation(splashIcon, title, x, y, sourceIconSize) {
|
||||
startupFeedback.open(splashIcon, title, x, y, sourceIconSize);
|
||||
}
|
||||
|
||||
function onCloseAppLaunchAnimation() {
|
||||
startupFeedback.close();
|
||||
}
|
||||
}
|
||||
|
||||
Plasmoid.onScreenChanged: {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ QtObject {
|
|||
signal snapHomeScreenPosition()
|
||||
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 QtObject homeScreenWindow
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Components.BaseItem {
|
|||
root.toggleFunction();
|
||||
} else if (root.settingsCommand) {
|
||||
closeRequested();
|
||||
MobileShell.HomeScreenControls.openAppAnimation(
|
||||
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||
root.icon,
|
||||
root.text,
|
||||
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
||||
|
|
@ -60,7 +60,7 @@ Components.BaseItem {
|
|||
function delegatePressAndHold() {
|
||||
if (root.settingsCommand) {
|
||||
closeRequested();
|
||||
MobileShell.HomeScreenControls.openAppAnimation(
|
||||
MobileShell.HomeScreenControls.openAppLaunchAnimation(
|
||||
root.icon,
|
||||
root.text,
|
||||
iconItem.Kirigami.ScenePosition.x + iconItem.width/2,
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ NanoShell.FullScreenOverlay {
|
|||
|
||||
onClicked: {
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue