Merge branch 'main' into feat/reposition-bar
C++ / fmt (pull_request) Successful in 4s
JS/TS / lint (pull_request) Successful in 16s
JS/TS / fmt (pull_request) Successful in 23s
Python / fmt (pull_request) Successful in 33s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
Python / typecheck (pull_request) Failing after 1m8s
Rust / fmt (pull_request) Successful in 34s
Rust / build (pull_request) Successful in 1m46s
C++ / build (pull_request) Successful in 2m33s
Rust / clippy (pull_request) Successful in 1m30s
Python / buildcheck (pull_request) Successful in 2m41s
C++ / clang-tidy (pull_request) Successful in 7m9s
C++ / fmt (pull_request) Successful in 4s
JS/TS / lint (pull_request) Successful in 16s
JS/TS / fmt (pull_request) Successful in 23s
Python / fmt (pull_request) Successful in 33s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
Python / typecheck (pull_request) Failing after 1m8s
Rust / fmt (pull_request) Successful in 34s
Rust / build (pull_request) Successful in 1m46s
C++ / build (pull_request) Successful in 2m33s
Rust / clippy (pull_request) Successful in 1m30s
Python / buildcheck (pull_request) Successful in 2m41s
C++ / clang-tidy (pull_request) Successful in 7m9s
This commit is contained in:
@@ -3,22 +3,23 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
import qs.Modules
|
||||
import qs.Helpers
|
||||
import qs.Services
|
||||
|
||||
CustomClippingRect {
|
||||
id: root
|
||||
|
||||
readonly property bool hasUpdates: Object.keys(Updates.updates)?.length > 0
|
||||
readonly property int itemHeight: 50 + Appearance.padding.smaller * 2
|
||||
readonly property int itemHeight: 50 + Tokens.padding.smaller * 2
|
||||
required property var wrapper
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: hasUpdates ? updatesListLoader.item?.implicitHeight + Appearance.padding.small * 2 : noUpdatesLoader.item.height
|
||||
implicitWidth: hasUpdates ? updatesListLoader.item?.contentWidth + Appearance.padding.small * 2 : noUpdatesLoader.item.width
|
||||
radius: Appearance.rounding.small
|
||||
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
|
||||
|
||||
Loader {
|
||||
id: noUpdatesLoader
|
||||
@@ -37,8 +38,8 @@ CustomClippingRect {
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
color: DynamicColors.tPalette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
color: Colors.tPalette.m3onSurfaceVariant
|
||||
font.pointSize: Tokens.font.size.extraLarge * 3
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "check"
|
||||
}
|
||||
@@ -46,7 +47,7 @@ CustomClippingRect {
|
||||
CustomText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: noUpdatesIcon.bottom
|
||||
color: DynamicColors.tPalette.m3onSurfaceVariant
|
||||
color: Colors.tPalette.m3onSurfaceVariant
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr("No updates available")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
@@ -69,7 +70,7 @@ CustomClippingRect {
|
||||
displayMarginEnd: root.itemHeight
|
||||
implicitHeight: Math.min(contentHeight, (root.itemHeight + spacing) * 5 - spacing)
|
||||
implicitWidth: contentWidth
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
delegate: CustomRect {
|
||||
id: update
|
||||
@@ -79,18 +80,18 @@ CustomClippingRect {
|
||||
|
||||
// anchors.left: parent.left
|
||||
// anchors.right: parent.right
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: root.itemHeight
|
||||
implicitWidth: 600
|
||||
radius: Appearance.rounding.small - Appearance.padding.small
|
||||
radius: Tokens.rounding.small - Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.rightMargin: Appearance.padding.smaller
|
||||
anchors.leftMargin: Tokens.padding.smaller
|
||||
anchors.rightMargin: Tokens.padding.smaller
|
||||
|
||||
MaterialIcon {
|
||||
font.pointSize: Appearance.font.size.large * 2
|
||||
font.pointSize: Tokens.font.size.large * 2
|
||||
text: "package_2"
|
||||
}
|
||||
|
||||
@@ -101,13 +102,13 @@ CustomClippingRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 25
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
text: update.sections[0]
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
color: Colors.palette.m3onSurfaceVariant
|
||||
text: Updates.formatUpdateTime(update.modelData.timestamp)
|
||||
}
|
||||
}
|
||||
@@ -122,8 +123,8 @@ CustomClippingRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 125
|
||||
animate: true
|
||||
color: DynamicColors.palette.m3tertiary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
color: Colors.palette.m3tertiary
|
||||
font.pointSize: Tokens.font.size.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
marqueeEnabled: true
|
||||
pauseMs: 4000
|
||||
@@ -133,8 +134,8 @@ CustomClippingRect {
|
||||
|
||||
MaterialIcon {
|
||||
Layout.fillHeight: true
|
||||
color: DynamicColors.palette.m3secondary
|
||||
font.pointSize: Appearance.font.size.extraLarge
|
||||
color: Colors.palette.m3secondary
|
||||
font.pointSize: Tokens.font.size.extraLarge
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "arrow_right_alt"
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
@@ -146,8 +147,8 @@ CustomClippingRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 120
|
||||
animate: true
|
||||
color: DynamicColors.palette.m3primary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
color: Colors.palette.m3primary
|
||||
font.pointSize: Tokens.font.size.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
marqueeEnabled: true
|
||||
pauseMs: 4000
|
||||
|
||||
@@ -3,37 +3,38 @@ import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Modules
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
CustomRect {
|
||||
id: root
|
||||
|
||||
property int countUpdates: Updates.availableUpdates
|
||||
required property bool horizontal
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
property color textColor: Colors.palette.m3onSurface
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: horizontal ? Config.bar.height : content.implicitHeight + Appearance.spacing.small * 2
|
||||
implicitWidth: horizontal ? content.implicitWidth + Appearance.spacing.small * 2 : Config.bar.height
|
||||
radius: Appearance.rounding.full
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
implicitHeight: horizontal ? Config.bar.height : content.implicitHeight + Tokens.spacing.small * 2
|
||||
implicitWidth: horizontal ? content.implicitWidth + Tokens.spacing.small * 2 : Config.bar.height
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
GridLayout {
|
||||
id: content
|
||||
|
||||
anchors.centerIn: parent
|
||||
columnSpacing: Appearance.spacing.small
|
||||
columnSpacing: Tokens.spacing.small
|
||||
columns: root.horizontal ? -1 : 1
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter
|
||||
font.pointSize: root.horizontal ? Appearance.font.size.larger : Appearance.font.size.large
|
||||
font.pointSize: root.horizontal ? Tokens.font.size.larger : Tokens.font.size.large
|
||||
text: "package_2"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: root.horizontal ? Qt.AlignVCenter : Qt.AlignHCenter
|
||||
color: root.textColor
|
||||
font.pointSize: root.horizontal ? Appearance.font.size.normal : Appearance.font.size.larger
|
||||
font.pointSize: root.horizontal ? Tokens.font.size.normal : Tokens.font.size.larger
|
||||
text: root.countUpdates
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user