From 5d94c0a7d44a2255b81815a52a7056a94a39842d Mon Sep 17 00:00:00 2001 From: nippy Date: Sat, 18 Apr 2026 13:49:56 +0200 Subject: update Raveos themes --- .../Modules/Settings/Widgets/SettingsToggleRow.qml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsToggleRow.qml (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsToggleRow.qml') diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsToggleRow.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsToggleRow.qml new file mode 100644 index 0000000..684b639 --- /dev/null +++ b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsToggleRow.qml @@ -0,0 +1,58 @@ +pragma ComponentBehavior: Bound + +import QtQuick +import qs.Common +import qs.Services +import qs.Widgets + +DankToggle { + id: root + + LayoutMirroring.enabled: I18n.isRtl + LayoutMirroring.childrenInherit: true + + property string tab: "" + property var tags: [] + property string settingKey: "" + + readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey + + width: parent?.width ?? 0 + + function findParentFlickable() { + let p = root.parent; + while (p) { + if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem")) + return p; + p = p.parent; + } + return null; + } + + Component.onCompleted: { + if (!settingKey) + return; + let flickable = findParentFlickable(); + if (flickable) + SettingsSearchService.registerCard(settingKey, root, flickable); + } + + Component.onDestruction: { + if (settingKey) + SettingsSearchService.unregisterCard(settingKey); + } + + Rectangle { + anchors.fill: parent + radius: Theme.cornerRadius + color: Theme.withAlpha(Theme.primary, root.isHighlighted ? 0.2 : 0) + visible: root.isHighlighted + + Behavior on color { + ColorAnimation { + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + } +} -- cgit v1.3