diff options
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml new file mode 100644 index 0000000..bc02b3e --- /dev/null +++ b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Modals/FileBrowser/FileBrowserSidebar.qml @@ -0,0 +1,70 @@ +import QtQuick +import qs.Common +import qs.Widgets + +StyledRect { + id: sidebar + + property var quickAccessLocations: [] + property string currentPath: "" + signal locationSelected(string path) + + width: 200 + color: Theme.surface + clip: true + + Column { + anchors.fill: parent + anchors.margins: Theme.spacingS + spacing: 4 + + StyledText { + text: I18n.tr("Quick Access") + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceTextMedium + font.weight: Font.Medium + leftPadding: Theme.spacingS + bottomPadding: Theme.spacingXS + } + + Repeater { + model: quickAccessLocations + + StyledRect { + width: parent?.width ?? 0 + height: 38 + radius: Theme.cornerRadius + color: quickAccessMouseArea.containsMouse ? Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) : (currentPath === modelData?.path ? Theme.surfacePressed : "transparent") + + Row { + anchors.fill: parent + anchors.leftMargin: Theme.spacingM + spacing: Theme.spacingS + + DankIcon { + name: modelData?.icon ?? "" + size: Theme.iconSize - 2 + color: currentPath === modelData?.path ? Theme.primary : Theme.surfaceText + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + text: modelData?.name ?? "" + font.pixelSize: Theme.fontSizeMedium + color: currentPath === modelData?.path ? Theme.primary : Theme.surfaceText + font.weight: currentPath === modelData?.path ? Font.Medium : Font.Normal + anchors.verticalCenter: parent.verticalCenter + } + } + + MouseArea { + id: quickAccessMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: locationSelected(modelData?.path ?? "") + } + } + } + } +} |