config moved to c++ plugin, removed old qml + fileview implementation
This commit is contained in:
@@ -3,7 +3,8 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: contextMenu
|
||||
@@ -42,13 +43,13 @@ Item {
|
||||
CustomClippingRect {
|
||||
id: popupBackground
|
||||
|
||||
readonly property real padding: Appearance.padding.small
|
||||
readonly property real padding: Tokens.padding.small
|
||||
|
||||
color: DynamicColors.tPalette.m3surface
|
||||
color: Colors.tPalette.m3surface
|
||||
implicitHeight: menuLayout.implicitHeight + padding * 2
|
||||
implicitWidth: menuLayout.implicitWidth + padding * 2
|
||||
opacity: contextMenu.visible ? 1 : 0
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
x: contextMenu.menuX
|
||||
y: contextMenu.menuY
|
||||
|
||||
@@ -65,14 +66,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.preferredWidth: 160
|
||||
implicitHeight: openRow.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: openRow.implicitHeight + Tokens.padding.small * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: openRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -108,14 +109,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: openWithRow.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: openWithRow.implicitHeight + Tokens.padding.small * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: openWithRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -147,20 +148,20 @@ Item {
|
||||
Layout.bottomMargin: 4
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 4
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: copyPathRow.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: copyPathRow.implicitHeight + Tokens.padding.small * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: copyPathRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -186,7 +187,7 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: renameRow.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: renameRow.implicitHeight + Tokens.padding.small * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
visible: contextMenu.targetPaths.length === 1
|
||||
|
||||
@@ -194,7 +195,7 @@ Item {
|
||||
id: renameRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -222,31 +223,31 @@ Item {
|
||||
Layout.bottomMargin: 4
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 4
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: deleteRow.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: deleteRow.implicitHeight + Tokens.padding.small * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: deleteRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
color: deleteButton.hovered ? DynamicColors.palette.m3onError : DynamicColors.palette.m3error
|
||||
color: deleteButton.hovered ? Colors.palette.m3onError : Colors.palette.m3error
|
||||
font.pointSize: 20
|
||||
text: "delete"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
color: deleteButton.hovered ? DynamicColors.palette.m3onError : DynamicColors.palette.m3error
|
||||
color: deleteButton.hovered ? Colors.palette.m3onError : Colors.palette.m3error
|
||||
text: "Move to trash"
|
||||
}
|
||||
}
|
||||
@@ -255,7 +256,7 @@ Item {
|
||||
id: deleteButton
|
||||
|
||||
anchors.fill: parent
|
||||
color: DynamicColors.tPalette.m3error
|
||||
color: Colors.tPalette.m3error
|
||||
|
||||
onClicked: {
|
||||
let cmd = ["gio", "trash"].concat(contextMenu.targetPaths);
|
||||
|
||||
Reference in New Issue
Block a user