mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
refactor(Spotlight): Use Spotlight alongside OG Launcher
- Update to add DMS Action keys in Keyboard Shortcuts - Defaulted in niri/hyprland includes file as `Alt+Space` - New (IPC): `dms ipc call spotlight-bar toggle` - Slight UI update to follow user radius
This commit is contained in:
@@ -62,7 +62,7 @@ Item {
|
||||
impl.item.toggleWithMode(mode);
|
||||
}
|
||||
|
||||
readonly property bool useSpotlightBackend: SettingsData.connectedFrameModeActive ? SettingsData.frameUseSpotlightLauncher : SettingsData.launcherStyle === "spotlight"
|
||||
readonly property bool useSpotlightBackend: !SettingsData.connectedFrameModeActive && SettingsData.launcherStyle === "spotlight"
|
||||
readonly property var _desiredBackend: useSpotlightBackend ? spotlightComp : (SettingsData.connectedFrameModeActive ? connectedComp : standaloneComp)
|
||||
property var _resolvedBackend: null
|
||||
|
||||
@@ -73,9 +73,6 @@ Item {
|
||||
function onConnectedFrameModeActiveChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
function onFrameUseSpotlightLauncherChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
function onLauncherStyleChanged() {
|
||||
root._maybeResolveBackend();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ Item {
|
||||
const searchBarH = 56;
|
||||
const usableH = Math.max(searchBarH, screenHeight - insetT - insetB);
|
||||
const preferred = insetT + Math.max(0, usableH * 0.33 - searchBarH / 2);
|
||||
const maxY = Math.max(insetT, screenHeight - insetB - _contentImplicitH);
|
||||
const maxY = Math.max(insetT, screenHeight - insetB - 56);
|
||||
return Math.max(insetT, Math.min(preferred, maxY));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ FocusScope {
|
||||
|
||||
readonly property bool _hasQuery: searchInput.text.length > 0
|
||||
readonly property real _searchBarH: 56
|
||||
readonly property real _surfaceInset: BlurService.enabled ? (_hasQuery ? Theme.spacingS : Theme.spacingXS) : 0
|
||||
readonly property real _searchAreaH: _searchBarH + _surfaceInset * 2
|
||||
readonly property real _searchAreaH: _searchBarH
|
||||
readonly property real _statusH: 92
|
||||
readonly property real _rowH: 64
|
||||
readonly property real _maxResultsH: Math.min(430, (parentModal?.screenHeight ?? 900) * 0.55)
|
||||
@@ -233,11 +232,8 @@ FocusScope {
|
||||
Rectangle {
|
||||
id: searchBarSurface
|
||||
anchors.fill: parent
|
||||
anchors.margins: root._surfaceInset
|
||||
radius: height / 2
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(root._hasQuery ? Theme.surfaceContainerHigh : Theme.surfaceContainer, root._hasQuery ? Theme.popupTransparency : Math.max(0.68, Theme.popupTransparency * 0.9))
|
||||
border.color: BlurService.enabled && !root._hasQuery ? Theme.withAlpha(Theme.outline, 0.08) : "transparent"
|
||||
border.width: BlurService.enabled && !root._hasQuery ? 1 : 0
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
@@ -384,8 +380,6 @@ FocusScope {
|
||||
anchors.top: searchBarItem.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: root._surfaceInset
|
||||
anchors.rightMargin: root._surfaceInset
|
||||
height: 1
|
||||
color: Theme.outlineMedium
|
||||
opacity: root._resultsH > 0 ? 0.55 : 0
|
||||
|
||||
Reference in New Issue
Block a user