initial commit for media widget update + anim tokens restructure
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
This commit is contained in:
@@ -16,7 +16,7 @@ Item {
|
||||
required property bool fullscreen
|
||||
readonly property bool horizontal: position !== "left"
|
||||
property bool isHovered
|
||||
readonly property int padding: Math.max(Tokens.padding.smaller, Config.bar.border)
|
||||
readonly property int padding: Math.max(Tokens.padding.small, Config.bar.border)
|
||||
required property Wrapper popouts
|
||||
required property ClipWrapper popoutsWrapper
|
||||
required property string position
|
||||
|
||||
@@ -44,7 +44,7 @@ WidgetBase {
|
||||
}
|
||||
required property GridLayout loader
|
||||
required property Wrapper popouts
|
||||
readonly property real size: horizontal ? timeText.contentWidth + Tokens.padding.normal * 2 : verticalColumn.implicitHeight + Tokens.padding.larger * 2
|
||||
readonly property real size: horizontal ? timeText.contentWidth + Tokens.padding.small * 2 : verticalColumn.implicitHeight + Tokens.padding.small * 2
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
color: visibilities.dashboard ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
|
||||
@@ -72,7 +72,7 @@ WidgetBase {
|
||||
id: verticalColumn
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Tokens.padding.small ?? 2
|
||||
spacing: Tokens.padding.extraSmall ?? 2
|
||||
visible: !root.horizontal
|
||||
width: root.baseSize
|
||||
|
||||
@@ -96,8 +96,8 @@ WidgetBase {
|
||||
|
||||
Rectangle {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.bottomMargin: Tokens.padding.small ?? 2
|
||||
Layout.topMargin: Tokens.padding.small ?? 2
|
||||
Layout.bottomMargin: Tokens.padding.extraSmall ?? 2
|
||||
Layout.topMargin: Tokens.padding.extraSmall ?? 2
|
||||
color: root.contentColor
|
||||
height: 1
|
||||
implicitWidth: root.baseSize * 0.5
|
||||
|
||||
@@ -7,13 +7,13 @@ import qs.Helpers
|
||||
Row {
|
||||
id: root
|
||||
|
||||
property real batHeight: Tokens.padding.smaller * 2
|
||||
property real batWidth: Tokens.padding.larger * 2
|
||||
property real batHeight: Tokens.padding.small * 2
|
||||
property real batWidth: Tokens.padding.medium * 2
|
||||
required property string devState
|
||||
property real nubHeight: Tokens.padding.small
|
||||
property real nubHeight: Tokens.padding.extraSmall
|
||||
property real nubWidth: 2
|
||||
required property real percentage
|
||||
property real radius: Tokens.rounding.smallest / 2
|
||||
property real radius: Tokens.rounding.small / 2
|
||||
|
||||
spacing: 1
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ WidgetBase {
|
||||
readonly property string currentMedia: (Players.active?.trackTitle ?? qsTr("No media")) || qsTr("Unknown title")
|
||||
readonly property int textWidth: Math.min(metrics.width, 200)
|
||||
|
||||
implicitHeight: horizontal ? baseSize : layout.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitWidth: horizontal ? layout.implicitWidth + Tokens.padding.normal * 2 : baseSize
|
||||
implicitHeight: horizontal ? baseSize : layout.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: horizontal ? layout.implicitWidth + Tokens.padding.small * 2 : baseSize
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Behavior on implicitHeight {
|
||||
@@ -39,11 +39,11 @@ WidgetBase {
|
||||
GridLayout {
|
||||
id: layout
|
||||
|
||||
anchors.bottomMargin: root.horizontal ? 0 : Tokens.padding.normal
|
||||
anchors.bottomMargin: root.horizontal ? 0 : Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: root.horizontal ? Tokens.padding.normal : 0
|
||||
anchors.rightMargin: root.horizontal ? Tokens.padding.normal : 0
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.padding.normal
|
||||
anchors.leftMargin: root.horizontal ? Tokens.padding.small : 0
|
||||
anchors.rightMargin: root.horizontal ? Tokens.padding.small : 0
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.padding.small
|
||||
columns: root.horizontal ? -1 : 1
|
||||
|
||||
Behavior on implicitWidth {
|
||||
|
||||
@@ -22,7 +22,7 @@ GridLayout {
|
||||
property bool warning: percentage * 100 >= warningThreshold
|
||||
property int warningThreshold: 80
|
||||
|
||||
columnSpacing: Tokens.spacing.smaller
|
||||
columnSpacing: Tokens.spacing.medium
|
||||
columns: horizontal ? -1 : 1
|
||||
percentage: 0
|
||||
|
||||
@@ -49,7 +49,7 @@ GridLayout {
|
||||
}
|
||||
|
||||
CustomClippingRect {
|
||||
Layout.preferredHeight: root.horizontal ? icon.implicitHeight - Tokens.padding.small : 4
|
||||
Layout.preferredHeight: root.horizontal ? icon.implicitHeight - Tokens.padding.extraSmall : 4
|
||||
Layout.preferredWidth: root.horizontal ? 4 : icon.implicitWidth
|
||||
color: Colors.layer(Colors.palette.m3surfaceContainerHigh, 2)
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
@@ -16,8 +16,8 @@ WidgetBase {
|
||||
|
||||
clip: true
|
||||
color: visibilities.resources ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: horizontal ? baseSize : gridLayout.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitWidth: horizontal ? gridLayout.implicitWidth + Tokens.padding.larger * 2 : baseSize
|
||||
implicitHeight: horizontal ? baseSize : gridLayout.implicitHeight + Tokens.padding.medium * 2
|
||||
implicitWidth: horizontal ? gridLayout.implicitWidth + Tokens.padding.medium * 2 : baseSize
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StateLayer {
|
||||
@@ -32,7 +32,7 @@ WidgetBase {
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: root.horizontal ? 0 : 1
|
||||
anchors.verticalCenterOffset: root.horizontal ? 0 : -3
|
||||
columnSpacing: Tokens.spacing.smaller
|
||||
columnSpacing: Tokens.spacing.small
|
||||
columns: root.horizontal ? -1 : 1
|
||||
|
||||
ServiceRef {
|
||||
|
||||
@@ -30,8 +30,8 @@ WidgetBase {
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
readonly property real size: horizontal ? grid.implicitWidth + Tokens.padding.small * 2 : grid.implicitHeight + Tokens.padding.small * 2
|
||||
readonly property int spacing: Tokens.spacing.normal / 2
|
||||
readonly property real size: horizontal ? grid.implicitWidth + grid.anchors.leftMargin + grid.anchors.rightMargin : grid.implicitHeight + grid.anchors.bottomMargin + grid.anchors.topMargin
|
||||
readonly property int spacing: Tokens.spacing.medium / 2
|
||||
|
||||
// Entries that can shrink to nothing, spacing included
|
||||
function collapsed(entry: var): bool {
|
||||
@@ -40,13 +40,13 @@ WidgetBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
bottomLeftRadius: horizontal ? Tokens.rounding.smallest / 2 : Tokens.rounding.full
|
||||
bottomLeftRadius: horizontal ? Tokens.rounding.small / 2 : Tokens.rounding.full
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: horizontal ? baseSize : size
|
||||
implicitWidth: horizontal ? size : baseSize
|
||||
radius: Tokens.rounding.full
|
||||
topLeftRadius: Tokens.rounding.smallest / 2
|
||||
topRightRadius: horizontal ? Tokens.rounding.full : Tokens.rounding.smallest / 2
|
||||
topLeftRadius: Tokens.rounding.small / 2
|
||||
topRightRadius: horizontal ? Tokens.rounding.full : Tokens.rounding.small / 2
|
||||
|
||||
Behavior on implicitHeight {
|
||||
enabled: !root.horizontal
|
||||
@@ -64,11 +64,11 @@ WidgetBase {
|
||||
GridLayout {
|
||||
id: grid
|
||||
|
||||
anchors.bottomMargin: root.horizontal ? 0 : Tokens.padding.small
|
||||
anchors.bottomMargin: root.horizontal ? 0 : Tokens.padding.medium
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: root.horizontal ? Tokens.padding.small : 0
|
||||
anchors.rightMargin: root.horizontal ? Tokens.padding.small : 0
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.padding.small
|
||||
anchors.leftMargin: root.horizontal ? Tokens.padding.extraSmall : 0
|
||||
anchors.rightMargin: root.horizontal ? Tokens.padding.extraSmall : 0
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.padding.extraSmall
|
||||
columns: root.horizontal ? -1 : 1
|
||||
|
||||
Repeater {
|
||||
|
||||
@@ -16,22 +16,26 @@ WidgetBase {
|
||||
readonly property alias items: repeater
|
||||
readonly property alias layout: sysGrid
|
||||
required property GridLayout loader
|
||||
readonly property int padding: Tokens.padding.small
|
||||
readonly property int padding: Tokens.padding.extraSmall
|
||||
required property Wrapper popouts
|
||||
readonly property real size: horizontal ? sysGrid.implicitWidth + Tokens.padding.small : sysGrid.implicitHeight + Tokens.padding.small
|
||||
readonly property real size: horizontal ? sysGrid.implicitWidth + sysGrid.anchors.leftMargin + sysGrid.anchors.rightMargin : sysGrid.implicitHeight + sysGrid.anchors.topMargin + sysGrid.anchors.bottomMargin
|
||||
|
||||
bottomLeftRadius: horizontal ? Tokens.rounding.full : Tokens.rounding.smallest / 2
|
||||
bottomRightRadius: Tokens.rounding.smallest / 2
|
||||
bottomLeftRadius: horizontal ? Tokens.rounding.full : Tokens.rounding.small / 2
|
||||
bottomRightRadius: Tokens.rounding.small / 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: horizontal ? baseSize : size
|
||||
implicitWidth: horizontal ? size : baseSize
|
||||
radius: Tokens.rounding.full
|
||||
topRightRadius: horizontal ? Tokens.rounding.smallest / 2 : Tokens.rounding.full
|
||||
topRightRadius: horizontal ? Tokens.rounding.small / 2 : Tokens.rounding.full
|
||||
|
||||
GridLayout {
|
||||
id: sysGrid
|
||||
|
||||
anchors.bottomMargin: root.horizontal ? 0 : Tokens.padding.extraSmall
|
||||
anchors.centerIn: parent
|
||||
anchors.leftMargin: root.horizontal ? Tokens.padding.extraSmall : 0
|
||||
anchors.rightMargin: root.horizontal ? Tokens.padding.extraSmall : 0
|
||||
anchors.topMargin: root.horizontal ? 0 : Tokens.padding.extraSmall
|
||||
columns: root.horizontal ? -1 : 1
|
||||
rowSpacing: -2
|
||||
|
||||
@@ -46,6 +50,7 @@ WidgetBase {
|
||||
required property int index
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
implicitHeight: 34
|
||||
implicitWidth: 34
|
||||
ind: index
|
||||
|
||||
@@ -12,7 +12,7 @@ import qs.Services
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property real activeWorkspaceMargin: Math.ceil(Tokens.padding.small / 2)
|
||||
property real activeWorkspaceMargin: Math.ceil(Tokens.padding.medium / 4)
|
||||
readonly property int effectiveActiveWorkspaceId: monitor?.activeWorkspace?.id ?? 1
|
||||
required property bool horizontal
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen)
|
||||
|
||||
@@ -15,12 +15,13 @@ import qs.Services
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int rounding: Tokens.rounding.small - Tokens.padding.small
|
||||
readonly property int panelRadius: Tokens.rounding.largeIncreased + Tokens.padding.smaller
|
||||
readonly property int rounding: panelRadius - Tokens.padding.smaller
|
||||
readonly property int topMargin: 0
|
||||
required property var wrapper
|
||||
|
||||
implicitHeight: vol.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: 500 + Tokens.padding.small * 2
|
||||
implicitHeight: vol.implicitHeight + Tokens.padding.smaller * 2
|
||||
implicitWidth: 500 + Tokens.padding.smaller * 2
|
||||
|
||||
CustomRect {
|
||||
anchors.left: parent.left
|
||||
@@ -28,7 +29,7 @@ Item {
|
||||
anchors.top: parent.top
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: parent.implicitHeight
|
||||
radius: Tokens.rounding.small
|
||||
radius: root.rounding
|
||||
y: parent.y
|
||||
|
||||
Behavior on implicitHeight {
|
||||
@@ -41,7 +42,7 @@ Item {
|
||||
id: vol
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.margins: Tokens.padding.smaller
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -51,17 +52,17 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.small * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
radius: root.rounding - vol.anchors.margins
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -82,12 +83,12 @@ Item {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.medium * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
@@ -109,7 +110,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
checked: !Audio.muted
|
||||
|
||||
onToggled: {
|
||||
@@ -124,10 +125,10 @@ Item {
|
||||
|
||||
CustomClippingRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.small * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
radius: root.rounding - vol.anchors.margins
|
||||
|
||||
PwNodePeakMonitor {
|
||||
id: sourcePeak
|
||||
@@ -151,11 +152,11 @@ Item {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -176,12 +177,12 @@ Item {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.medium * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
@@ -203,7 +204,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
checked: !Audio.sourceMuted
|
||||
|
||||
onToggled: {
|
||||
@@ -236,10 +237,10 @@ Item {
|
||||
required property var modelData
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.smaller * 2
|
||||
Layout.preferredHeight: 65 + Tokens.spacing.small * 2
|
||||
Layout.topMargin: root.topMargin
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding
|
||||
radius: root.rounding - vol.anchors.margins
|
||||
|
||||
PwNodePeakMonitor {
|
||||
id: peak
|
||||
@@ -271,11 +272,11 @@ Item {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottomMargin: Tokens.padding.smaller
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
@@ -297,12 +298,12 @@ Item {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Tokens.padding.larger * 3
|
||||
Layout.preferredHeight: Tokens.padding.medium * 3
|
||||
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
@@ -324,7 +325,7 @@ Item {
|
||||
}
|
||||
|
||||
CustomSwitch {
|
||||
Layout.bottomMargin: Tokens.padding.normal
|
||||
Layout.bottomMargin: Tokens.padding.small
|
||||
checked: !appBox.modelData.audio.muted
|
||||
|
||||
onToggled: {
|
||||
|
||||
@@ -58,7 +58,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: content.animLength
|
||||
easing.bezierCurve: content.animCurve
|
||||
easing: content.animCurve
|
||||
}
|
||||
}
|
||||
Behavior on y {
|
||||
@@ -66,7 +66,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: content.animLength
|
||||
easing.bezierCurve: content.animCurve
|
||||
easing: content.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ Item {
|
||||
anchors.top: root.position === "top" ? parent.top : undefined
|
||||
anchors.topMargin: (-implicitHeight - 5) * root.offsetScale
|
||||
anchors.verticalCenter: root.horizontal ? undefined : parent.verticalCenter
|
||||
horizontal: root.horizontal
|
||||
offsetScale: root.offsetScale
|
||||
screen: root.screen
|
||||
}
|
||||
|
||||
@@ -11,10 +11,11 @@ Item {
|
||||
|
||||
readonly property Item current: currentPopout?.item ?? null
|
||||
readonly property Popout currentPopout: content.children.find(c => c.shouldBeActive) ?? null
|
||||
required property bool horizontal
|
||||
required property PopoutState popouts
|
||||
|
||||
implicitHeight: (currentPopout?.implicitHeight ?? 0) + Tokens.padding.small * 2
|
||||
implicitWidth: (currentPopout?.implicitWidth ?? 0) + Tokens.padding.small * 2
|
||||
implicitHeight: (currentPopout?.implicitHeight ?? 0) + Tokens.padding.smaller * 2
|
||||
implicitWidth: (currentPopout?.implicitWidth ?? 0) + Tokens.padding.smaller * 2
|
||||
|
||||
Item {
|
||||
id: content
|
||||
@@ -69,6 +70,7 @@ Item {
|
||||
name: "upower"
|
||||
|
||||
sourceComponent: UPowerPopout {
|
||||
horizontal: root.horizontal
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +101,7 @@ Item {
|
||||
anchors.centerIn: opacity === 1 ? undefined : parent
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: opacity === 1 ? parent.top : undefined
|
||||
anchors.topMargin: 5
|
||||
anchors.topMargin: Tokens.padding.smaller
|
||||
opacity: 0
|
||||
scale: 0.8
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ StackView {
|
||||
id: root
|
||||
|
||||
readonly property int itemHeight: 30
|
||||
readonly property int panelRadius: ((itemHeight / 2) + Tokens.padding.small) * Tokens.rounding.scale
|
||||
readonly property int panelRadius: ((itemHeight / 2) + Tokens.padding.extraSmall) * Tokens.rounding.scale
|
||||
required property PopoutState popouts
|
||||
property int rootWidth: 0
|
||||
required property QsMenuHandle trayItem
|
||||
@@ -88,10 +88,10 @@ StackView {
|
||||
required property QsMenuEntry modelData
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: modelData.isSeparator ? Tokens.padding.normal : 0
|
||||
Layout.rightMargin: modelData.isSeparator ? Tokens.padding.normal : 0
|
||||
color: modelData.isSeparator ? Colors.palette.m3outlineVariant : "transparent"
|
||||
implicitHeight: modelData.isSeparator ? (visible ? 1 : 0) : childrenLoader.item.implicitHeight
|
||||
Layout.leftMargin: modelData?.isSeparator ?? false ? Tokens.padding.small : 0
|
||||
Layout.rightMargin: modelData?.isSeparator ?? false ? Tokens.padding.small : 0
|
||||
color: modelData?.isSeparator ?? false ? Colors.palette.m3outlineVariant : "transparent"
|
||||
implicitHeight: modelData?.isSeparator ?? false ? (visible ? 1 : 0) : childrenLoader.item?.implicitHeight ?? 0
|
||||
implicitWidth: childrenLoader.item?.implicitWidth ?? 0
|
||||
radius: Tokens.rounding.full
|
||||
visible: index !== (menuOpener.children.values.length - 1) ? true : (modelData.isSeparator ? false : true)
|
||||
@@ -99,18 +99,18 @@ StackView {
|
||||
Loader {
|
||||
id: childrenLoader
|
||||
|
||||
active: !item.modelData.isSeparator
|
||||
active: !item.modelData?.isSeparator ?? false
|
||||
anchors.fill: parent
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: Item {
|
||||
property int iconWidth: icon.active ? icon.width + Tokens.spacing.normal + icon.anchors.rightMargin : 0
|
||||
property int iconWidth: icon.active ? icon.width + Tokens.spacing.medium + icon.anchors.rightMargin : 0
|
||||
|
||||
implicitHeight: root.itemHeight
|
||||
implicitWidth: label.width + label.anchors.leftMargin * 2 + iconWidth + (expand.item?.width ?? 0)
|
||||
|
||||
StateLayer {
|
||||
enabled: item.modelData.enabled
|
||||
enabled: item.modelData?.enabled ?? false
|
||||
radius: item.radius
|
||||
|
||||
onClicked: {
|
||||
@@ -130,7 +130,7 @@ StackView {
|
||||
Loader {
|
||||
id: icon
|
||||
|
||||
active: item.modelData.icon !== ""
|
||||
active: item.modelData?.icon ?? "" !== ""
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -144,7 +144,7 @@ StackView {
|
||||
id: iconImage
|
||||
|
||||
implicitSize: parent.implicitHeight
|
||||
source: item.modelData.icon
|
||||
source: item.modelData?.icon ?? Qt.url("")
|
||||
visible: false
|
||||
}
|
||||
|
||||
@@ -163,20 +163,20 @@ StackView {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: item.modelData.enabled ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
text: item.modelData.text
|
||||
color: item.modelData?.enabled ?? false ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
text: item.modelData?.text ?? ""
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: expand
|
||||
|
||||
active: item.modelData.hasChildren
|
||||
active: item.modelData?.hasChildren ?? false
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: MaterialIcon {
|
||||
color: item.modelData.enabled ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
color: item.modelData?.enabled ?? false ? Colors.palette.m3onSurface : Colors.palette.m3outline
|
||||
text: "chevron_right"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,10 @@ import qs.Services
|
||||
Column {
|
||||
id: root
|
||||
|
||||
readonly property int panelRadius: ((profiles.height / 2) + Tokens.padding.small) * Tokens.rounding.scale
|
||||
required property bool horizontal
|
||||
readonly property int panelRadius: ((profiles.height / 2) + Tokens.padding.extraSmall) * Tokens.rounding.scale
|
||||
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Loader {
|
||||
active: Battery.isLaptop
|
||||
@@ -24,6 +25,13 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: padding
|
||||
|
||||
implicitHeight: root.horizontal ? 0 : Tokens.padding.small
|
||||
implicitWidth: 1
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: Battery.allPeripherals
|
||||
|
||||
@@ -33,9 +41,9 @@ Column {
|
||||
required property var modelData
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
@@ -67,7 +75,7 @@ Column {
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
text: Battery.isLaptop ? qsTr("Time %1: %2").arg(Battery.onBattery ? "remaining" : "until charged").arg(Battery.onBattery ? formatSeconds(Battery.timeToEmpty, "Calculating...") : formatSeconds(Battery.timeToFull, "Fully charged!")) : qsTr("Power profile: %1").arg(PowerProfile.toString(PowerProfiles.profile))
|
||||
}
|
||||
|
||||
@@ -80,8 +88,8 @@ Column {
|
||||
sourceComponent: CustomRect {
|
||||
color: Colors.palette.m3error
|
||||
implicitHeight: child.implicitHeight + Tokens.padding.large
|
||||
implicitWidth: child.implicitWidth + Tokens.padding.larger * 2
|
||||
radius: Tokens.rounding.large
|
||||
implicitWidth: child.implicitWidth + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
Column {
|
||||
id: child
|
||||
@@ -138,7 +146,7 @@ Column {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: indicator.height + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Tokens.padding.larger * 2 + Tokens.spacing.small * 8
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Tokens.padding.small * 2 + Tokens.spacing.small * 8
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
CustomRect {
|
||||
@@ -219,8 +227,8 @@ Column {
|
||||
required property string icon
|
||||
required property int profile
|
||||
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.extraSmall
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.extraSmall
|
||||
|
||||
StateLayer {
|
||||
color: profiles.current === parent.icon ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
|
||||
@@ -13,13 +13,13 @@ CustomClippingRect {
|
||||
id: root
|
||||
|
||||
readonly property bool hasUpdates: Object.keys(Updates.updates)?.length > 0
|
||||
readonly property int itemHeight: 50 + Tokens.padding.smaller * 2
|
||||
readonly property int itemHeight: 50 + Tokens.padding.small * 2
|
||||
required property var wrapper
|
||||
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: hasUpdates ? updatesListLoader.item?.implicitHeight + Tokens.padding.small * 2 : noUpdatesLoader.item.height
|
||||
implicitWidth: hasUpdates ? updatesListLoader.item?.contentWidth + Tokens.padding.small * 2 : noUpdatesLoader.item.width
|
||||
radius: Tokens.rounding.small
|
||||
implicitHeight: hasUpdates ? updatesListLoader.item?.implicitHeight + Tokens.padding.extraSmall * 2 : noUpdatesLoader.item.height
|
||||
implicitWidth: hasUpdates ? updatesListLoader.item?.contentWidth + Tokens.padding.extraSmall * 2 : noUpdatesLoader.item.width
|
||||
radius: Tokens.rounding.large - Tokens.padding.smaller
|
||||
|
||||
Loader {
|
||||
id: noUpdatesLoader
|
||||
@@ -70,7 +70,7 @@ CustomClippingRect {
|
||||
displayMarginEnd: root.itemHeight
|
||||
implicitHeight: Math.min(contentHeight, (root.itemHeight + spacing) * 5 - spacing)
|
||||
implicitWidth: contentWidth
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
delegate: CustomRect {
|
||||
id: update
|
||||
@@ -81,12 +81,12 @@ CustomClippingRect {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: root.itemHeight
|
||||
implicitWidth: 600
|
||||
radius: Tokens.rounding.small - Tokens.padding.small
|
||||
radius: root.radius - Tokens.padding.extraSmall
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon {
|
||||
font.pointSize: Tokens.font.size.large * 2
|
||||
|
||||
@@ -8,7 +8,7 @@ import ZShell.Config
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property list<real> animCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
property var animCurve: Tokens.anim.expressiveDefaultSpatial
|
||||
property int animLength: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
readonly property alias content: content
|
||||
readonly property Item current: (content.item as Content)?.current ?? null
|
||||
@@ -16,6 +16,7 @@ Item {
|
||||
property alias currentName: popoutState.currentName
|
||||
property string detachedMode
|
||||
property alias hasCurrent: popoutState.hasCurrent
|
||||
required property bool horizontal
|
||||
readonly property real nonAnimHeight: content.implicitHeight || 150
|
||||
readonly property real nonAnimWidth: children.find(c => c.shouldBeActive)?.implicitWidth ?? content.implicitWidth
|
||||
required property real offsetScale
|
||||
@@ -35,7 +36,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: root.animLength
|
||||
easing.bezierCurve: root.animCurve
|
||||
easing: root.animCurve
|
||||
}
|
||||
}
|
||||
Behavior on implicitWidth {
|
||||
@@ -43,7 +44,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: root.animLength
|
||||
easing.bezierCurve: root.animCurve
|
||||
easing: root.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +59,7 @@ Item {
|
||||
shouldBeActive: root.hasCurrent
|
||||
|
||||
sourceComponent: Content {
|
||||
horizontal: root.horizontal
|
||||
popouts: popoutState
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: entries.right
|
||||
anchors.leftMargin: Tokens.spacing.normal
|
||||
anchors.leftMargin: Tokens.spacing.medium
|
||||
anchors.top: parent.top
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitWidth: ClipHistory.previewIsImage ? Math.max(Math.min(imagePreview.sourceSize.width + Tokens.padding.large * 2, Config.clipboard.sizes.previewWidth), Config.clipboard.sizes.minPreviewWidth) : Math.max(Math.min(textPreviewColumn.width + textPreviewColumn.anchors.margins * 2, Config.clipboard.sizes.previewWidth), Config.clipboard.sizes.minPreviewWidth)
|
||||
@@ -75,7 +75,7 @@ Item {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.top: parent.top
|
||||
visible: !ClipHistory.previewIsImage
|
||||
|
||||
@@ -90,7 +90,7 @@ Item {
|
||||
required property int index
|
||||
required property var modelData
|
||||
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomRect {
|
||||
color: lineRow.index % 2 ? Colors.tPalette.m3surfaceContainer : "transparent"
|
||||
@@ -192,7 +192,7 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: search.bottom
|
||||
anchors.topMargin: Tokens.spacing.normal
|
||||
anchors.topMargin: Tokens.spacing.medium
|
||||
implicitWidth: Config.clipboard.sizes.width
|
||||
|
||||
CustomListView {
|
||||
@@ -204,7 +204,7 @@ Item {
|
||||
highlightRangeMode: ListView.ApplyRange
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: height
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomScrollBar.vertical: CustomScrollBar {
|
||||
flickable: view
|
||||
@@ -250,7 +250,7 @@ Item {
|
||||
id: icon
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: clipItem.isImage ? "image" : "text_fields"
|
||||
@@ -260,7 +260,7 @@ Item {
|
||||
id: text
|
||||
|
||||
anchors.left: icon.right
|
||||
anchors.margins: Tokens.spacing.normal
|
||||
anchors.margins: Tokens.spacing.medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: Text.ElideRight
|
||||
text: clipItem.isImage ? qsTr("Image") : ClipHistory.displayText(clipItem.modelData)
|
||||
@@ -292,7 +292,7 @@ Item {
|
||||
|
||||
IconButton {
|
||||
Layout.fillHeight: true
|
||||
Layout.margins: Tokens.padding.normal
|
||||
Layout.margins: Tokens.padding.small
|
||||
Layout.preferredWidth: height
|
||||
icon: "delete"
|
||||
inactiveColor: Qt.alpha(Colors.palette.m3error, 0.8)
|
||||
@@ -320,7 +320,7 @@ Item {
|
||||
Behavior on y {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
easing: Tokens.anim.expressiveDefaultEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,15 +15,15 @@ Item {
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitWidth: content.implicitWidth + Tokens.padding.normal * 2 || 400
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: content.implicitWidth + Tokens.padding.small * 2 || 400
|
||||
opacity: 1 - offsetScale
|
||||
visible: offsetScale < 1
|
||||
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@ Item {
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.smaller
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
color: "transparent"
|
||||
radius: Tokens.rounding.normal - anchors.margins
|
||||
radius: Tokens.rounding.extraLarge - anchors.margins
|
||||
|
||||
Item {
|
||||
id: view
|
||||
|
||||
@@ -13,11 +13,11 @@ GridLayout {
|
||||
|
||||
required property PersistentProperties dashState
|
||||
readonly property bool dashboardVisible: visibilities.dashboard
|
||||
property int radius: Tokens.rounding.smallest
|
||||
property int radius: Tokens.rounding.medium
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
columnSpacing: Tokens.spacing.smaller
|
||||
rowSpacing: Tokens.spacing.smaller
|
||||
columnSpacing: Tokens.spacing.small
|
||||
rowSpacing: Tokens.spacing.small
|
||||
|
||||
ParallelAnimation {
|
||||
id: openAnim
|
||||
@@ -104,12 +104,13 @@ GridLayout {
|
||||
}
|
||||
}
|
||||
|
||||
Rect {
|
||||
CustomClippingRect {
|
||||
Layout.column: 0
|
||||
Layout.columnSpan: 5
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: media.implicitHeight
|
||||
Layout.row: 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.radius
|
||||
|
||||
Media {
|
||||
|
||||
@@ -132,7 +132,7 @@ CustomMouseArea {
|
||||
|
||||
IconButton {
|
||||
icon: "chevron_left"
|
||||
padding: Tokens.padding.small
|
||||
padding: Tokens.padding.extraSmall
|
||||
type: IconButton.Text
|
||||
|
||||
onClicked: root.dashState.currentDate = new Date(root.realCurrYear, root.realCurrMonth - 1, 1)
|
||||
@@ -150,7 +150,7 @@ CustomMouseArea {
|
||||
const now = new Date();
|
||||
return root.realCurrMonth !== now.getMonth() || root.realCurrYear !== now.getFullYear();
|
||||
}
|
||||
radius: pressed ? Tokens.rounding.small : Tokens.rounding.large
|
||||
radius: pressed ? Tokens.rounding.small : Tokens.rounding.largeIncreased
|
||||
|
||||
Behavior on radius {
|
||||
Anim {
|
||||
@@ -203,7 +203,7 @@ CustomMouseArea {
|
||||
|
||||
IconButton {
|
||||
icon: "chevron_right"
|
||||
padding: Tokens.padding.small
|
||||
padding: Tokens.padding.extraSmall
|
||||
type: IconButton.Text
|
||||
|
||||
onClicked: root.dashState.currentDate = new Date(root.realCurrYear, root.realCurrMonth + 1, 1)
|
||||
@@ -259,7 +259,7 @@ CustomMouseArea {
|
||||
|
||||
required property var model
|
||||
|
||||
implicitHeight: text.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitHeight: text.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: implicitHeight
|
||||
|
||||
CustomText {
|
||||
|
||||
@@ -9,6 +9,7 @@ import QtQuick.Effects
|
||||
import ZShell.Components
|
||||
import ZShell.Services
|
||||
import ZShell.Config
|
||||
import qs.Modules.Dashboard.Dash.Media
|
||||
import qs.Daemons
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
@@ -25,7 +26,7 @@ Item {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
implicitHeight: layout.implicitHeight
|
||||
implicitHeight: layout.implicitHeight + layout.anchors.margins * 2
|
||||
function lengthStr(length: int): string {
|
||||
if (length < 0)
|
||||
return "-1:-1";
|
||||
@@ -57,14 +58,18 @@ Item {
|
||||
service: Audio.cava
|
||||
}
|
||||
|
||||
BackgroundShapes {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Shape {
|
||||
id: visualizer
|
||||
|
||||
readonly property int bars: Config.services.visualizerBars
|
||||
property color color: Colors.palette.m3tertiary
|
||||
property color fillColor: Qt.alpha(color, 0.25)
|
||||
property color color: Qt.alpha(Colors.palette.m3primary, 0.5)
|
||||
property color fillColor: Qt.alpha(color, 0.1)
|
||||
|
||||
anchors.fill: layout
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: -(shape.strokeWidth / 2)
|
||||
layer.enabled: true
|
||||
asynchronous: true
|
||||
@@ -87,15 +92,15 @@ Item {
|
||||
if (n < 2)
|
||||
return "";
|
||||
|
||||
const h = layout.height + shape.strokeWidth / 2;
|
||||
const w = layout.width + shape.strokeWidth;
|
||||
const h = root.height + shape.strokeWidth / 2;
|
||||
const w = root.width + shape.strokeWidth;
|
||||
|
||||
function x(i) {
|
||||
return i * w / (n - 1);
|
||||
}
|
||||
|
||||
function y(i) {
|
||||
return h - values[i] * Config.dashboard.sizes.mediaVisualizerSize;
|
||||
return h - (values[i] * Config.dashboard.sizes.mediaVisualizerSize) / 2;
|
||||
}
|
||||
|
||||
let d = `M 0 ${h} `;
|
||||
@@ -142,48 +147,21 @@ Item {
|
||||
RowLayout {
|
||||
id: layout
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.leftMargin: Tokens.padding.extraLarge
|
||||
|
||||
CustomClippingRect {
|
||||
id: cover
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
Layout.bottomMargin: Tokens.padding.large + Config.dashboard.sizes.mediaProgressThickness + Tokens.spacing.small
|
||||
Layout.leftMargin: Tokens.padding.large + Config.dashboard.sizes.mediaProgressThickness + Tokens.spacing.small
|
||||
Layout.preferredHeight: Config.dashboard.sizes.mediaCoverArtSize
|
||||
Layout.preferredWidth: Config.dashboard.sizes.mediaCoverArtSize
|
||||
Layout.topMargin: Tokens.padding.large + Config.dashboard.sizes.mediaProgressThickness + Tokens.spacing.small
|
||||
color: Colors.tPalette.m3surfaceContainerHigh
|
||||
radius: Infinity
|
||||
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: (parent.width * 0.4) || 1
|
||||
grade: 200
|
||||
text: "art_track"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image
|
||||
|
||||
anchors.fill: parent
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: Players.active?.trackArtUrl ?? ""
|
||||
sourceSize.height: Math.floor(height)
|
||||
sourceSize.width: Math.floor(width)
|
||||
}
|
||||
CoverVisualizer {
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: Config.dashboard.sizes.mediaCoverArtSize
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Tokens.spacing.large
|
||||
Layout.rightMargin: Tokens.spacing.large
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
Layout.leftMargin: Tokens.spacing.largeIncreased
|
||||
Layout.rightMargin: Tokens.spacing.largeIncreased
|
||||
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MarqueeText {
|
||||
id: title
|
||||
@@ -222,7 +200,7 @@ Item {
|
||||
|
||||
RowLayout {
|
||||
id: positionSliderLayout
|
||||
Layout.topMargin: Tokens.spacing.extraLargeIncreased
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
Layout.fillWidth: true
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
@@ -289,7 +267,6 @@ Item {
|
||||
checked: Players.active?.shuffle ?? false
|
||||
enabled: Players.active?.shuffleSupported
|
||||
onClicked: Players.active.shuffle = !Players.active?.shuffle
|
||||
implicitWidth: Math.round(implicitHeight * 0.9)
|
||||
}
|
||||
|
||||
IconButton {
|
||||
@@ -301,6 +278,7 @@ Item {
|
||||
shapeMorph: true
|
||||
enabled: Players.active?.canGoPrevious
|
||||
onClicked: Players.active?.previous()
|
||||
font.pointSize: Tokens.font.size.large
|
||||
}
|
||||
|
||||
IconButton {
|
||||
@@ -313,6 +291,7 @@ Item {
|
||||
checked: Players.active?.isPlaying ?? false
|
||||
enabled: Players.active?.canTogglePlaying
|
||||
onClicked: Players.active?.togglePlaying()
|
||||
font.pointSize: Tokens.font.size.large
|
||||
}
|
||||
|
||||
IconButton {
|
||||
@@ -324,6 +303,7 @@ Item {
|
||||
shapeMorph: true
|
||||
enabled: Players.active?.canGoNext
|
||||
onClicked: Players.active?.next()
|
||||
font.pointSize: Tokens.font.size.large
|
||||
}
|
||||
|
||||
IconButton {
|
||||
@@ -342,7 +322,6 @@ Item {
|
||||
else
|
||||
Players.active.loopState = MprisLoopState.None;
|
||||
}
|
||||
implicitWidth: Math.round(implicitHeight * 0.9)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import M3Shapes
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int count: 14
|
||||
property list<real> darkOpacities: [0.10, 0.20, 0.10, 0.20]
|
||||
property list<real> lightOpacities: [0.34, 0.34, 0.08, 0.2]
|
||||
property real maxRotSpeed: 12
|
||||
property real maxSize: 124
|
||||
property real maxSpeed: 18
|
||||
property real minRotSpeed: -12
|
||||
property real minSize: 36
|
||||
property real minSpeed: 4
|
||||
readonly property list<int> shapePool: [MaterialShape.Circle, MaterialShape.Cookie4Sided, MaterialShape.Cookie6Sided, MaterialShape.Cookie7Sided, MaterialShape.Cookie9Sided, MaterialShape.Cookie12Sided, MaterialShape.Sunny, MaterialShape.VerySunny, MaterialShape.SoftBurst, MaterialShape.Pentagon, MaterialShape.Gem, MaterialShape.Arch, MaterialShape.Arrow, MaterialShape.Pill, MaterialShape.Triangle, MaterialShape.Fan, MaterialShape.Oval]
|
||||
|
||||
function rand(min: real, max: real): real {
|
||||
return min + Math.random() * (max - min);
|
||||
}
|
||||
|
||||
function signedRand(min: real, max: real): real {
|
||||
return rand(min, max) * (Math.random() < 0.5 ? -1 : 1);
|
||||
}
|
||||
|
||||
Component.onCompleted: shapes.model = count
|
||||
|
||||
Repeater {
|
||||
id: shapes
|
||||
|
||||
DriftingShape {
|
||||
}
|
||||
}
|
||||
|
||||
FrameAnimation {
|
||||
running: root.visible && root.width > 0 && root.height > 0 && (Players.active?.isPlaying ?? false)
|
||||
|
||||
onTriggered: {
|
||||
const dt = frameTime;
|
||||
for (let i = 0; i < shapes.count; i++) {
|
||||
const s = shapes.itemAt(i) as DriftingShape;
|
||||
if (!s)
|
||||
continue;
|
||||
|
||||
s.x += s.vx * dt;
|
||||
s.y += s.vy * dt;
|
||||
s.rotation += s.vr * dt;
|
||||
|
||||
if (s.x + s.width < 0)
|
||||
s.x = root.width;
|
||||
else if (s.x > root.width)
|
||||
s.x = -s.width;
|
||||
|
||||
if (s.y + s.height < 0)
|
||||
s.y = root.height;
|
||||
else if (s.y > root.height)
|
||||
s.y = -s.height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component DriftingShape: MaterialShape {
|
||||
id: shapeItem
|
||||
|
||||
readonly property int colorIdx: Math.floor(Math.random() * 4)
|
||||
required property int index
|
||||
property real vr: root.rand(root.minRotSpeed, root.maxRotSpeed)
|
||||
property real vx: root.signedRand(root.minSpeed, root.maxSpeed)
|
||||
property real vy: root.signedRand(root.minSpeed, root.maxSpeed)
|
||||
|
||||
color: [Colors.palette.m3primaryContainer, Colors.palette.m3secondaryContainer, Colors.palette.m3tertiaryContainer, Colors.palette.m3outlineVariant][colorIdx]
|
||||
implicitSize: root.minSize + (index / root.count) * (root.maxSize - root.minSize)
|
||||
opacity: Colors.light ? root.lightOpacities[colorIdx] : root.darkOpacities[colorIdx]
|
||||
rotation: root.rand(0, 360)
|
||||
shape: root.shapePool[Math.floor(Math.random() * root.shapePool.length)]
|
||||
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.SlowEffects
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
x = root.rand(0, root.width - implicitSize);
|
||||
y = root.rand(0, root.height - implicitSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import M3Shapes
|
||||
import qs.Helpers
|
||||
import qs.Effects
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property color fallbackColor: Colors.layer(Colors.palette.m3surfaceContainerHighest, 2)
|
||||
property bool hadPrevious
|
||||
readonly property alias shape: shape
|
||||
|
||||
layer.enabled: true
|
||||
|
||||
Behavior on fallbackColor {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
layer.effect: MultiEffect {
|
||||
blurMax: 1
|
||||
shadowColor: Colors.palette.m3outline
|
||||
shadowEnabled: true
|
||||
shadowOpacity: 0.3
|
||||
}
|
||||
|
||||
Item {
|
||||
id: shapeWrapper
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
opacity: root.fallbackColor.a
|
||||
|
||||
MaterialShape {
|
||||
id: shape
|
||||
|
||||
color: Qt.alpha(root.fallbackColor, 1)
|
||||
implicitSize: root.width
|
||||
shape: MaterialShape.Cookie12Sided
|
||||
|
||||
Anim on rotation {
|
||||
duration: 23500
|
||||
easing.type: Easing.Linear
|
||||
from: 360
|
||||
loops: Animation.Infinite
|
||||
paused: !Players.active?.isPlaying
|
||||
running: true
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
animate: true
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
grade: 200
|
||||
opacity: image.status === Image.Null || image.status === Image.Error ? 1 : 0
|
||||
text: image.status === Image.Error ? "broken_image" : "art_track"
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: opacity > 0
|
||||
anchors.centerIn: parent
|
||||
asynchronous: true
|
||||
opacity: image.status === Image.Loading ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
sourceComponent: LoadingIndicator {
|
||||
color: Colors.palette.m3primaryContainer
|
||||
implicitSize: root.width * 0.3
|
||||
}
|
||||
}
|
||||
|
||||
FadeImage {
|
||||
id: image
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
source: Players.getArtUrl(Players.active)
|
||||
|
||||
layer.effect: Mask {
|
||||
maskSource: shapeWrapper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import M3Shapes
|
||||
import ZShell.Config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
CoverArt {
|
||||
id: cover
|
||||
|
||||
anchors.centerIn: parent
|
||||
implicitHeight: Config.dashboard.sizes.mediaCoverArtSize
|
||||
implicitWidth: Config.dashboard.sizes.mediaCoverArtSize
|
||||
shape.shape: MaterialShape.Cookie9Sided
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.top: parent.top
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Resource {
|
||||
fgColor: Colors.palette.m3primary
|
||||
|
||||
@@ -18,7 +18,7 @@ Row {
|
||||
color: Colors.layer(Colors.palette.m3surfaceContainerHigh, 2)
|
||||
implicitHeight: info.implicitHeight
|
||||
implicitWidth: info.implicitHeight
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -27,7 +27,7 @@ Item {
|
||||
id: info
|
||||
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: Tokens.spacing.large
|
||||
anchors.leftMargin: Tokens.spacing.largeIncreased
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 8
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "transparent"
|
||||
implicitHeight: parent.height + 8 * 2
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
CustomRect {
|
||||
id: stateLayer
|
||||
|
||||
@@ -32,7 +32,7 @@ Item {
|
||||
y: root.menuY
|
||||
|
||||
color: Colors.tPalette.m3surface
|
||||
radius: Tokens.rounding.normal
|
||||
radius: Tokens.rounding.medium
|
||||
|
||||
implicitWidth: menuLayout.implicitWidth + padding * 2
|
||||
implicitHeight: menuLayout.implicitHeight + padding * 2
|
||||
@@ -48,13 +48,13 @@ Item {
|
||||
CustomRect {
|
||||
Layout.preferredWidth: 200
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: openTerminalRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: openTerminalRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
id: openTerminalRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon { text: "terminal"; font.pointSize: 20 }
|
||||
CustomText { text: "Open terminal"; Layout.fillWidth: true }
|
||||
@@ -81,13 +81,13 @@ Item {
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: settingsRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: settingsRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
id: settingsRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon { text: "settings"; font.pointSize: 20 }
|
||||
CustomText { text: "ZShell settings"; Layout.fillWidth: true }
|
||||
@@ -115,13 +115,13 @@ Item {
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: logoutRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: logoutRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
id: logoutRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon { text: "logout"; font.pointSize: 20 }
|
||||
CustomText { text: "Logout"; Layout.fillWidth: true }
|
||||
@@ -148,13 +148,13 @@ Item {
|
||||
// CustomRect {
|
||||
// Layout.fillWidth: true
|
||||
// radius: popupBackground.radius - popupBackground.padding
|
||||
// implicitHeight: desktopIconsRow.implicitHeight + Tokens.padding.small * 2
|
||||
// implicitHeight: desktopIconsRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
//
|
||||
// RowLayout {
|
||||
// id: desktopIconsRow
|
||||
// spacing: 8
|
||||
// anchors.fill: parent
|
||||
// anchors.leftMargin: Tokens.padding.smaller
|
||||
// anchors.leftMargin: Tokens.padding.small
|
||||
//
|
||||
// MaterialIcon { text: Config.options.background.showDesktopIcons ? "visibility_off" : "visibility"; font.pointSize: 20 }
|
||||
// CustomText { text: Config.options.background.showDesktopIcons ? "Hide icons" : "Show icons"; Layout.fillWidth: true }
|
||||
|
||||
@@ -43,13 +43,13 @@ Item {
|
||||
CustomClippingRect {
|
||||
id: popupBackground
|
||||
|
||||
readonly property real padding: Tokens.padding.small
|
||||
readonly property real padding: Tokens.padding.extraSmall
|
||||
|
||||
color: Colors.tPalette.m3surface
|
||||
implicitHeight: menuLayout.implicitHeight + padding * 2
|
||||
implicitWidth: menuLayout.implicitWidth + padding * 2
|
||||
opacity: contextMenu.visible ? 1 : 0
|
||||
radius: Tokens.rounding.normal
|
||||
radius: Tokens.rounding.medium
|
||||
x: contextMenu.menuX
|
||||
y: contextMenu.menuY
|
||||
|
||||
@@ -66,14 +66,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.preferredWidth: 160
|
||||
implicitHeight: openRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: openRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: openRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -109,14 +109,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: openWithRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: openWithRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: openWithRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -154,14 +154,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: copyPathRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: copyPathRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: copyPathRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -187,7 +187,7 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: renameRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: renameRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
visible: contextMenu.targetPaths.length === 1
|
||||
|
||||
@@ -195,7 +195,7 @@ Item {
|
||||
id: renameRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
@@ -229,14 +229,14 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: deleteRow.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: deleteRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
|
||||
RowLayout {
|
||||
id: deleteRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
spacing: 8
|
||||
|
||||
MaterialIcon {
|
||||
|
||||
@@ -205,7 +205,7 @@ Item {
|
||||
anchors.margins: 4
|
||||
color: "white"
|
||||
opacity: root.iconsRoot.selectedIcons.includes(root.filePath) ? 0.2 : 0.0
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
@@ -265,7 +265,7 @@ Item {
|
||||
anchors.margins: 4
|
||||
color: "white"
|
||||
opacity: parent.containsMouse ? 0.1 : 0.0
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
|
||||
@@ -22,10 +22,10 @@ Item {
|
||||
property string draggedAppId: ""
|
||||
property var draggedModelData: null
|
||||
property bool dropAnimating: false
|
||||
readonly property int padding: Tokens.padding.small
|
||||
readonly property int padding: Tokens.padding.extraSmall
|
||||
required property var panels
|
||||
property var pendingCommitIds: []
|
||||
readonly property int rounding: Tokens.rounding.large
|
||||
readonly property int rounding: Tokens.rounding.largeIncreased
|
||||
required property ShellScreen screen
|
||||
required property PersistentProperties visibilities
|
||||
property var visualIds: []
|
||||
@@ -247,7 +247,7 @@ Item {
|
||||
property bool enableAddAnimation: false
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.margins: Tokens.padding.extraSmall
|
||||
anchors.top: parent.top
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
height: Config.dock.height
|
||||
@@ -255,7 +255,7 @@ Item {
|
||||
interactive: !(root.dragActive || root.dropAnimating)
|
||||
model: visualModel
|
||||
orientation: ListView.Horizontal
|
||||
spacing: Tokens.padding.smaller
|
||||
spacing: Tokens.padding.small
|
||||
|
||||
add: Transition {
|
||||
ParallelAnimation {
|
||||
|
||||
@@ -23,7 +23,7 @@ CustomRect {
|
||||
|
||||
implicitHeight: Config.dock.height
|
||||
implicitWidth: isSeparator ? 1 : implicitHeight
|
||||
radius: Tokens.rounding.normal - Tokens.padding.small
|
||||
radius: Tokens.rounding.medium - Tokens.padding.extraSmall
|
||||
|
||||
Loader {
|
||||
active: !isSeparator
|
||||
|
||||
@@ -5,9 +5,9 @@ import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
CustomRect {
|
||||
Layout.bottomMargin: dockRow.padding + Tokens.rounding.normal
|
||||
Layout.bottomMargin: dockRow.padding + Tokens.rounding.medium
|
||||
Layout.fillHeight: true
|
||||
Layout.topMargin: dockRow.padding + Tokens.rounding.normal
|
||||
Layout.topMargin: dockRow.padding + Tokens.rounding.medium
|
||||
color: Colors.palette.m3outlineVariant
|
||||
implicitWidth: 1
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Item {
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ Item {
|
||||
drawing.drawingState.penColor = Qt.hsva(huePicker.currentHue, saturationSlider.value, brightnessSlider.value, drawing.drawingState.penColor.a);
|
||||
}
|
||||
|
||||
implicitHeight: column.height + Tokens.padding.larger * 2
|
||||
implicitWidth: huePicker.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: column.height + Tokens.padding.small * 2
|
||||
implicitWidth: huePicker.implicitWidth + Tokens.padding.small * 2
|
||||
|
||||
Component.onCompleted: syncFromPenColor()
|
||||
|
||||
@@ -97,7 +97,7 @@ Item {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Repeater {
|
||||
model: root.colors1
|
||||
@@ -113,7 +113,7 @@ Item {
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Repeater {
|
||||
model: root.colors2
|
||||
@@ -172,7 +172,7 @@ Item {
|
||||
}
|
||||
|
||||
IconButton {
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
checked: root.wrapper.pinned
|
||||
|
||||
@@ -49,13 +49,13 @@ Item {
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,13 +99,13 @@ CustomListView {
|
||||
implicitHeight: root.currentItem?.implicitHeight ?? 0
|
||||
implicitWidth: root.width
|
||||
opacity: 0.08
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.medium
|
||||
y: root.currentItem?.y ?? 0
|
||||
|
||||
Behavior on y {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
easing: Tokens.anim.expressiveDefaultEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ CustomListView {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardAccel
|
||||
easing: Tokens.anim.standardAccel
|
||||
from: 1
|
||||
property: "opacity"
|
||||
target: root
|
||||
@@ -179,7 +179,7 @@ CustomListView {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardAccel
|
||||
easing: Tokens.anim.standardAccel
|
||||
from: 1
|
||||
property: "scale"
|
||||
target: root
|
||||
@@ -205,7 +205,7 @@ CustomListView {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
from: 0
|
||||
property: "opacity"
|
||||
target: root
|
||||
@@ -214,7 +214,7 @@ CustomListView {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
from: 0.9
|
||||
property: "scale"
|
||||
target: root
|
||||
|
||||
@@ -21,7 +21,7 @@ CarouselView {
|
||||
focalWidth: Config.launcher.sizes.wallpaperWidth
|
||||
glideDuration: 250
|
||||
glideEasingType: Easing.OutCubic
|
||||
implicitHeight: tileHeight + Tokens.spacing.small / 2 + Tokens.padding.large + Tokens.padding.normal
|
||||
implicitHeight: tileHeight + Tokens.spacing.small / 2 + Tokens.padding.large + Tokens.padding.small
|
||||
itemSpacing: Tokens.spacing.small
|
||||
maxWidth: {
|
||||
if (!screen)
|
||||
|
||||
@@ -12,9 +12,9 @@ Item {
|
||||
id: root
|
||||
|
||||
required property real maxHeight
|
||||
readonly property int padding: Tokens.padding.small
|
||||
readonly property int padding: Tokens.padding.largeIncreased / 4
|
||||
required property var panels
|
||||
readonly property int rounding: Tokens.rounding.large
|
||||
readonly property int rounding: Tokens.rounding.largeIncreased
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
implicitHeight: search.height + listWrapper.height + padding * 2
|
||||
@@ -49,9 +49,9 @@ Item {
|
||||
anchors.left: parent.left
|
||||
anchors.margins: root.padding
|
||||
anchors.right: parent.right
|
||||
bottomPadding: Tokens.padding.larger
|
||||
bottomPadding: Tokens.padding.medium
|
||||
placeholderText: qsTr("Type \"%1\" for commands").arg(Config.launcher.actionPrefix)
|
||||
topPadding: Tokens.padding.larger
|
||||
topPadding: Tokens.padding.medium
|
||||
|
||||
Component.onCompleted: forceActiveFocus()
|
||||
Keys.onDownPressed: list.currentList?.decrementCurrentIndex()
|
||||
|
||||
@@ -32,7 +32,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
easing: Tokens.anim.expressiveDefaultEffects
|
||||
}
|
||||
}
|
||||
Behavior on implicitWidth {
|
||||
@@ -40,7 +40,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
easing: Tokens.anim.expressiveDefaultEffects
|
||||
}
|
||||
}
|
||||
Behavior on state {
|
||||
@@ -127,7 +127,7 @@ Item {
|
||||
opacity: root.currentList?.count === 0 ? 1 : 0
|
||||
padding: Tokens.padding.large
|
||||
scale: root.currentList?.count === 0 ? 1 : 0.5
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
|
||||
@@ -16,7 +16,7 @@ Item {
|
||||
implicitHeight: Config.launcher.sizes.itemHeight
|
||||
|
||||
StateLayer {
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
onClicked: {
|
||||
root.modelData?.onClicked(root.list);
|
||||
@@ -25,9 +25,9 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
@@ -39,7 +39,7 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: Tokens.spacing.normal
|
||||
anchors.leftMargin: Tokens.spacing.medium
|
||||
anchors.verticalCenter: icon.verticalCenter
|
||||
implicitHeight: name.implicitHeight + desc.implicitHeight
|
||||
implicitWidth: parent.width - icon.width
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: root.modelData?.desc ?? ""
|
||||
width: root.width - icon.width - Tokens.rounding.normal * 2
|
||||
width: root.width - icon.width - Tokens.rounding.medium * 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ Item {
|
||||
implicitHeight: Config.launcher.sizes.itemHeight
|
||||
|
||||
StateLayer {
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
onClicked: {
|
||||
Apps.launch(root.modelData);
|
||||
@@ -29,9 +29,9 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.leftMargin: Tokens.padding.medium
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.medium
|
||||
|
||||
IconImage {
|
||||
id: icon
|
||||
@@ -43,7 +43,7 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: Tokens.spacing.normal
|
||||
anchors.leftMargin: Tokens.spacing.medium
|
||||
anchors.verticalCenter: icon.verticalCenter
|
||||
implicitHeight: name.implicitHeight + comment.implicitHeight
|
||||
implicitWidth: parent.width - icon.width
|
||||
@@ -63,7 +63,7 @@ Item {
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Tokens.font.size.small
|
||||
text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? ""
|
||||
width: root.width - icon.width - Tokens.rounding.normal * 2
|
||||
width: root.width - icon.width - Tokens.rounding.medium - Tokens.padding.medium * 2
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Item {
|
||||
implicitHeight: Config.launcher.sizes.itemHeight
|
||||
|
||||
StateLayer {
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
onClicked: {
|
||||
root.onClicked();
|
||||
@@ -33,10 +33,10 @@ Item {
|
||||
|
||||
RowLayout {
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
@@ -64,13 +64,13 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
clip: true
|
||||
color: Colors.palette.m3tertiary
|
||||
implicitHeight: Math.max(label.implicitHeight, icon.implicitHeight) + Tokens.padding.small * 2
|
||||
implicitWidth: (stateLayer.containsMouse ? label.implicitWidth + label.anchors.rightMargin : 0) + icon.implicitWidth + Tokens.padding.normal * 2
|
||||
radius: Tokens.rounding.normal
|
||||
implicitHeight: Math.max(label.implicitHeight, icon.implicitHeight) + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: (stateLayer.containsMouse ? label.implicitWidth + label.anchors.rightMargin : 0) + icon.implicitWidth + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.medium
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
easing: Tokens.anim.expressiveDefaultEffects
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ Item {
|
||||
id: icon
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Colors.palette.m3onTertiary
|
||||
font.pointSize: Tokens.font.size.large
|
||||
|
||||
@@ -15,7 +15,7 @@ Item {
|
||||
implicitHeight: Config.launcher.sizes.itemHeight
|
||||
|
||||
StateLayer {
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
onClicked: {
|
||||
root.modelData?.onClicked(root.list);
|
||||
@@ -24,9 +24,9 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.larger
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
@@ -38,10 +38,10 @@ Item {
|
||||
|
||||
Column {
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: Tokens.spacing.larger
|
||||
anchors.leftMargin: Tokens.spacing.large
|
||||
anchors.verticalCenter: icon.verticalCenter
|
||||
spacing: 0
|
||||
width: parent.width - icon.width - anchors.leftMargin - (current.active ? current.width + Tokens.spacing.normal : 0)
|
||||
width: parent.width - icon.width - anchors.leftMargin - (current.active ? current.width + Tokens.spacing.medium : 0)
|
||||
|
||||
CustomText {
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
|
||||
@@ -11,7 +11,7 @@ Item {
|
||||
|
||||
property int contentHeight
|
||||
readonly property real maxHeight: {
|
||||
let max = screen.height - Tokens.spacing.large * 2;
|
||||
let max = screen.height - Tokens.spacing.largeIncreased * 2;
|
||||
if (visibilities.resources && panels.resourcesWrapper.x + panels.resourcesWrapper.width > root.x)
|
||||
max -= panels.resources.nonAnimHeight;
|
||||
if (panels.popouts.hasCurrent)
|
||||
@@ -34,7 +34,7 @@ Item {
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: centerWidth
|
||||
spacing: Tokens.spacing.large * 2
|
||||
spacing: Tokens.spacing.largeIncreased * 2
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
@@ -65,7 +65,7 @@ ColumnLayout {
|
||||
|
||||
CustomClippingRect {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Tokens.spacing.large * 2
|
||||
Layout.topMargin: Tokens.spacing.largeIncreased * 2
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: root.centerWidth / 2
|
||||
implicitWidth: root.centerWidth / 2
|
||||
@@ -90,7 +90,7 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
focus: true
|
||||
implicitHeight: input.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: input.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: root.centerWidth * 0.8
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
@@ -121,11 +121,11 @@ ColumnLayout {
|
||||
id: input
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.small
|
||||
spacing: Tokens.spacing.normal
|
||||
anchors.margins: Tokens.padding.extraSmall
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Item {
|
||||
implicitHeight: fprintIcon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: fprintIcon.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: implicitHeight
|
||||
|
||||
MaterialIcon {
|
||||
@@ -163,7 +163,7 @@ ColumnLayout {
|
||||
|
||||
CustomRect {
|
||||
color: root.lock.pam.buffer ? Colors.palette.m3primary : Colors.layer(Colors.palette.m3surfaceContainerHigh, 2)
|
||||
implicitHeight: enterIcon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: enterIcon.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: implicitHeight
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
@@ -189,7 +189,7 @@ ColumnLayout {
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -Tokens.spacing.large
|
||||
Layout.topMargin: -Tokens.spacing.largeIncreased
|
||||
implicitHeight: Math.max(message.implicitHeight, stateMessage.implicitHeight)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
|
||||
@@ -12,17 +12,17 @@ CustomClippingRect {
|
||||
|
||||
implicitHeight: layout.implicitHeight
|
||||
implicitWidth: layout.implicitWidth
|
||||
radius: Tokens.rounding.large
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
RowLayout {
|
||||
id: layout
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: Tokens.spacing.large * 2
|
||||
spacing: Tokens.spacing.largeIncreased * 2
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
WeatherInfo {
|
||||
id: weather
|
||||
@@ -52,15 +52,15 @@ CustomClippingRect {
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
bottomRightRadius: Tokens.rounding.large
|
||||
bottomRightRadius: Tokens.rounding.largeIncreased
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: Tokens.rounding.small
|
||||
topRightRadius: Tokens.rounding.large
|
||||
topRightRadius: Tokens.rounding.largeIncreased
|
||||
|
||||
NotifDock {
|
||||
lock: root.lock
|
||||
|
||||
@@ -94,7 +94,7 @@ Item {
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ WlSessionLockSurface {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
properties: "implicitWidth,implicitHeight"
|
||||
target: lockContent
|
||||
to: lockContent.size
|
||||
@@ -45,7 +45,7 @@ WlSessionLockSurface {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "scale"
|
||||
target: content
|
||||
to: 0
|
||||
@@ -94,7 +94,7 @@ WlSessionLockSurface {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
property: "scale"
|
||||
target: lockContent
|
||||
to: 1
|
||||
@@ -116,7 +116,7 @@ WlSessionLockSurface {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "scale"
|
||||
target: content
|
||||
to: 1
|
||||
@@ -125,12 +125,12 @@ WlSessionLockSurface {
|
||||
Anim {
|
||||
property: "radius"
|
||||
target: lockBg
|
||||
to: Tokens.rounding.large * 1.5
|
||||
to: Tokens.rounding.largeIncreased * 1.5
|
||||
}
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "implicitWidth"
|
||||
target: lockContent
|
||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult * Config.lock.sizes.ratio
|
||||
@@ -138,7 +138,7 @@ WlSessionLockSurface {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "implicitHeight"
|
||||
target: lockContent
|
||||
to: (root.screen?.height ?? 0) * Config.lock.sizes.heightMult
|
||||
|
||||
@@ -57,7 +57,7 @@ CustomClippingRect {
|
||||
animate: true
|
||||
color: Colors.palette.m3primary
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: (Players.active?.trackTitle ?? qsTr("Nothing playing")) || qsTr("Unknown track")
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ ColumnLayout {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.smaller
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
@@ -48,7 +48,7 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
sourceComponent: ColumnLayout {
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
Image {
|
||||
asynchronous: true
|
||||
@@ -88,7 +88,7 @@ ColumnLayout {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
from: 0
|
||||
property: "scale"
|
||||
to: 1
|
||||
@@ -104,7 +104,7 @@ ColumnLayout {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "y"
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ ColumnLayout {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
property: "y"
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -26,13 +26,13 @@ CustomRect {
|
||||
anchors.right: parent?.right
|
||||
clip: true
|
||||
color: root.urgency === "critical" ? Colors.palette.m3secondaryContainer : Colors.layer(Colors.palette.m3surfaceContainerHigh, 2)
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.normal * 2
|
||||
radius: Tokens.rounding.normal
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.medium
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ CustomRect {
|
||||
id: content
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Item {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
@@ -119,15 +119,15 @@ CustomRect {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.bottomMargin: -Tokens.padding.small / 2 - (root.expanded ? 0 : spacing)
|
||||
Layout.bottomMargin: -Tokens.padding.extraSmall / 2 - (root.expanded ? 0 : spacing)
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -Tokens.padding.small
|
||||
Layout.topMargin: -Tokens.padding.extraSmall
|
||||
spacing: Math.round(Tokens.spacing.small / 2)
|
||||
|
||||
RowLayout {
|
||||
Layout.bottomMargin: -parent.spacing
|
||||
Layout.fillWidth: true
|
||||
spacing: Tokens.spacing.smaller
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
@@ -147,8 +147,8 @@ CustomRect {
|
||||
CustomRect {
|
||||
Layout.preferredWidth: root.notifs.length > Config.notifs.groupPreviewNum ? implicitWidth : 0
|
||||
color: root.urgency === "critical" ? Colors.palette.m3error : Colors.layer(Colors.palette.m3surfaceContainerHighest, 2)
|
||||
implicitHeight: groupCount.implicitHeight + Tokens.padding.small
|
||||
implicitWidth: expandBtn.implicitWidth + Tokens.padding.smaller * 2
|
||||
implicitHeight: groupCount.implicitHeight + Tokens.padding.extraSmall
|
||||
implicitWidth: expandBtn.implicitWidth + Tokens.padding.small * 2
|
||||
opacity: root.notifs.length > Config.notifs.groupPreviewNum ? 1 : 0
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
@@ -178,7 +178,7 @@ CustomRect {
|
||||
CustomText {
|
||||
id: groupCount
|
||||
|
||||
Layout.leftMargin: Tokens.padding.small / 2
|
||||
Layout.leftMargin: Tokens.padding.extraSmall / 2
|
||||
animate: true
|
||||
color: root.urgency === "critical" ? Colors.palette.m3onError : Colors.palette.m3onSurface
|
||||
font.pointSize: Tokens.font.size.small
|
||||
@@ -186,7 +186,7 @@ CustomRect {
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
Layout.rightMargin: -Tokens.padding.small / 2
|
||||
Layout.rightMargin: -Tokens.padding.extraSmall / 2
|
||||
animate: true
|
||||
color: root.urgency === "critical" ? Colors.palette.m3onError : Colors.palette.m3onSurface
|
||||
text: root.expanded ? "expand_less" : "expand_more"
|
||||
|
||||
@@ -38,7 +38,7 @@ CustomRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
Resource {
|
||||
id: cpu
|
||||
|
||||
@@ -53,7 +53,7 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: {
|
||||
const today = Weather.forecast[0];
|
||||
return qsTr("High %1 • Low %2").arg(Weather.formatTemp(today?.maxTempC)).arg(Weather.formatTemp(today?.minTempC));
|
||||
|
||||
@@ -24,14 +24,14 @@ CustomRect {
|
||||
|
||||
MaterialIcon {
|
||||
Layout.topMargin: Math.round(fontInfo.pointSize * 0.12)
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: "schedule"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
id: title
|
||||
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: qsTr("Hourly forecast")
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ CustomRect {
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
model: Weather.hourlyForecast
|
||||
orientation: VerticalFadeListView.Horizontal
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
delegate: ColumnLayout {
|
||||
id: hour
|
||||
@@ -61,7 +61,7 @@ CustomRect {
|
||||
MaterialShape {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: Qt.alpha(Colors.palette.m3primary, hour.index === 0 ? 1 : 0)
|
||||
implicitSize: temp.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitSize: temp.implicitHeight + Tokens.padding.small * 2
|
||||
shape: MaterialShape.Cookie4Sided
|
||||
|
||||
Behavior on color {
|
||||
@@ -74,7 +74,7 @@ CustomRect {
|
||||
|
||||
anchors.centerIn: parent
|
||||
color: hour.index === 0 ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: Weather.formatTemp(hour.cond.tempC).slice(0, -1) // Remove C/F
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ CustomRect {
|
||||
implicitHeight: {
|
||||
const base = brief.implicitHeight + brief.anchors.topMargin;
|
||||
if (showForecast)
|
||||
return base + Tokens.spacing.large + forecast.implicitHeight + forecast.anchors.margins;
|
||||
return base + Tokens.spacing.largeIncreased + forecast.implicitHeight + forecast.anchors.margins;
|
||||
return base + brief.anchors.topMargin;
|
||||
}
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
@@ -11,7 +11,7 @@ import qs.Helpers
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int padding: Tokens.padding.smaller
|
||||
readonly property int padding: Tokens.padding.small
|
||||
required property Item panels
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
@@ -55,7 +55,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
anchors.margins: root.padding
|
||||
color: "transparent"
|
||||
radius: Tokens.rounding.normal - root.padding
|
||||
radius: Tokens.rounding.medium - root.padding
|
||||
|
||||
CustomListView {
|
||||
id: list
|
||||
@@ -93,7 +93,7 @@ Item {
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
component NotifWrapper: Item {
|
||||
id: wrapper
|
||||
|
||||
@@ -27,7 +27,7 @@ CustomRect {
|
||||
|
||||
Behavior on x {
|
||||
Anim {
|
||||
easing.bezierCurve: Tokens.anim.curves.emphasizedDecel
|
||||
easing: Tokens.anim.emphasizedDecel
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ CustomRect {
|
||||
id: inner
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
implicitHeight: root.nonAnimHeight
|
||||
@@ -204,7 +204,7 @@ CustomRect {
|
||||
|
||||
Behavior on sweepAngle {
|
||||
Anim {
|
||||
easing.bezierCurve: Tokens.anim.curves.emphasizedDecel
|
||||
easing: Tokens.anim.emphasizedDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -471,7 +471,7 @@ CustomRect {
|
||||
isRound: true
|
||||
label.anchors.centerIn: undefined
|
||||
label.anchors.left: left
|
||||
label.anchors.margins: Tokens.padding.normal
|
||||
label.anchors.margins: Tokens.padding.small
|
||||
label.anchors.right: right
|
||||
label.anchors.verticalCenter: verticalCenter
|
||||
label.elide: Text.ElideRight
|
||||
|
||||
@@ -20,7 +20,7 @@ Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
color: Colors.tPalette.m3surfaceContainerLow
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
NotifDock {
|
||||
props: root.props
|
||||
@@ -30,7 +30,7 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Tokens.padding.normal - layout.spacing
|
||||
Layout.topMargin: Tokens.padding.small - layout.spacing
|
||||
color: Colors.tPalette.m3outlineVariant
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Daemons
|
||||
import qs.Modules
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
import qs.Daemons
|
||||
|
||||
CustomRect {
|
||||
id: root
|
||||
|
||||
readonly property CustomText body: expandedContent.item?.body ?? null
|
||||
readonly property CustomText body: (expandedContent.item as ExpandedBody)?.body ?? null
|
||||
required property bool expanded
|
||||
required property NotifServer.Notif modelData
|
||||
readonly property real nonAnimHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + 10 * 2 : summaryHeightMetrics.height
|
||||
readonly property real nonAnimHeight: expanded ? summary.implicitHeight + expandedContent.implicitHeight + expandedContent.anchors.topMargin + Tokens.padding.medium * 2 : summaryHeightMetrics.height
|
||||
required property Props props
|
||||
required property var visibilities
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
color: {
|
||||
const c = root.modelData?.urgency === "critical" ? Colors.palette.m3secondaryContainer : Colors.layer(Colors.palette.m3surfaceContainerHigh, 2);
|
||||
return expanded ? c : Qt.alpha(c, 0);
|
||||
}
|
||||
implicitHeight: nonAnimHeight
|
||||
radius: 6
|
||||
radius: Tokens.rounding.large - Tokens.padding.small
|
||||
state: expanded ? "expanded" : ""
|
||||
|
||||
Behavior on implicitHeight {
|
||||
@@ -35,13 +34,13 @@ CustomRect {
|
||||
name: "expanded"
|
||||
|
||||
PropertyChanges {
|
||||
compactBody.anchors.margins: 10
|
||||
dummySummary.anchors.margins: 10
|
||||
expandedContent.anchors.margins: 10
|
||||
summary.anchors.margins: 10
|
||||
compactBody.anchors.margins: Tokens.padding.medium
|
||||
dummySummary.anchors.margins: Tokens.padding.medium
|
||||
expandedContent.anchors.margins: Tokens.padding.medium
|
||||
summary.anchors.margins: Tokens.padding.medium
|
||||
summary.maximumLineCount: Number.MAX_SAFE_INTEGER
|
||||
summary.width: root.width - 10 * 2 - timeStr.implicitWidth - 7
|
||||
timeStr.anchors.margins: 10
|
||||
summary.width: root.width - Tokens.padding.medium * 2 - timeStr.implicitWidth - Tokens.spacing.small
|
||||
timeStr.anchors.margins: Tokens.padding.medium
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
@@ -83,7 +82,7 @@ CustomRect {
|
||||
id: compactBody
|
||||
|
||||
anchors.left: dummySummary.right
|
||||
anchors.leftMargin: 7
|
||||
anchors.leftMargin: Tokens.spacing.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
shouldBeActive: !root.expanded
|
||||
@@ -92,7 +91,6 @@ CustomRect {
|
||||
color: root.modelData?.urgency === "critical" ? Colors.palette.m3secondary : Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
text: String(root.modelData?.body ?? "").replace(/\n/g, " ")
|
||||
textFormat: Text.StyledText
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +104,6 @@ CustomRect {
|
||||
sourceComponent: CustomText {
|
||||
animate: true
|
||||
color: Colors.palette.m3outline
|
||||
font.pointSize: 11
|
||||
text: root.modelData?.timeStr ?? ""
|
||||
}
|
||||
}
|
||||
@@ -117,38 +114,37 @@ CustomRect {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: summary.bottom
|
||||
anchors.topMargin: 7 / 2
|
||||
anchors.topMargin: Tokens.spacing.extraSmall
|
||||
shouldBeActive: root.expanded
|
||||
|
||||
sourceComponent: ColumnLayout {
|
||||
readonly property alias body: body
|
||||
|
||||
spacing: 10
|
||||
|
||||
CustomText {
|
||||
id: body
|
||||
|
||||
Layout.fillWidth: true
|
||||
color: root.modelData?.urgency === "critical" ? Colors.palette.m3secondary : Colors.palette.m3onSurface
|
||||
text: String(root.modelData?.body ?? "").replace(/(.)\n(?!\n)/g, "$1\n\n") || qsTr("No body given")
|
||||
textFormat: Text.MarkdownText
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
onLinkActivated: link => {
|
||||
if (Config.launcher.uwsm)
|
||||
Quickshell.execDetached(["app2unit", "-O", "--", link]);
|
||||
else
|
||||
Quickshell.execDetached(["xdg-open", link]);
|
||||
root.visibilities.sidebar = false;
|
||||
}
|
||||
}
|
||||
|
||||
NotifActionList {
|
||||
notif: root.modelData
|
||||
}
|
||||
sourceComponent: ExpandedBody {
|
||||
}
|
||||
}
|
||||
|
||||
component ExpandedBody: ColumnLayout {
|
||||
readonly property alias body: bodyText
|
||||
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomText {
|
||||
id: bodyText
|
||||
|
||||
Layout.fillWidth: true
|
||||
color: root.modelData?.urgency === "critical" ? Colors.palette.m3secondary : Colors.palette.m3onSurface
|
||||
text: String(root.modelData?.body ?? "").replace(/(.)\n(?!\n)/g, "$1\n\n") || qsTr("No body given")
|
||||
textFormat: Text.MarkdownText
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
onLinkActivated: link => {
|
||||
Qt.openUrlExternally(link);
|
||||
root.visibilities.sidebar = false;
|
||||
}
|
||||
}
|
||||
|
||||
NotifActionList {
|
||||
notif: root.modelData
|
||||
}
|
||||
}
|
||||
component WrappedLoader: Loader {
|
||||
id: comp
|
||||
|
||||
@@ -157,6 +153,7 @@ CustomRect {
|
||||
active: false
|
||||
opacity: 0
|
||||
|
||||
// Makes the loader load on the same frame shouldBeActive becomes true, which ensures size is set
|
||||
states: State {
|
||||
name: "active"
|
||||
when: comp.shouldBeActive
|
||||
@@ -178,6 +175,7 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
property: "opacity"
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -188,6 +186,7 @@ CustomRect {
|
||||
SequentialAnimation {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
|
||||
PropertyAction {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Daemons
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Effects
|
||||
import qs.Services
|
||||
import qs.Daemons
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -17,6 +17,76 @@ Item {
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: flickable.contentHeight
|
||||
layer.enabled: true
|
||||
layer.smooth: true
|
||||
|
||||
layer.effect: Mask {
|
||||
maskSource: gradientMask
|
||||
}
|
||||
|
||||
Item {
|
||||
id: gradientMask
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
|
||||
GradientStop {
|
||||
color: Qt.rgba(0, 0, 0, 0)
|
||||
position: 0
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
color: Qt.rgba(0, 0, 0, 1)
|
||||
position: 0.1
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
color: Qt.rgba(0, 0, 0, 1)
|
||||
position: 0.9
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
color: Qt.rgba(0, 0, 0, 0)
|
||||
position: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
implicitWidth: parent.width / 2
|
||||
opacity: flickable.contentX > 0 ? 0 : 1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
implicitWidth: parent.width / 2
|
||||
opacity: flickable.contentX < flickable.contentWidth - parent.width ? 0 : 1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomFlickable {
|
||||
id: flickable
|
||||
@@ -29,14 +99,14 @@ Item {
|
||||
id: actionList
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: 7
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
Repeater {
|
||||
model: [
|
||||
{
|
||||
isClose: true
|
||||
},
|
||||
...(root.notif?.actions ?? ""),
|
||||
...(root.notif?.actions ?? []),
|
||||
{
|
||||
isCopy: true
|
||||
}
|
||||
@@ -49,25 +119,27 @@ Item {
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: implicitWidth + (actionStateLayer.pressed ? 18 : 0)
|
||||
Layout.preferredWidth: implicitWidth + (actionStateLayer.pressed ? Tokens.padding.large : 0)
|
||||
color: Colors.layer(Colors.palette.m3surfaceContainerHighest, 4)
|
||||
implicitHeight: actionInner.implicitHeight + 5 * 2
|
||||
implicitWidth: actionInner.implicitWidth + 5 * 2
|
||||
radius: actionStateLayer.pressed ? 6 / 2 : 6
|
||||
implicitHeight: actionInner.implicitHeight + Tokens.padding.small
|
||||
implicitWidth: actionInner.implicitWidth + Tokens.padding.medium * 2
|
||||
radius: actionStateLayer.pressed ? Tokens.rounding.medium / 2 : Tokens.rounding.large
|
||||
|
||||
Behavior on Layout.preferredWidth {
|
||||
Anim {
|
||||
type: Anim.FastSpatial
|
||||
}
|
||||
}
|
||||
Behavior on radius {
|
||||
Anim {
|
||||
type: Anim.FastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: copyTimer
|
||||
|
||||
interval: 1000
|
||||
interval: 3000
|
||||
|
||||
onTriggered: actionInner.item.text = "content_copy"
|
||||
}
|
||||
@@ -111,6 +183,7 @@ Item {
|
||||
id: iconComp
|
||||
|
||||
IconImage {
|
||||
asynchronous: true
|
||||
source: Quickshell.iconPath(action.modelData.identifier)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ Item {
|
||||
required property var visibilities
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
|
||||
Component.onCompleted: NotifServer.list.forEach(n => n.popup = false)
|
||||
|
||||
@@ -156,7 +156,7 @@ Item {
|
||||
Loader {
|
||||
active: opacity > 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
opacity: root.notifCount > 0 ? 1 : 0
|
||||
scale: root.notifCount > 0 ? 1 : 0.5
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import ZShell.Components
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Daemons
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
LazyListView {
|
||||
id: root
|
||||
@@ -55,33 +55,24 @@ LazyListView {
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
Behavior on y {
|
||||
enabled: notif.LazyListView.ready
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: event => {
|
||||
if (event.button === Qt.LeftButton)
|
||||
notifInner.toggleExpand(!notifInner.expanded);
|
||||
}
|
||||
onPositionChanged: event => {
|
||||
if (pressed) {
|
||||
const diffY = event.y - startY;
|
||||
@@ -153,8 +144,6 @@ LazyListView {
|
||||
Anim {
|
||||
id: contentYAnim
|
||||
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
property: "contentY"
|
||||
target: root.container
|
||||
}
|
||||
|
||||
@@ -1,34 +1,40 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Daemons
|
||||
import qs.Helpers
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
import qs.Helpers
|
||||
import qs.Daemons
|
||||
|
||||
CustomRect {
|
||||
id: root
|
||||
|
||||
readonly property string appIcon: notifs.find(n => !n.closed && n.appIcon.length > 0)?.appIcon ?? ""
|
||||
readonly property list<var> activeNotifs: notifs.filter(n => !n.closed)
|
||||
readonly property string appIcon: activeNotifs.find(n => n.appIcon.length > 0)?.appIcon ?? ""
|
||||
required property Flickable container
|
||||
readonly property bool expanded: props.expandedNotifs.includes(modelData)
|
||||
readonly property string image: notifs.find(n => !n.closed && n.image.length > 0)?.image ?? ""
|
||||
readonly property string image: activeNotifs.find(n => n.image.length > 0)?.image ?? ""
|
||||
required property string modelData
|
||||
readonly property int nonAnimHeight: {
|
||||
const headerHeight = header.implicitHeight + (root.expanded ? Math.round(7 / 2) : 0);
|
||||
const columnHeight = headerHeight + notifList.layoutHeight + column.Layout.topMargin + column.Layout.bottomMargin;
|
||||
return Math.round(Math.max(Config.notifs.sizes.image, columnHeight) + 10 * 2);
|
||||
const headerHeight = header.implicitHeight + (root.expanded ? Math.round(Tokens.spacing.extraSmall) : 0);
|
||||
const columnHeight = headerHeight + notifList.layoutHeight;
|
||||
return Math.round(Math.max(Config.notifs.sizes.image, columnHeight) + Tokens.padding.small * 2);
|
||||
}
|
||||
readonly property int notifCount: notifs.reduce((acc, n) => n.closed ? acc : acc + 1, 0)
|
||||
readonly property int notifCount: activeNotifs.length
|
||||
readonly property list<var> notifs: NotifServer.list.filter(n => n.appName === modelData)
|
||||
required property Props props
|
||||
readonly property int urgency: notifs.some(n => !n.closed && n.urgency === NotificationUrgency.Critical) ? NotificationUrgency.Critical : notifs.some(n => n.urgency === NotificationUrgency.Normal) ? NotificationUrgency.Normal : NotificationUrgency.Low
|
||||
required property var visibilities
|
||||
readonly property int urgency: {
|
||||
if (activeNotifs.find(n => n.urgency === NotificationUrgency.Critical))
|
||||
return NotificationUrgency.Critical;
|
||||
if (activeNotifs.find(n => n.urgency === NotificationUrgency.Normal))
|
||||
return NotificationUrgency.Normal;
|
||||
return NotificationUrgency.Low;
|
||||
}
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
function toggleExpand(expand: bool): void {
|
||||
if (expand) {
|
||||
@@ -43,8 +49,13 @@ CustomRect {
|
||||
anchors.right: parent?.right
|
||||
clip: true
|
||||
color: Colors.layer(Colors.palette.m3surfaceContainer, 2)
|
||||
implicitHeight: content.implicitHeight + 10 * 2
|
||||
radius: Tokens.rounding.smallest
|
||||
implicitHeight: nonAnimHeight
|
||||
radius: Tokens.rounding.large
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (notifCount === 0 && expanded)
|
||||
@@ -55,10 +66,10 @@ CustomRect {
|
||||
id: content
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: 10
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
spacing: 10
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Item {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
@@ -74,6 +85,10 @@ CustomRect {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
height: Config.notifs.sizes.image
|
||||
source: Qt.resolvedUrl(root.image)
|
||||
sourceSize: {
|
||||
const size = Config.notifs.sizes.image * ((QsWindow.window as QsWindow)?.devicePixelRatio ?? 1);
|
||||
return Qt.size(size, size);
|
||||
}
|
||||
width: Config.notifs.sizes.image
|
||||
}
|
||||
}
|
||||
@@ -81,7 +96,8 @@ CustomRect {
|
||||
Component {
|
||||
id: appIconComp
|
||||
|
||||
CustomIcon {
|
||||
ColoredIcon {
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colors.palette.m3onSurface : Colors.palette.m3onSecondaryContainer
|
||||
implicitSize: Math.round(Config.notifs.sizes.image * 0.6)
|
||||
layer.enabled: root.appIcon.endsWith("symbolic")
|
||||
source: Quickshell.iconPath(root.appIcon)
|
||||
@@ -93,8 +109,7 @@ CustomRect {
|
||||
|
||||
MaterialIcon {
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colors.palette.m3onSurface : Colors.palette.m3onSecondaryContainer
|
||||
font.pointSize: 18
|
||||
text: Icons.getNotifIcon(root.notifs[0]?.summary, root.urgency)
|
||||
text: Icons.getNotifIcon(root.activeNotifs[0]?.summary, root.urgency)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +120,8 @@ CustomRect {
|
||||
|
||||
Loader {
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: sourceComponent === materialIconComp ? 1 : 0
|
||||
asynchronous: true
|
||||
sourceComponent: root.image ? imageComp : root.appIcon ? appIconComp : materialIconComp
|
||||
}
|
||||
}
|
||||
@@ -113,6 +130,7 @@ CustomRect {
|
||||
active: root.appIcon && root.image
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
asynchronous: true
|
||||
|
||||
sourceComponent: CustomRect {
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3error : root.urgency === NotificationUrgency.Low ? Colors.palette.m3surfaceContainerHigh : Colors.palette.m3secondaryContainer
|
||||
@@ -120,8 +138,9 @@ CustomRect {
|
||||
implicitWidth: Config.notifs.sizes.badge
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
CustomIcon {
|
||||
ColoredIcon {
|
||||
anchors.centerIn: parent
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colors.palette.m3onSurface : Colors.palette.m3onSecondaryContainer
|
||||
implicitSize: Math.round(Config.notifs.sizes.badge * 0.6)
|
||||
layer.enabled: root.appIcon.endsWith("symbolic")
|
||||
source: Quickshell.iconPath(root.appIcon)
|
||||
@@ -130,75 +149,68 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Column {
|
||||
id: column
|
||||
|
||||
Layout.bottomMargin: -10 / 2
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -10
|
||||
spacing: 0
|
||||
spacing: root.expanded ? Math.round(Tokens.spacing.extraSmall) : 0
|
||||
|
||||
Behavior on spacing {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: header
|
||||
|
||||
Layout.bottomMargin: root.expanded ? Math.round(7 / 2) : 0
|
||||
Layout.fillWidth: true
|
||||
spacing: 5
|
||||
|
||||
Behavior on Layout.bottomMargin {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: 11
|
||||
text: root.modelData
|
||||
}
|
||||
|
||||
CustomText {
|
||||
animate: true
|
||||
color: Colors.palette.m3outline
|
||||
font.pointSize: 11
|
||||
text: root.notifs.find(n => !n.closed)?.timeStr ?? ""
|
||||
text: root.activeNotifs[0]?.timeStr ?? ""
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3error : Colors.layer(Colors.palette.m3surfaceContainerHigh, 3)
|
||||
implicitHeight: groupCount.implicitHeight + Tokens.padding.small
|
||||
implicitWidth: expandBtn.implicitWidth + 7 * 2
|
||||
implicitHeight: groupCount.implicitHeight + Tokens.padding.extraSmall
|
||||
implicitWidth: expandBtn.implicitWidth + Tokens.padding.large
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StateLayer {
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
|
||||
|
||||
onClicked: {
|
||||
root.toggleExpand(!root.expanded);
|
||||
}
|
||||
onClicked: root.toggleExpand(!root.expanded)
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: expandBtn
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: 7 / 2
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
CustomText {
|
||||
id: groupCount
|
||||
|
||||
Layout.leftMargin: 10 / 2
|
||||
Layout.leftMargin: Tokens.padding.extraSmall / 2
|
||||
animate: true
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
|
||||
font.pointSize: 11
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurfaceVariant
|
||||
text: root.notifCount
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
Layout.rightMargin: -10 / 2
|
||||
// Layout.topMargin: root.expanded ? -Math.floor(7 / 2) : 0
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurface
|
||||
Layout.rightMargin: -Tokens.padding.extraSmall / 2
|
||||
Layout.topMargin: root.expanded ? -Math.floor(Tokens.padding.extraSmall) : 0
|
||||
color: root.urgency === NotificationUrgency.Critical ? Colors.palette.m3onError : Colors.palette.m3onSurfaceVariant
|
||||
rotation: root.expanded ? 180 : 0
|
||||
text: "expand_more"
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Components
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Daemons
|
||||
import qs.Components
|
||||
import qs.Services
|
||||
|
||||
LazyListView {
|
||||
id: root
|
||||
@@ -20,13 +19,14 @@ LazyListView {
|
||||
|
||||
signal requestToggleExpand(expand: bool)
|
||||
|
||||
Layout.fillWidth: true
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
asynchronous: true
|
||||
cacheBuffer: 400
|
||||
implicitHeight: contentHeight
|
||||
readyDelay: 1
|
||||
removeDuration: Tokens.anim.durations.normal
|
||||
spacing: Math.round(Tokens.spacing.small / 2)
|
||||
spacing: Math.round(Tokens.spacing.extraSmall)
|
||||
useCustomViewport: true
|
||||
viewport: {
|
||||
tWatcher.transform; // mapToItem is not reactive so use this to trigger updates
|
||||
@@ -56,6 +56,7 @@ LazyListView {
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
@@ -75,10 +76,6 @@ LazyListView {
|
||||
|
||||
Component.onCompleted: modelData?.lock(this)
|
||||
Component.onDestruction: modelData?.unlock(this)
|
||||
onDoubleClicked: event => {
|
||||
if (event.button === Qt.LeftButton)
|
||||
root.requestToggleExpand(!root.expanded);
|
||||
}
|
||||
onPositionChanged: event => {
|
||||
if (pressed && !root.expanded) {
|
||||
const diffY = event.y - startY;
|
||||
@@ -109,6 +106,7 @@ LazyListView {
|
||||
property: "opacity"
|
||||
target: notif
|
||||
to: 0
|
||||
type: Anim.DefaultEffects
|
||||
}
|
||||
|
||||
Anim {
|
||||
@@ -132,7 +130,7 @@ LazyListView {
|
||||
model: ScriptModel {
|
||||
values: {
|
||||
if (root.expanded)
|
||||
return root.notifs;
|
||||
return root.notifs as Array;
|
||||
|
||||
let count = 0;
|
||||
let i = 0;
|
||||
@@ -143,7 +141,7 @@ LazyListView {
|
||||
i++;
|
||||
}
|
||||
|
||||
return root.notifs.slice(0, i);
|
||||
return root.notifs.slice(0, i) as Array;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,23 +17,23 @@ CustomRect {
|
||||
Layout.fillWidth: true
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + layout.anchors.margins * 2
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
z: 1
|
||||
|
||||
CustomRect {
|
||||
color: Recorder.running ? Colors.palette.m3secondary : Colors.palette.m3secondaryContainer
|
||||
implicitHeight: {
|
||||
const h = icon.implicitHeight + Tokens.padding.smaller * 2;
|
||||
const h = icon.implicitHeight + Tokens.padding.small * 2;
|
||||
return h - (h % 2);
|
||||
}
|
||||
implicitWidth: implicitHeight
|
||||
@@ -71,7 +71,7 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
|
||||
CustomSplitButton {
|
||||
SplitButton {
|
||||
active: menuItems.find(m => root.props.recordingMode === m.icon + m.text) ?? menuItems[0]
|
||||
enabled: !Recorder.running
|
||||
menuOnTop: true
|
||||
@@ -134,7 +134,7 @@ CustomRect {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardAccel
|
||||
easing: Tokens.anim.standardAccel
|
||||
property: "scale"
|
||||
target: listOrControls
|
||||
to: 0.7
|
||||
@@ -142,7 +142,7 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardAccel
|
||||
easing: Tokens.anim.standardAccel
|
||||
property: "opacity"
|
||||
target: listOrControls
|
||||
to: 0
|
||||
@@ -167,7 +167,7 @@ CustomRect {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
property: "scale"
|
||||
target: listOrControls
|
||||
to: 1
|
||||
@@ -175,7 +175,7 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
property: "opacity"
|
||||
target: listOrControls
|
||||
to: 1
|
||||
@@ -199,12 +199,12 @@ CustomRect {
|
||||
id: recordingControls
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomRect {
|
||||
color: Recorder.paused ? Colors.palette.m3tertiary : Colors.palette.m3error
|
||||
implicitHeight: recText.implicitHeight + Tokens.padding.smaller * 2
|
||||
implicitWidth: recText.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: recText.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: recText.implicitWidth + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Behavior on implicitWidth {
|
||||
@@ -218,14 +218,14 @@ CustomRect {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.large
|
||||
easing.bezierCurve: Tokens.anim.curves.emphasizedAccel
|
||||
easing: Tokens.anim.emphasizedAccel
|
||||
from: 1
|
||||
to: 0
|
||||
}
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.extraLarge
|
||||
easing.bezierCurve: Tokens.anim.curves.emphasizedDecel
|
||||
easing: Tokens.anim.emphasizedDecel
|
||||
from: 0
|
||||
to: 1
|
||||
}
|
||||
@@ -237,7 +237,7 @@ CustomRect {
|
||||
anchors.centerIn: parent
|
||||
animate: true
|
||||
color: Recorder.paused ? Colors.palette.m3onTertiary : Colors.palette.m3onError
|
||||
font.family: Appearance.font.family.mono
|
||||
font.family: Config.appearance.font.family.mono
|
||||
text: Recorder.paused ? "PAUSED" : "REC"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ ColumnLayout {
|
||||
onClicked: root.props.recordingListExpanded = !root.props.recordingListExpanded
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.smaller
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
@@ -57,7 +57,7 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: -Tokens.spacing.small
|
||||
clip: true
|
||||
implicitHeight: (Tokens.font.size.larger + Tokens.padding.small) * (root.props.recordingListExpanded ? 10 : 3)
|
||||
implicitHeight: (Tokens.font.size.larger + Tokens.padding.extraSmall) * (root.props.recordingListExpanded ? 10 : 3)
|
||||
|
||||
CustomScrollBar.vertical: CustomScrollBar {
|
||||
flickable: list
|
||||
@@ -192,7 +192,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.smaller
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
@@ -18,7 +18,7 @@ CustomRect {
|
||||
Layout.fillWidth: true
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + 18 * 2
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
ButtonRow {
|
||||
id: layout
|
||||
|
||||
@@ -12,7 +12,7 @@ CustomRect {
|
||||
clip: true
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + (IdleInhibitor.enabled ? activeChip.implicitHeight + activeChip.anchors.topMargin : 0) + 18 * 2
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
|
||||
@@ -8,6 +8,7 @@ import QtQuick
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property real offsetScale: shouldBeActive ? 0 : 1
|
||||
required property Item popouts
|
||||
readonly property PersistentProperties props: PersistentProperties {
|
||||
property string recordingConfirmDelete
|
||||
@@ -20,30 +21,27 @@ Item {
|
||||
required property Item sidebar
|
||||
required property var visibilities
|
||||
|
||||
property real offsetScale: shouldBeActive ? 0 : 1
|
||||
|
||||
visible: offsetScale < 1
|
||||
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
||||
implicitHeight: content.implicitHeight + 8 * 2
|
||||
implicitWidth: sidebar.width * (1 - sidebar.offsetScale)
|
||||
opacity: 1 - offsetScale
|
||||
visible: offsetScale < 1
|
||||
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: content
|
||||
|
||||
active: root.shouldBeActive || root.visible
|
||||
anchors.left: parent.left
|
||||
anchors.margins: 8
|
||||
anchors.top: parent.top
|
||||
|
||||
active: root.shouldBeActive || root.visible
|
||||
|
||||
sourceComponent: Content {
|
||||
implicitWidth: root.implicitWidth - 8 * 2
|
||||
popouts: root.popouts
|
||||
|
||||
@@ -22,7 +22,7 @@ Item {
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ Item {
|
||||
anchors.top: parent.top
|
||||
|
||||
sourceComponent: Content {
|
||||
implicitWidth: Config.sidebar.sizes.width - Tokens.padding.smaller * 2
|
||||
implicitWidth: Config.sidebar.sizes.width - Tokens.padding.small * 2
|
||||
props: root.props
|
||||
visibilities: root.visibilities
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ Item {
|
||||
required property var visibilities
|
||||
required property real volume
|
||||
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.small * 2
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.smaller * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.smaller * 2
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
// Speaker volume
|
||||
CustomMouseArea {
|
||||
@@ -127,7 +127,7 @@ Item {
|
||||
|
||||
Behavior on Layout.preferredHeight {
|
||||
Anim {
|
||||
easing.bezierCurve: Tokens.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
|
||||
@@ -14,8 +14,11 @@ Item {
|
||||
property bool hovered
|
||||
readonly property Brightness.Monitor monitor: Brightness.getMonitorForScreen(root.screen)
|
||||
property bool muted
|
||||
property real offsetScale: shouldBeActive ? 0 : 1
|
||||
required property ShellScreen screen
|
||||
readonly property bool shouldBeActive: visibilities.osd && Config.osd.enabled && !(visibilities.utilities && Config.utilities.enabled)
|
||||
property real sidebarOffset: sidebarOrSessionVisible ? 12 : 0
|
||||
required property bool sidebarOrSessionVisible
|
||||
property bool sourceMuted
|
||||
property real sourceVolume
|
||||
required property var visibilities
|
||||
@@ -26,20 +29,16 @@ Item {
|
||||
timer.restart();
|
||||
}
|
||||
|
||||
property real offsetScale: shouldBeActive ? 0 : 1
|
||||
required property bool sidebarOrSessionVisible
|
||||
property real sidebarOffset: sidebarOrSessionVisible ? 12 : 0
|
||||
|
||||
visible: offsetScale < 1
|
||||
anchors.rightMargin: (-implicitWidth - 5 - sidebarOffset) * offsetScale
|
||||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
implicitWidth: content.implicitWidth
|
||||
opacity: 1 - offsetScale
|
||||
visible: offsetScale < 1
|
||||
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,11 +97,10 @@ Item {
|
||||
Loader {
|
||||
id: content
|
||||
|
||||
active: root.shouldBeActive || root.visible
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
active: root.shouldBeActive || root.visible
|
||||
|
||||
sourceComponent: Content {
|
||||
brightness: root.brightness
|
||||
monitor: root.monitor
|
||||
|
||||
@@ -158,7 +158,7 @@ Scope {
|
||||
background: CustomRect {
|
||||
color: (polkitAgent.flow?.failed && passInput.text === "") ? Colors.palette.m3error : Colors.tPalette.m3surfaceVariant
|
||||
implicitHeight: 40
|
||||
radius: Tokens.rounding.smallest
|
||||
radius: Tokens.rounding.small
|
||||
}
|
||||
|
||||
onAccepted: okButton.clicked()
|
||||
@@ -263,7 +263,7 @@ Scope {
|
||||
|
||||
ButtonRow {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
IconTextButton {
|
||||
id: okButton
|
||||
|
||||
@@ -12,7 +12,7 @@ CustomClippingRect {
|
||||
|
||||
color: Colors.palette.m3secondaryContainer
|
||||
implicitWidth: 120
|
||||
radius: Tokens.rounding.large
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
Behavior on animPerc {
|
||||
Anim {
|
||||
@@ -24,7 +24,7 @@ CustomClippingRect {
|
||||
|
||||
accentColor: Colors.palette.m3primary
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.small
|
||||
subTextColor: Colors.palette.m3onSurfaceVariant
|
||||
textColor: Colors.palette.m3onSurface
|
||||
}
|
||||
@@ -102,7 +102,7 @@ CustomClippingRect {
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.bottomMargin: -Tokens.padding.small
|
||||
Layout.bottomMargin: -Tokens.padding.extraSmall
|
||||
Layout.rightMargin: -Tokens.padding.extraSmall
|
||||
Layout.topMargin: -Tokens.padding.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
@@ -15,9 +15,9 @@ CustomClippingRect {
|
||||
required property real usage
|
||||
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Math.max(tempProg.implicitHeight + detailsRow.implicitHeight + Tokens.spacing.large, usageColumn.implicitHeight + usageLabel.implicitHeight) + Tokens.padding.large * 2
|
||||
implicitHeight: Math.max(tempProg.implicitHeight + detailsRow.implicitHeight + Tokens.spacing.largeIncreased, usageColumn.implicitHeight + usageLabel.implicitHeight) + Tokens.padding.large * 2
|
||||
implicitWidth: 450
|
||||
radius: Tokens.rounding.large - Tokens.padding.normal
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
CustomRect {
|
||||
anchors.bottom: parent.bottom
|
||||
@@ -39,7 +39,7 @@ CustomClippingRect {
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.top: parent.top
|
||||
fgColor: root.accent
|
||||
implicitSize: Math.max(icon.implicitWidth, icon.implicitHeight) + Tokens.padding.larger * 2
|
||||
implicitSize: Math.max(icon.implicitWidth, icon.implicitHeight) + Tokens.padding.small * 2
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
strokeWidth: Tokens.padding.extraSmall
|
||||
value: root.usage
|
||||
@@ -54,13 +54,14 @@ CustomClippingRect {
|
||||
|
||||
anchors.centerIn: parent
|
||||
color: root.accent
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: root.icon
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.left: tempProg.right
|
||||
anchors.margins: Tokens.spacing.large
|
||||
anchors.margins: Tokens.spacing.largeIncreased
|
||||
anchors.right: usageColumn.left
|
||||
anchors.verticalCenter: tempProg.verticalCenter
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
@@ -104,7 +105,7 @@ CustomClippingRect {
|
||||
|
||||
CustomProgressBar {
|
||||
fgColor: root.accent
|
||||
implicitHeight: Tokens.padding.small
|
||||
implicitHeight: Tokens.padding.extraSmall
|
||||
indeterminate: isNaN(root.usage) || isNaN(root.temperature)
|
||||
value: root.temperature / 100
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ CustomRect {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.large * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.extraLargeIncreased * 2
|
||||
radius: Tokens.rounding.medium
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
ServiceRef {
|
||||
service: Memory
|
||||
@@ -43,7 +43,7 @@ CustomRect {
|
||||
|
||||
CircularProgress {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
Layout.topMargin: Tokens.spacing.largeIncreased
|
||||
fgColor: root.accent
|
||||
implicitSize: usageColumn.implicitHeight + thickness + Tokens.padding.largeIncreased * 2
|
||||
startAngle: -225
|
||||
|
||||
@@ -12,7 +12,7 @@ CustomRect {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: 220
|
||||
implicitWidth: 300
|
||||
radius: Tokens.rounding.large - Tokens.padding.normal
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
Ref {
|
||||
service: NetworkUsage
|
||||
@@ -21,7 +21,7 @@ CustomRect {
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.bottomMargin: Tokens.padding.larger
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: 0
|
||||
@@ -43,7 +43,7 @@ CustomRect {
|
||||
Layout.bottomMargin: Tokens.spacing.small
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Tokens.spacing.larger
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
|
||||
SparklineItem {
|
||||
id: sparkline
|
||||
|
||||
@@ -15,7 +15,7 @@ CustomRect {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.large * 2
|
||||
implicitWidth: layout.implicitWidth + layout.anchors.margins * 2
|
||||
radius: Tokens.rounding.large - Tokens.padding.normal
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
ServiceRef {
|
||||
service: Storage
|
||||
@@ -25,7 +25,6 @@ CustomRect {
|
||||
id: layout
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 0
|
||||
@@ -34,7 +33,7 @@ CustomRect {
|
||||
id: row
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CircularProgress {
|
||||
fgColor: root.accent
|
||||
@@ -57,7 +56,7 @@ CustomRect {
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: root.accent
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: "hard_drive"
|
||||
}
|
||||
|
||||
@@ -96,7 +95,7 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
|
||||
CustomSplitButton {
|
||||
SplitButton {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
active: menuItems.find(m => m.modelData === Storage.primaryDisk) ?? menuItems[0] ?? null
|
||||
enabled: Storage.disks.length
|
||||
@@ -104,7 +103,7 @@ CustomRect {
|
||||
fallbackText: qsTr("No disks")
|
||||
menuItems: disks.instances
|
||||
minLeftWidth: row.implicitWidth * 0.6
|
||||
type: CustomSplitButton.Tonal
|
||||
type: SplitButton.Tonal
|
||||
|
||||
menu.onItemSelected: item => Storage.manualPrimaryDisk = (item as DiskItem).modelData
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ CustomRect {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.large * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.extraLargeIncreased
|
||||
radius: Tokens.rounding.medium
|
||||
radius: Tokens.rounding.largeIncreased
|
||||
|
||||
ServiceRef {
|
||||
service: Gpu
|
||||
@@ -45,7 +45,7 @@ CustomRect {
|
||||
id: circularIndicator
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
Layout.topMargin: Tokens.spacing.largeIncreased
|
||||
fgColor: root.accent
|
||||
implicitSize: usageColumn.implicitHeight + thickness + Tokens.padding.largeIncreased * 2
|
||||
startAngle: -225
|
||||
|
||||
@@ -11,26 +11,26 @@ Item {
|
||||
|
||||
required property Wrapper wrapper
|
||||
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: content.implicitWidth
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Tokens.spacing.larger
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
ColumnLayout {
|
||||
id: mainColumn
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
visible: cpuCard.active || gpuCard.active
|
||||
|
||||
WrappedLoader {
|
||||
@@ -73,7 +73,7 @@ Item {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
visible: storageCard.active || memoryCard.active || vramCard.active || networkCard1.active
|
||||
|
||||
WrappedLoader {
|
||||
|
||||
@@ -29,7 +29,7 @@ Item {
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ ItemList {
|
||||
implicitHeight: deviceLayout.implicitHeight + deviceLayout.anchors.margins * 2
|
||||
|
||||
StateLayer {
|
||||
bottomLeftRadius: device.index === root?.list.count - 1 ? Tokens.rounding.large : radius
|
||||
bottomRightRadius: device.index === root?.list.count - 1 ? Tokens.rounding.large : radius
|
||||
bottomLeftRadius: device.index === root?.list.count - 1 ? Tokens.rounding.largeIncreased : radius
|
||||
bottomRightRadius: device.index === root?.list.count - 1 ? Tokens.rounding.largeIncreased : radius
|
||||
radius: Tokens.rounding.extraSmall
|
||||
|
||||
onClicked: root.selected(device.modelData)
|
||||
@@ -46,11 +46,11 @@ ItemList {
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
CustomRect {
|
||||
color: device.active ? Colors.palette.m3primary : Colors.palette.m3secondaryContainer
|
||||
implicitHeight: devIcon.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitHeight: devIcon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitWidth: implicitHeight
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Item {
|
||||
|
||||
color: Colors.palette.m3surfaceContainerHighest
|
||||
cornerFill: false
|
||||
smoothing: Tokens.rounding.medium
|
||||
smoothing: Tokens.rounding.largeIncreased
|
||||
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
@@ -46,7 +46,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
anchors.margins: (!(btn.pressed || root.pressOverride) && (btn.containsMouse || root.hoverOverride) ? -Tokens.padding.extraSmall : 0) + (root.open ? -Tokens.padding.extraSmall : 0)
|
||||
group: blobGroup
|
||||
radius: root.open ? Tokens.rounding.large : Tokens.rounding.medium
|
||||
radius: root.open ? Tokens.rounding.largeIncreased : Tokens.rounding.largeIncreased
|
||||
|
||||
Behavior on anchors.margins {
|
||||
Anim {
|
||||
@@ -68,7 +68,7 @@ Item {
|
||||
group: blobGroup
|
||||
implicitHeight: parent.height
|
||||
implicitWidth: parent.width
|
||||
radius: Tokens.rounding.small + Tokens.padding.small
|
||||
radius: Tokens.rounding.small + Tokens.padding.extraSmall
|
||||
|
||||
states: State {
|
||||
name: "open"
|
||||
@@ -89,7 +89,7 @@ Item {
|
||||
|
||||
Anim {
|
||||
duration: Tokens.anim.durations.expressiveFastEffects
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveFastEffects
|
||||
easing: Tokens.anim.expressiveFastEffects
|
||||
properties: "topMargin,implicitHeight"
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ Item {
|
||||
|
||||
anchors.centerIn: parent
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: "view_apps"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ CustomRect {
|
||||
flash.restart();
|
||||
}
|
||||
|
||||
bottomLeftRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
bottomRightRadius: last ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
bottomLeftRadius: last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||
bottomRightRadius: last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
opacity: enabled && parent.enabled ? 1 : 0.5
|
||||
topLeftRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
topRightRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
topLeftRadius: first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||
topRightRadius: first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
|
||||
@@ -73,9 +73,9 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
backdrop.enabled: true
|
||||
dialogBg.bottomLeftRadius: Tokens.rounding.large
|
||||
dialogBg.bottomRightRadius: Tokens.rounding.large
|
||||
dialogBg.radius: Tokens.rounding.large
|
||||
dialogBg.bottomLeftRadius: Tokens.rounding.largeIncreased
|
||||
dialogBg.bottomRightRadius: Tokens.rounding.largeIncreased
|
||||
dialogBg.radius: Tokens.rounding.largeIncreased
|
||||
dialogContent.opacity: 1
|
||||
dialogWrapper.height: root.openHeight
|
||||
dialogWrapper.width: root.openWidth
|
||||
@@ -131,8 +131,8 @@ Item {
|
||||
id: dialogBg
|
||||
|
||||
anchors.fill: parent
|
||||
bottomLeftRadius: Tokens.rounding.large
|
||||
bottomRightRadius: Tokens.rounding.large
|
||||
bottomLeftRadius: Tokens.rounding.largeIncreased
|
||||
bottomRightRadius: Tokens.rounding.largeIncreased
|
||||
deformScale: 0
|
||||
group: blobGroup
|
||||
opacity: blobGroup.color.a * (root.enabled ? 1 : 0.5)
|
||||
@@ -181,7 +181,7 @@ Item {
|
||||
|
||||
Loader {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.medium
|
||||
active: root.separateContent
|
||||
|
||||
sourceComponent: CustomRect {
|
||||
@@ -199,7 +199,7 @@ Item {
|
||||
}
|
||||
|
||||
Loader {
|
||||
Layout.bottomMargin: Tokens.spacing.normal
|
||||
Layout.bottomMargin: Tokens.spacing.medium
|
||||
Layout.fillWidth: true
|
||||
active: root.separateContent
|
||||
|
||||
@@ -218,7 +218,7 @@ Item {
|
||||
isRound: true
|
||||
text: qsTr("Cancel")
|
||||
type: TextButton.Text
|
||||
verticalPadding: Tokens.padding.normal
|
||||
verticalPadding: Tokens.padding.small
|
||||
|
||||
onClicked: {
|
||||
root.cancelled();
|
||||
@@ -232,7 +232,7 @@ Item {
|
||||
isRound: true
|
||||
text: root.acceptLabel
|
||||
type: TextButton.Text
|
||||
verticalPadding: Tokens.padding.normal
|
||||
verticalPadding: Tokens.padding.small
|
||||
|
||||
onClicked: {
|
||||
root.accepted();
|
||||
|
||||
@@ -20,7 +20,7 @@ DialogRowButton {
|
||||
}
|
||||
|
||||
acceptAllowed: !!selectedItem
|
||||
horizontalContentMargin: -Tokens.padding.small
|
||||
horizontalContentMargin: -Tokens.padding.extraSmall
|
||||
separateContent: true
|
||||
|
||||
content: Component {
|
||||
@@ -40,8 +40,8 @@ DialogRowButton {
|
||||
anchors.margins: 1 // Gets cut off for some reason without this
|
||||
anchors.right: ListView.view.contentItem.right
|
||||
color: Qt.alpha(Colors.palette.m3tertiaryContainer, selected ? 1 : 0)
|
||||
implicitHeight: label.implicitHeight + Tokens.padding.normal * 2
|
||||
radius: stateLayer.pressed ? Tokens.rounding.extraSmall : selected ? Tokens.rounding.large : Tokens.rounding.normal
|
||||
implicitHeight: label.implicitHeight + Tokens.padding.small * 2
|
||||
radius: stateLayer.pressed ? Tokens.rounding.extraSmall : selected ? Tokens.rounding.largeIncreased : Tokens.rounding.medium
|
||||
|
||||
Behavior on radius {
|
||||
Anim {
|
||||
@@ -61,7 +61,7 @@ DialogRowButton {
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.right: item.selected ? checkIcon.left : parent.right
|
||||
anchors.rightMargin: item.selected ? Tokens.spacing.normal : anchors.margins
|
||||
anchors.rightMargin: item.selected ? Tokens.spacing.medium : anchors.margins
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: item.selected ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurface
|
||||
elide: Text.ElideRight
|
||||
@@ -76,7 +76,7 @@ DialogRowButton {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Colors.palette.m3onTertiaryContainer
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
opacity: item.selected ? 1 : 0
|
||||
text: "check"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ ConnectedRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.larger
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ ListView {
|
||||
property int pressIndex
|
||||
property point pressPos
|
||||
property real radiusLerpProg
|
||||
property real topRadius: root?.first && DelegateModel.itemsIndex === 0 ? Tokens.rounding.large : Tokens.rounding.extraSmall
|
||||
property real topRadius: root?.first && DelegateModel.itemsIndex === 0 ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||
|
||||
function lerpRadius(a: real, b: real): real {
|
||||
return a + (b - a) * radiusLerpProg;
|
||||
@@ -238,9 +238,9 @@ ListView {
|
||||
|
||||
anchors.fill: parent
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: item.lerpRadius(Tokens.rounding.extraSmall, Tokens.rounding.large)
|
||||
topLeftRadius: item.lerpRadius(item.topRadius, Tokens.rounding.large)
|
||||
topRightRadius: item.lerpRadius(item.topRadius, Tokens.rounding.large)
|
||||
radius: item.lerpRadius(Tokens.rounding.extraSmall, Tokens.rounding.largeIncreased)
|
||||
topLeftRadius: item.lerpRadius(item.topRadius, Tokens.rounding.largeIncreased)
|
||||
topRightRadius: item.lerpRadius(item.topRadius, Tokens.rounding.largeIncreased)
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@@ -272,15 +272,15 @@ ListView {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.large
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
id: dragIcon
|
||||
|
||||
color: Qt.alpha(Colors.palette.m3onSurfaceVariant, enabledSwitch.checked ? 1 : 0.5)
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: "drag_indicator"
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ ListView {
|
||||
id: enabledSwitch
|
||||
|
||||
checked: root.toggledFor(item.modelData)
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
|
||||
onToggled: root.itemToggled(item.DelegateModel.itemsIndex, checked)
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ ConnectedRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
@@ -64,7 +64,7 @@ ConnectedRect {
|
||||
|
||||
MaterialIcon {
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: "chevron_right"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ ConnectedRect {
|
||||
required property Component popup
|
||||
property alias subtext: subtext.text
|
||||
property alias text: text.text
|
||||
property int verticalPadding: Tokens.padding.normal
|
||||
property int verticalPadding: Tokens.padding.small
|
||||
|
||||
signal clicked(checked: bool)
|
||||
|
||||
@@ -26,7 +26,7 @@ ConnectedRect {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: root.horizontalPadding
|
||||
anchors.right: icon.left
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
CustomText {
|
||||
@@ -48,7 +48,7 @@ ConnectedRect {
|
||||
id: icon
|
||||
|
||||
anchors.right: switchButton.left
|
||||
anchors.rightMargin: Tokens.spacing.normal
|
||||
anchors.rightMargin: Tokens.spacing.medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "open_in_new"
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ ColumnLayout {
|
||||
return true;
|
||||
}
|
||||
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
Component.onCompleted: applySearchAnchor()
|
||||
|
||||
@@ -121,7 +121,7 @@ ColumnLayout {
|
||||
RowLayout {
|
||||
id: header
|
||||
|
||||
spacing: Tokens.spacing.large
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
Loader {
|
||||
active: root.isSubPage
|
||||
|
||||
@@ -32,9 +32,9 @@ ConnectedRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
@@ -105,7 +105,7 @@ ConnectedRect {
|
||||
color: open || hovered || stateLayer.containsMouse ? Colors.palette.m3secondaryContainer : Colors.palette.m3surfaceContainerHighest
|
||||
content: root.content
|
||||
hoverOverride: stateLayer.containsMouse
|
||||
padding: Tokens.padding.small
|
||||
padding: Tokens.padding.extraSmall
|
||||
pressOverride: stateLayer.pressed
|
||||
x: {
|
||||
tWatcher.transform;
|
||||
|
||||
@@ -21,7 +21,7 @@ ConnectedRect {
|
||||
signal clicked(event: MouseEvent)
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StateLayer {
|
||||
id: stateLayer
|
||||
@@ -37,7 +37,7 @@ ConnectedRect {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
opacity: root.enabled ? 1 : 0.5
|
||||
spacing: Tokens.spacing.normal
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
@@ -49,7 +49,7 @@ ConnectedRect {
|
||||
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
fill: 1
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
}
|
||||
|
||||
Column {
|
||||
@@ -86,7 +86,7 @@ ConnectedRect {
|
||||
|
||||
sourceComponent: MaterialIcon {
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
text: root.trailingIcon
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ CustomText {
|
||||
|
||||
Layout.bottomMargin: Tokens.spacing.extraSmall
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Tokens.padding.small
|
||||
Layout.topMargin: first ? 0 : Tokens.spacing.large - ((parent as ColumnLayout).spacing ?? 0)
|
||||
Layout.leftMargin: Tokens.padding.extraSmall
|
||||
Layout.topMargin: first ? 0 : Tokens.spacing.largeIncreased - ((parent as ColumnLayout).spacing ?? 0)
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Tokens.font.size.medium
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ ConnectedRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
@@ -53,10 +53,10 @@ ConnectedRect {
|
||||
}
|
||||
}
|
||||
|
||||
CustomSplitButton {
|
||||
SplitButton {
|
||||
id: splitButton
|
||||
|
||||
type: CustomSplitButton.Tonal
|
||||
type: SplitButton.Tonal
|
||||
|
||||
menu.onItemSelected: item => root.selected(item)
|
||||
stateLayer.onClicked: splitButton.expanded = !splitButton.expanded
|
||||
|
||||
@@ -61,7 +61,7 @@ ConnectedRect {
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: Tokens.padding.larger * 3
|
||||
implicitHeight: Tokens.padding.medium * 3
|
||||
|
||||
CustomSlider {
|
||||
id: slider
|
||||
|
||||
@@ -26,7 +26,7 @@ ConnectedRect {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.largeIncreased
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.margins: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user