diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
| commit | 3462bcc46ecf74f576ea4397f16492c16bd75b10 (patch) | |
| tree | c5ab7aef4498647e057bda8d49c11e5f9dda74c9 /raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml | |
| parent | 56616f693b4f263cbf0d47da43b67424efa6022d (diff) | |
| download | RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.tar.gz RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.zip | |
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml b/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml new file mode 100644 index 0000000..81e6457 --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/LauncherButton.qml @@ -0,0 +1,123 @@ +import QtQuick +import QtQuick.Effects +import Quickshell.Widgets +import qs.Common +import qs.Modules.Plugins +import qs.Services +import qs.Widgets + +BasePill { + id: root + + property bool isActive: false + property var hyprlandOverviewLoader: null + + content: Component { + Item { + implicitWidth: root.widgetThickness - root.horizontalPadding * 2 + implicitHeight: root.widgetThickness - root.horizontalPadding * 2 + + DankIcon { + visible: SettingsData.launcherLogoMode === "apps" + anchors.centerIn: parent + name: "apps" + size: Theme.barIconSize(root.barThickness, -4, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + color: Theme.widgetIconColor + } + + SystemLogo { + visible: SettingsData.launcherLogoMode === "os" + anchors.centerIn: parent + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + colorOverride: Theme.effectiveLogoColor + brightnessOverride: SettingsData.launcherLogoBrightness + contrastOverride: SettingsData.launcherLogoContrast + } + + IconImage { + visible: SettingsData.launcherLogoMode === "dank" + anchors.centerIn: parent + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + smooth: true + mipmap: true + asynchronous: true + source: "file://" + Theme.shellDir + "/assets/danklogo.svg" + layer.enabled: Theme.effectiveLogoColor !== "" + layer.smooth: true + layer.mipmap: true + layer.effect: MultiEffect { + saturation: 0 + colorization: 1 + colorizationColor: Theme.effectiveLogoColor + } + } + + IconImage { + visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle || CompositorService.isLabwc) + anchors.centerIn: parent + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + smooth: true + asynchronous: true + source: { + if (CompositorService.isNiri) { + return "file://" + Theme.shellDir + "/assets/niri.svg"; + } else if (CompositorService.isHyprland) { + return "file://" + Theme.shellDir + "/assets/hyprland.svg"; + } else if (CompositorService.isDwl) { + return "file://" + Theme.shellDir + "/assets/mango.png"; + } else if (CompositorService.isSway) { + return "file://" + Theme.shellDir + "/assets/sway.svg"; + } else if (CompositorService.isScroll) { + return "file://" + Theme.shellDir + "/assets/sway.svg"; + } else if (CompositorService.isMiracle) { + return "file://" + Theme.shellDir + "/assets/miraclewm.svg"; + } else if (CompositorService.isLabwc) { + return "file://" + Theme.shellDir + "/assets/labwc.png"; + } + return ""; + } + layer.enabled: Theme.effectiveLogoColor !== "" + layer.effect: MultiEffect { + saturation: 0 + colorization: 1 + colorizationColor: Theme.effectiveLogoColor + brightness: { + SettingsData.launcherLogoBrightness; + } + contrast: { + SettingsData.launcherLogoContrast; + } + } + } + + IconImage { + visible: SettingsData.launcherLogoMode === "custom" && SettingsData.launcherLogoCustomPath !== "" + anchors.centerIn: parent + width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset, root.barConfig?.maximizeWidgetIcons, root.barConfig?.iconScale) + smooth: true + asynchronous: true + source: SettingsData.launcherLogoCustomPath ? "file://" + SettingsData.launcherLogoCustomPath.replace("file://", "") : "" + layer.enabled: Theme.effectiveLogoColor !== "" + layer.effect: MultiEffect { + saturation: 0 + colorization: 1 + colorizationColor: Theme.effectiveLogoColor + brightness: SettingsData.launcherLogoBrightness + contrast: SettingsData.launcherLogoContrast + } + } + } + } + + onRightClicked: { + if (CompositorService.isNiri) { + NiriService.toggleOverview(); + } else if (root.hyprlandOverviewLoader?.item) { + root.hyprlandOverviewLoader.item.overviewOpen = !root.hyprlandOverviewLoader.item.overviewOpen; + } + } +} |