Changed the glass animations to a more bubble-like animation

This commit is contained in:
SomeElse
2026-05-25 06:06:33 +00:00
parent 390525ac72
commit 8d6406284f
7 changed files with 136 additions and 158 deletions

View File

@@ -28,7 +28,6 @@ PanelWindow {
property bool _isOpen: false
readonly property bool isOpen: _isOpen
property string mode: "drun"
property bool _keyboardNav: false
property var allItems: []
property bool loading: false
@@ -82,7 +81,7 @@ PanelWindow {
}
function readCache() {
const path = Cfg.Config.launcherCacheDir + "/" + (mode === "drun" ? "drun.txt" : "run.txt")
const path = Cfg.Config.launcherCacheDir + "/drun.txt"
dataProc.rawOutput = ""
dataProc.command = ["cat", path]
dataProc.running = true
@@ -140,8 +139,6 @@ PanelWindow {
close()
}
onModeChanged: if (_isOpen) loadItems()
visible: false
color: "transparent"
@@ -159,7 +156,6 @@ PanelWindow {
id: closeTimer
onTriggered: {
root.visible = false
root.mode = "drun"
root.allItems = []
}
}
@@ -288,44 +284,6 @@ PanelWindow {
}
resultsList.positionViewAtIndex(resultsList.currentIndex, ListView.Contain)
}
Keys.onTabPressed: root.mode = root.mode === "drun" ? "run" : "drun"
}
Rectangle {
height: 28
width: modeRow.implicitWidth + 10
radius: 8
color: t.launcherPill
border.color: t.launcherBorder
border.width: Cfg.Config.popupBorderWidth
RowLayout {
id: modeRow
anchors.centerIn: parent
spacing: 2
Repeater {
model: ["drun", "run"]
delegate: Rectangle {
height: 22
width: label.implicitWidth + 14
radius: 6
color: root.mode === modelData ? t.launcherModeActiveBg : "transparent"
Text {
id: label
anchors.centerIn: parent
text: modelData
font.pixelSize: 10
font.bold: root.mode === modelData
color: root.mode === modelData ? t.launcherModeActiveText : t.launcherDim
}
MouseArea {
anchors.fill: parent
onClicked: root.mode = modelData
}
}
}
}
}
}
}
@@ -386,7 +344,7 @@ PanelWindow {
Text {
anchors.centerIn: parent
visible: !appIcon.visible
text: root.mode === "drun" ? "󰣆" : "󰆍"
text: "󰣆"
color: resultsList.currentIndex === index && index !== -1 ? t.launcherAccent : t.launcherDim
font.pixelSize: 16
}