mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
homescreen: Don't play zoom animation when going between maximized window states
This commit is contained in:
parent
a607fc2600
commit
eff9d3df9a
2 changed files with 48 additions and 18 deletions
|
|
@ -102,6 +102,35 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.VirtualDesktopInfo {
|
||||||
|
id: virtualDesktopInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager.ActivityInfo {
|
||||||
|
id: activityInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
PlasmaCore.SortFilterModel {
|
||||||
|
id: visibleMaximizedWindowsModel
|
||||||
|
readonly property bool isWindowMaximized: count > 0
|
||||||
|
|
||||||
|
filterRole: 'IsMinimized'
|
||||||
|
filterRegExp: 'false'
|
||||||
|
sourceModel: TaskManager.TasksModel {
|
||||||
|
id: tasksModel
|
||||||
|
filterByVirtualDesktop: true
|
||||||
|
filterByActivity: true
|
||||||
|
filterNotMaximized: true
|
||||||
|
filterByScreen: true
|
||||||
|
filterHidden: true
|
||||||
|
|
||||||
|
virtualDesktop: virtualDesktopInfo.currentDesktop
|
||||||
|
activity: activityInfo.currentActivity
|
||||||
|
|
||||||
|
groupMode: TaskManager.TasksModel.GroupDisabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// homescreen visual component
|
// homescreen visual component
|
||||||
MobileShell.BaseItem {
|
MobileShell.BaseItem {
|
||||||
id: itemContainer
|
id: itemContainer
|
||||||
|
|
@ -142,19 +171,29 @@ Item {
|
||||||
easing.type: Easing.OutExpo
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
function evaluateAnimChange() {
|
||||||
target: MobileShell.WindowUtil
|
|
||||||
|
|
||||||
function onActiveWindowIsShellChanged() {
|
|
||||||
// only animate if homescreen is visible
|
// only animate if homescreen is visible
|
||||||
if (!taskSwitcher.visible) {
|
if (!taskSwitcher.visible) {
|
||||||
if (MobileShell.WindowUtil.activeWindowIsShell) {
|
if (!visibleMaximizedWindowsModel.isWindowMaximized || MobileShell.WindowUtil.activeWindowIsShell) {
|
||||||
itemContainer.zoomIn();
|
itemContainer.zoomIn();
|
||||||
} else {
|
} else {
|
||||||
itemContainer.zoomOut();
|
itemContainer.zoomOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: MobileShell.WindowUtil
|
||||||
|
function onActiveWindowIsShellChanged() {
|
||||||
|
itemContainer.evaluateAnimChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: visibleMaximizedWindowsModel
|
||||||
|
function onIsWindowMaximizedChanged() {
|
||||||
|
itemContainer.evaluateAnimChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
@ -180,14 +219,6 @@ Item {
|
||||||
activity: activityInfo.currentActivity
|
activity: activityInfo.currentActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskManager.VirtualDesktopInfo {
|
|
||||||
id: virtualDesktopInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
TaskManager.ActivityInfo {
|
|
||||||
id: activityInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
// hide homescreen elements to make use of wallpaper
|
// hide homescreen elements to make use of wallpaper
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,6 @@ PlasmaCore.ColorScope {
|
||||||
filterByScreen: true
|
filterByScreen: true
|
||||||
filterHidden: true
|
filterHidden: true
|
||||||
|
|
||||||
// screenGeometry: panel.screenGeometry
|
|
||||||
virtualDesktop: virtualDesktopInfo.currentDesktop
|
virtualDesktop: virtualDesktopInfo.currentDesktop
|
||||||
activity: activityInfo.currentActivity
|
activity: activityInfo.currentActivity
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue