1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -05:00

meta cleanup and refactors

This commit is contained in:
bbedward
2025-07-18 11:40:17 -04:00
parent 06607fa25e
commit 3a3f18c298
30 changed files with 473 additions and 783 deletions

View File

@@ -5,13 +5,17 @@ import qs.Services
Rectangle {
id: root
signal clicked()
property bool isActive: false
readonly property bool nerdFontAvailable: Qt.fontFamilies()
.indexOf("Symbols Nerd Font") !== -1
width: 40
height: 30
radius: Theme.cornerRadius
color: launcherArea.containsMouse ? Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.12) : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08)
color: launcherArea.containsMouse || isActive ? Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.12) : Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.08)
Text {
anchors.centerIn: parent
@@ -28,9 +32,7 @@ Rectangle {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
LauncherService.toggleAppLauncher();
}
onClicked: root.clicked()
}
Behavior on color {

View File

@@ -67,7 +67,7 @@ Rectangle {
trayItem.activate();
} else if (mouse.button === Qt.RightButton) {
if (trayItem.hasMenu)
if (trayItem && trayItem.hasMenu)
customTrayMenu.showMenu(mouse.x, mouse.y);
}

View File

@@ -126,6 +126,10 @@ PanelWindow {
LauncherButton {
anchors.verticalCenter: parent.verticalCenter
isActive: launcher.isVisible
onClicked: {
appLauncher.toggle();
}
}
WorkspaceSwitcher {

View File

@@ -95,7 +95,7 @@ Rectangle {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
Quickshell.execDetached(["niri", "msg", "action", "focus-workspace", sequentialNumber.toString()]);
Quickshell.execDetached(["niri", "msg", "action", "focus-workspace", modelData.toString()]);
}
}