mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-30 00:04:45 +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
|
anchors.fill: parent
|
||||||
|
|
||||||
interactive: root.interactive &&
|
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
|
(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.AwaitingDraggingDelegate ||
|
||||||
folio.HomeScreenState.swipeState === Folio.HomeScreenState.DraggingDelegate ||
|
folio.HomeScreenState.swipeState === Folio.HomeScreenState.DraggingDelegate ||
|
||||||
|
|
@ -143,26 +143,36 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsComponent {
|
Loader {
|
||||||
id: settings
|
id: settingsLoader
|
||||||
folio: root.folio
|
asynchronous: true
|
||||||
|
active: true
|
||||||
|
|
||||||
|
// Don't anchor, since we set y
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
opacity: folio.HomeScreenState.settingsOpenProgress
|
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
|
// move the settings out of the way if it is not visible
|
||||||
// NOTE: we do this instead of setting visible to false, because
|
// NOTE: we do this instead of setting visible to false, because
|
||||||
// it doesn't mess with widget drag and drop
|
// it doesn't mess with widget drag and drop
|
||||||
y: (opacity > 0) ? 0 : parent.height
|
y: (opacity > 0) ? 0 : parent.height
|
||||||
|
z: 1
|
||||||
|
|
||||||
|
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
|
settingsModeHomeScreenScale: root.settingsModeHomeScreenScale
|
||||||
homeScreen: root
|
homeScreen: root
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainHomeScreen
|
id: mainHomeScreen
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue