mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
folio: Load SettingsComponent as Async
Avoid to load SettingsComponent in same time as Homescreen because it take ~200ms to load.
This commit is contained in:
parent
8c1bb94310
commit
ceeb3b3770
1 changed files with 21 additions and 11 deletions
|
|
@ -108,7 +108,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
|
||||
interactive: root.interactive &&
|
||||
settings.homeScreenInteractive &&
|
||||
settingsLoader.homeScreenInteractive &&
|
||||
(appDrawer.flickable.contentY <= 10 || // disable the swipe area when we are swiping in the app drawer, and not in drag-and-drop
|
||||
folio.HomeScreenState.swipeState === Folio.HomeScreenState.AwaitingDraggingDelegate ||
|
||||
folio.HomeScreenState.swipeState === Folio.HomeScreenState.DraggingDelegate ||
|
||||
|
|
@ -143,25 +143,35 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
SettingsComponent {
|
||||
id: settings
|
||||
folio: root.folio
|
||||
Loader {
|
||||
id: settingsLoader
|
||||
asynchronous: true
|
||||
active: true
|
||||
|
||||
// Don't anchor, since we set y
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
opacity: folio.HomeScreenState.settingsOpenProgress
|
||||
z: 1
|
||||
|
||||
bottomMargin: root.bottomMargin
|
||||
leftMargin: root.leftMargin
|
||||
rightMargin: root.rightMargin
|
||||
|
||||
// move the settings out of the way if it is not visible
|
||||
// NOTE: we do this instead of setting visible to false, because
|
||||
// it doesn't mess with widget drag and drop
|
||||
y: (opacity > 0) ? 0 : parent.height
|
||||
z: 1
|
||||
|
||||
settingsModeHomeScreenScale: root.settingsModeHomeScreenScale
|
||||
homeScreen: root
|
||||
readonly property bool homeScreenInteractive: item ? item.homeScreenInteractive : true
|
||||
|
||||
sourceComponent: SettingsComponent {
|
||||
id: settings
|
||||
folio: root.folio
|
||||
|
||||
bottomMargin: root.bottomMargin
|
||||
leftMargin: root.leftMargin
|
||||
rightMargin: root.rightMargin
|
||||
|
||||
settingsModeHomeScreenScale: root.settingsModeHomeScreenScale
|
||||
homeScreen: root
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
|||
Loading…
Reference in a new issue