summaryrefslogtreecommitdiff
path: root/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml
diff options
context:
space:
mode:
authorAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
committerAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
commit70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch)
treeab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml
parent5d94c0a7d44a2255b81815a52a7056a94a39842d (diff)
downloadRaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz
RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml')
-rw-r--r--raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml105
1 files changed, 0 insertions, 105 deletions
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml
deleted file mode 100644
index a7f39c3..0000000
--- a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modals/DankLauncherV2/GridItem.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import QtQuick
-import qs.Common
-import qs.Widgets
-
-Rectangle {
- id: root
-
- property var item: null
- property bool isSelected: false
- property bool isHovered: itemArea.containsMouse
- property var controller: null
- property int flatIndex: -1
-
- signal clicked
- signal rightClicked(real mouseX, real mouseY)
-
- readonly property string iconValue: {
- if (!item)
- return "";
- switch (item.iconType) {
- case "material":
- case "nerd":
- return "material:" + (item.icon || "apps");
- case "unicode":
- return "unicode:" + (item.icon || "");
- case "composite":
- return item.iconFull || "";
- case "image":
- default:
- return item.icon || "";
- }
- }
-
- readonly property int computedIconSize: Math.min(48, Math.max(32, width * 0.45))
-
- radius: Theme.cornerRadius
- color: isSelected ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : "transparent"
-
- DankRipple {
- id: rippleLayer
- rippleColor: Theme.surfaceText
- cornerRadius: root.radius
- }
-
- Column {
- anchors.centerIn: parent
- anchors.margins: Theme.spacingS
- spacing: Theme.spacingS
- width: parent.width - Theme.spacingM
-
- AppIconRenderer {
- width: root.computedIconSize
- height: root.computedIconSize
- anchors.horizontalCenter: parent.horizontalCenter
- iconValue: root.iconValue
- iconSize: root.computedIconSize
- fallbackText: (root.item?.name?.length > 0) ? root.item.name.charAt(0).toUpperCase() : "?"
- iconColor: root.isSelected ? Theme.primary : Theme.surfaceText
- materialIconSizeAdjustment: root.computedIconSize * 0.3
- }
-
- Text {
- width: parent.width
- text: root.item?._hName ?? root.item?.name ?? ""
- textFormat: root.item?._hRich ? Text.RichText : Text.PlainText
- font.pixelSize: Theme.fontSizeSmall
- font.weight: Font.Medium
- font.family: Theme.fontFamily
- color: root.isSelected ? Theme.primary : Theme.surfaceText
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignHCenter
- maximumLineCount: 2
- wrapMode: Text.Wrap
- }
- }
-
- MouseArea {
- id: itemArea
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
- acceptedButtons: Qt.LeftButton | Qt.RightButton
-
- onPressed: mouse => {
- if (mouse.button === Qt.LeftButton)
- rippleLayer.trigger(mouse.x, mouse.y);
- }
- onClicked: mouse => {
- if (mouse.button === Qt.RightButton) {
- var scenePos = mapToItem(null, mouse.x, mouse.y);
- root.rightClicked(scenePos.x, scenePos.y);
- } else {
- root.clicked();
- }
- }
-
- onPositionChanged: {
- if (root.controller) {
- root.controller.keyboardNavigationActive = false;
- }
- }
- }
-}