config moved to c++ plugin, removed old qml + fileview implementation
This commit is contained in:
+8
-7
@@ -2,7 +2,8 @@ pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -10,18 +11,18 @@ Singleton {
|
||||
readonly property var colors: {
|
||||
if (deviceState === UPowerDeviceState.Charging || deviceState === UPowerDeviceState.FullyCharged)
|
||||
return {
|
||||
fg: DynamicColors.swapRG(DynamicColors.palette.m3error),
|
||||
bg: DynamicColors.swapRG(DynamicColors.palette.m3onError)
|
||||
fg: Colors.swapRG(Colors.palette.m3error),
|
||||
bg: Colors.swapRG(Colors.palette.m3onError)
|
||||
};
|
||||
else if (currentPerc <= 0.2)
|
||||
return {
|
||||
fg: DynamicColors.palette.m3error,
|
||||
bg: DynamicColors.palette.m3onError
|
||||
fg: Colors.palette.m3error,
|
||||
bg: Colors.palette.m3onError
|
||||
};
|
||||
else
|
||||
return {
|
||||
fg: DynamicColors.palette.m3onSurface,
|
||||
bg: DynamicColors.palette.m3surface
|
||||
fg: Colors.palette.m3onSurface,
|
||||
bg: Colors.palette.m3surface
|
||||
};
|
||||
}
|
||||
readonly property real currentPerc: UPower.displayDevice.percentage
|
||||
|
||||
@@ -4,7 +4,7 @@ pragma ComponentBehavior: Bound
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
|
||||
Singleton {
|
||||
|
||||
@@ -4,7 +4,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import "../scripts/fuzzysort.js" as Fuzzy
|
||||
|
||||
Singleton {
|
||||
|
||||
@@ -4,7 +4,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -4,7 +4,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import ZShell
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma Singleton
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import ZShell.Services
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
pragma Singleton
|
||||
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
|
||||
@@ -4,8 +4,9 @@ import Quickshell
|
||||
import QtQuick
|
||||
import qs.Modules
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Paths
|
||||
import qs.Services
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -55,10 +56,10 @@ Singleton {
|
||||
}
|
||||
|
||||
if (isDarkTime) {
|
||||
if (DynamicColors.light)
|
||||
if (Colors.light)
|
||||
root.applyDarkMode();
|
||||
} else {
|
||||
if (!DynamicColors.light)
|
||||
if (!Colors.light)
|
||||
root.applyLightMode();
|
||||
}
|
||||
}
|
||||
@@ -86,10 +87,10 @@ Singleton {
|
||||
}
|
||||
|
||||
if (isDarkTime) {
|
||||
if (DynamicColors.light)
|
||||
if (Colors.light)
|
||||
root.applyDarkMode();
|
||||
} else {
|
||||
if (!DynamicColors.light)
|
||||
if (!Colors.light)
|
||||
root.applyLightMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import ZShell.Internal
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
+4
-5
@@ -6,9 +6,10 @@ import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Helpers.Picker
|
||||
import qs.Paths
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -340,7 +341,7 @@ Item {
|
||||
Rectangle {
|
||||
id: border
|
||||
|
||||
border.color: DynamicColors.palette.m3primary
|
||||
border.color: Colors.palette.m3primary
|
||||
border.width: root.realBorderWidth
|
||||
color: "transparent"
|
||||
implicitHeight: selectionRect.implicitHeight + root.realBorderWidth * 2
|
||||
@@ -390,7 +391,7 @@ Item {
|
||||
tool: root.tool
|
||||
visible: root.mode === "edit"
|
||||
x: Math.max(8, Math.min(root.rsx + root.sw / 2 - width / 2, root.screen.width - width - 8))
|
||||
y: (root.rsy + root.sh + height + Appearance.padding.normal <= root.screen.height) ? root.rsy + root.sh + Appearance.padding.normal : (root.rsy - height - Appearance.padding.normal <= 0) ? root.rsy + root.sh - height - Appearance.padding.normal : root.rsy - height - Appearance.padding.normal
|
||||
y: (root.rsy + root.sh + height + Tokens.padding.normal <= root.screen.height) ? root.rsy + root.sh + Tokens.padding.normal : (root.rsy - height - Tokens.padding.normal <= 0) ? root.rsy + root.sh - height - Tokens.padding.normal : root.rsy - height - Tokens.padding.normal
|
||||
|
||||
onCancelRequested: root.cancel()
|
||||
onClearRequested: annotations.clearAll()
|
||||
@@ -402,7 +403,5 @@ Item {
|
||||
}
|
||||
|
||||
component ExAnim: Anim {
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import ZShell.Components
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
CustomRect {
|
||||
id: root
|
||||
@@ -47,10 +48,10 @@ CustomRect {
|
||||
signal toolSelected(string tool)
|
||||
signal undoRequested
|
||||
|
||||
color: DynamicColors.palette.m3surface
|
||||
height: row.implicitHeight + Appearance.padding.normal * 2
|
||||
radius: Appearance.rounding.full
|
||||
width: row.implicitWidth + Appearance.padding.normal * 2
|
||||
color: Colors.palette.m3surface
|
||||
height: row.implicitHeight + Tokens.padding.normal * 2
|
||||
radius: Tokens.rounding.full
|
||||
width: row.implicitWidth + Tokens.padding.normal * 2
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
@@ -61,7 +62,7 @@ CustomRect {
|
||||
ButtonRow {
|
||||
id: toolRow
|
||||
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
Repeater {
|
||||
model: root.toolList
|
||||
@@ -73,8 +74,8 @@ CustomRect {
|
||||
|
||||
color: root.tool === modelData.id ? "#3584e4" : "transparent"
|
||||
icon: tool.modelData.glyph
|
||||
inactiveColor: root.tool === modelData.id ? DynamicColors.palette.m3primary : "transparent"
|
||||
inactiveOnColor: root.tool === modelData.id ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
inactiveColor: root.tool === modelData.id ? Colors.palette.m3primary : "transparent"
|
||||
inactiveOnColor: root.tool === modelData.id ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: shapeMorph && pressed ? 12 : 0
|
||||
@@ -87,17 +88,17 @@ CustomRect {
|
||||
CustomRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 1
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
}
|
||||
|
||||
ButtonRow {
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
Repeater {
|
||||
model: root.colorPalette
|
||||
|
||||
delegate: IconButton {
|
||||
readonly property real buttonSize: toolRow.implicitHeight - Appearance.padding.normal
|
||||
readonly property real buttonSize: toolRow.implicitHeight - Tokens.padding.normal
|
||||
required property color modelData
|
||||
|
||||
fillWidth: false
|
||||
@@ -106,7 +107,7 @@ CustomRect {
|
||||
implicitHeight: buttonSize
|
||||
implicitWidth: buttonSize
|
||||
inactiveColor: modelData
|
||||
inactiveOnColor: DynamicColors.on(modelData)
|
||||
inactiveOnColor: Colors.on(modelData)
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
@@ -119,16 +120,16 @@ CustomRect {
|
||||
CustomRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 1
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
}
|
||||
|
||||
ButtonRow {
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
IconButton {
|
||||
icon: "undo"
|
||||
inactiveColor: "transparent"
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
inactiveOnColor: Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
@@ -139,7 +140,7 @@ CustomRect {
|
||||
IconButton {
|
||||
icon: "delete_history"
|
||||
inactiveColor: "transparent"
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
inactiveOnColor: Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
@@ -150,7 +151,7 @@ CustomRect {
|
||||
IconButton {
|
||||
icon: "content_copy"
|
||||
inactiveColor: "transparent"
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
inactiveOnColor: Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
@@ -161,7 +162,7 @@ CustomRect {
|
||||
IconButton {
|
||||
icon: "delete_forever"
|
||||
inactiveColor: "transparent"
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
inactiveOnColor: Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
@@ -172,7 +173,7 @@ CustomRect {
|
||||
IconButton {
|
||||
icon: "check"
|
||||
inactiveColor: "transparent"
|
||||
inactiveOnColor: DynamicColors.palette.m3onSurface
|
||||
inactiveOnColor: Colors.palette.m3onSurface
|
||||
isRound: true
|
||||
shapeMorph: true
|
||||
shapeMorphExpansion: pressed ? 12 : 0
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import Quickshell.Io
|
||||
import Quickshell.Services.Mpris
|
||||
import ZShell
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Paths
|
||||
|
||||
Singleton {
|
||||
|
||||
@@ -3,7 +3,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Paths
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
@@ -5,7 +5,7 @@ import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import ZShell.Models
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Helpers
|
||||
import qs.Paths
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import ZShell
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
Reference in New Issue
Block a user