mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat(Spotlight): Add a New Lightweight Spotlight style launcher option
This commit is contained in:
@@ -61,7 +61,8 @@ Item {
|
||||
impl.item.toggleWithMode(mode);
|
||||
}
|
||||
|
||||
readonly property var _desiredBackend: SettingsData.connectedFrameModeActive ? connectedComp : standaloneComp
|
||||
readonly property bool useSpotlightBackend: SettingsData.connectedFrameModeActive ? SettingsData.frameUseSpotlightLauncher : SettingsData.launcherStyle === "spotlight"
|
||||
readonly property var _desiredBackend: useSpotlightBackend ? spotlightComp : (SettingsData.connectedFrameModeActive ? connectedComp : standaloneComp)
|
||||
property var _resolvedBackend: null
|
||||
|
||||
Component.onCompleted: _resolvedBackend = _desiredBackend
|
||||
@@ -71,6 +72,12 @@ Item {
|
||||
function onConnectedFrameModeActiveChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
function onFrameUseSpotlightLauncherChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
function onLauncherStyleChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
}
|
||||
|
||||
// Defer Loader source-component swap until impl is fully closed; avoids
|
||||
@@ -100,6 +107,11 @@ Item {
|
||||
DankLauncherV2ModalConnected {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: spotlightComp
|
||||
DankLauncherV2ModalSpotlight {}
|
||||
}
|
||||
|
||||
function _wireBackend(it) {
|
||||
if (!it)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user