Skip panel window open to improve performance

This commit is contained in:
Devin Lin 2021-05-09 19:32:32 -04:00
parent 19fe5a1afe
commit f97d5db94b
2 changed files with 3 additions and 2 deletions

View file

@ -48,6 +48,8 @@ NanoShell.FullScreenOverlay {
width: Screen.width width: Screen.width
height: Screen.height height: Screen.height
Component.onCompleted: plasmoid.nativeInterface.panel = window;
onInitiallyOpenedChanged: { onInitiallyOpenedChanged: {
if (initiallyOpened) mainFlickable.focus = true; if (initiallyOpened) mainFlickable.focus = true;
} }
@ -128,7 +130,6 @@ NanoShell.FullScreenOverlay {
to: window.closedContentY to: window.closedContentY
onFinished: { onFinished: {
window.visible = false; window.visible = false;
window.closed();
} }
} }
PropertyAnimation { PropertyAnimation {

View file

@ -182,7 +182,7 @@ Item {
slidingPanel.userInteracting = true; slidingPanel.userInteracting = true;
slidingPanel.flickable.contentY = slidingPanel.closedContentY; slidingPanel.flickable.contentY = slidingPanel.closedContentY;
oldMouseY = mouse.y; oldMouseY = mouse.y;
slidingPanel.showFullScreen(); slidingPanel.visible = true;
} }
onPositionChanged: { onPositionChanged: {
slidingPanel.updateOffset(mouse.y - oldMouseY); slidingPanel.updateOffset(mouse.y - oldMouseY);