summaryrefslogtreecommitdiff
path: root/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml
diff options
context:
space:
mode:
authornippy <you@example.com>2026-04-18 13:49:56 +0200
committernippy <you@example.com>2026-04-18 13:49:56 +0200
commit5d94c0a7d44a2255b81815a52a7056a94a39842d (patch)
tree759bdea9645c6a62f9e1e4c001f7d81cccd120d2 /raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml
parente79cdf210b267f21a186255ce1a4d50029439d54 (diff)
downloadRaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.tar.gz
RaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.zip
update Raveos themes
Diffstat (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml')
-rw-r--r--raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml60
1 files changed, 60 insertions, 0 deletions
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml
new file mode 100644
index 0000000..c5ec3a6
--- /dev/null
+++ b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsDropdownRow.qml
@@ -0,0 +1,60 @@
+pragma ComponentBehavior: Bound
+
+import QtQuick
+import qs.Common
+import qs.Services
+import qs.Widgets
+
+DankDropdown {
+ 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
+ addHorizontalPadding: true
+ usePopupTransparency: false
+
+ 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
+ }
+ }
+ }
+
+ 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);
+ }
+}