config moved to c++ plugin, removed old qml + fileview implementation
This commit is contained in:
@@ -5,7 +5,8 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
CustomMouseArea {
|
||||
id: root
|
||||
@@ -120,18 +121,18 @@ CustomMouseArea {
|
||||
id: inner
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
RowLayout {
|
||||
id: monthNavigationRow
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.extraSmall
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
IconButton {
|
||||
icon: "chevron_left"
|
||||
padding: Appearance.padding.small
|
||||
padding: Tokens.padding.small
|
||||
type: IconButton.Text
|
||||
|
||||
onClicked: root.dashState.currentDate = new Date(root.realCurrYear, root.realCurrMonth - 1, 1)
|
||||
@@ -140,16 +141,16 @@ CustomMouseArea {
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: monthYearDisplay1.implicitHeight + Appearance.padding.extraSmall * 2
|
||||
implicitWidth: monthYearDisplay1.implicitWidth + Appearance.padding.large * 2
|
||||
implicitHeight: monthYearDisplay1.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
implicitWidth: monthYearDisplay1.implicitWidth + Tokens.padding.large * 2
|
||||
|
||||
StateLayer {
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: Colors.palette.m3primary
|
||||
enabled: {
|
||||
const now = new Date();
|
||||
return root.realCurrMonth !== now.getMonth() || root.realCurrYear !== now.getFullYear();
|
||||
}
|
||||
radius: pressed ? Appearance.rounding.small : Appearance.rounding.large
|
||||
radius: pressed ? Tokens.rounding.small : Tokens.rounding.large
|
||||
|
||||
Behavior on radius {
|
||||
Anim {
|
||||
@@ -171,7 +172,7 @@ CustomMouseArea {
|
||||
|
||||
anchors.centerIn: parent
|
||||
// qmllint enable missing-property
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: Colors.palette.m3primary
|
||||
|
||||
// qmllint disable missing-property
|
||||
text: grid1.item ? grid1.item.title : ""
|
||||
@@ -187,7 +188,7 @@ CustomMouseArea {
|
||||
|
||||
anchors.centerIn: parent
|
||||
// qmllint enable missing-property
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: Colors.palette.m3primary
|
||||
|
||||
// qmllint disable missing-property
|
||||
text: grid2.item ? grid2.item.title : ""
|
||||
@@ -202,7 +203,7 @@ CustomMouseArea {
|
||||
|
||||
IconButton {
|
||||
icon: "chevron_right"
|
||||
padding: Appearance.padding.small
|
||||
padding: Tokens.padding.small
|
||||
type: IconButton.Text
|
||||
|
||||
onClicked: root.dashState.currentDate = new Date(root.realCurrYear, root.realCurrMonth + 1, 1)
|
||||
@@ -218,7 +219,7 @@ CustomMouseArea {
|
||||
delegate: CustomText {
|
||||
required property var model
|
||||
|
||||
color: (model.day === 0) ? DynamicColors.palette.m3tertiary : DynamicColors.palette.m3onSurface
|
||||
color: (model.day === 0) ? Colors.palette.m3tertiary : Colors.palette.m3onSurface
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: Qt.locale("en_US").standaloneDayName(model.day, Locale.ShortFormat)
|
||||
}
|
||||
@@ -258,7 +259,7 @@ CustomMouseArea {
|
||||
|
||||
required property var model
|
||||
|
||||
implicitHeight: text.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitHeight: text.implicitHeight + Tokens.padding.normal * 2
|
||||
implicitWidth: implicitHeight
|
||||
|
||||
CustomText {
|
||||
@@ -268,9 +269,9 @@ CustomMouseArea {
|
||||
color: {
|
||||
const dayOfWeek = dayItem.model.date.getDay();
|
||||
if (dayOfWeek === 0)
|
||||
return DynamicColors.palette.m3tertiary;
|
||||
return Colors.palette.m3tertiary;
|
||||
|
||||
return DynamicColors.palette.m3onSurfaceVariant;
|
||||
return Colors.palette.m3onSurfaceVariant;
|
||||
}
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
opacity: dayItem.model.today || dayItem.model.month === internalGrid.month ? 1 : 0.4
|
||||
@@ -286,14 +287,14 @@ CustomMouseArea {
|
||||
readonly property Item todayItem: internalGrid.contentItem.children.find(c => c.model.today) ?? null
|
||||
|
||||
clip: true
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: Colors.palette.m3primary
|
||||
implicitHeight: width
|
||||
implicitWidth: today ? (Math.max(today.implicitWidth, today.implicitHeight) - Appearance.padding.extraSmall) : 0
|
||||
implicitWidth: today ? (Math.max(today.implicitWidth, today.implicitHeight) - Tokens.padding.extraSmall) : 0
|
||||
opacity: todayItem ? 1 : 0
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
scale: todayItem ? 1 : 0.7
|
||||
x: today ? today.x + (today.width - implicitWidth) / 2 : 0
|
||||
y: today ? today.y + Appearance.padding.extraSmall / 2 : 0
|
||||
y: today ? today.y + Tokens.padding.extraSmall / 2 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
@@ -320,11 +321,11 @@ CustomMouseArea {
|
||||
}
|
||||
|
||||
Coloriser {
|
||||
colorizationColor: DynamicColors.palette.m3onPrimary
|
||||
colorizationColor: Colors.palette.m3onPrimary
|
||||
implicitHeight: internalGrid.height
|
||||
implicitWidth: internalGrid.width
|
||||
source: internalGrid
|
||||
sourceColor: DynamicColors.palette.m3onSurface
|
||||
sourceColor: Colors.palette.m3onSurface
|
||||
x: -todayIndicator.x
|
||||
y: -todayIndicator.y
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user