Merge pull request #1392 from caelestia-dots/feat/cxx-settings
Convert config management to C++
This commit is contained in:
commit
0eaca375ab
277 changed files with 6343 additions and 4193 deletions
82
README.md
82
README.md
|
|
@ -205,22 +205,65 @@ git pull
|
|||
## Configuring
|
||||
|
||||
All configuration options should be put in `~/.config/caelestia/shell.json`. This file is _not_ created by
|
||||
default, you must create it manually.
|
||||
default, you must create it manually. Options that you omit from the config file will use their default
|
||||
values.
|
||||
|
||||
### Per-monitor configuration
|
||||
|
||||
You can configure options per-monitor in `~/.config/caelestia/monitors/<screen-name>/shell.json`. Options
|
||||
set in this file will **override** the respective options in the global config. Otherwise, the options will
|
||||
use their values from the global config.
|
||||
|
||||
For example, to disable the bar on DP-1:
|
||||
|
||||
**`~/.config/caelestia/monitors/DP-1/shell.json`**
|
||||
|
||||
```json
|
||||
{
|
||||
"bar": {
|
||||
"persistent": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Not all options are respect per-monitor overrides. Most notably, the following options will only read
|
||||
> from the global config, and ignore the respective option in per-monitor config files.
|
||||
>
|
||||
> <details><summary>Ignored options</summary>
|
||||
>
|
||||
> - `appearance` (`anim`, `transparency`)
|
||||
> - `general` (`logo`, `apps`, `idle`, `battery`)
|
||||
> - `bar.workspaces` (`perMonitorWorkspaces`, `specialWorkspaceIcons`, `windowIcons`)
|
||||
> - `bar.tray` (`iconSubs`, `hiddenIcons`)
|
||||
> - `dashboard` (`mediaUpdateInterval`, `resourceUpdateInterval`)
|
||||
> - `launcher` (`specialPrefix`, `actionPrefix`, `enableDangerousActions`, `vimKeybinds`,
|
||||
> `favouriteApps`, `hiddenApps`, `actions`)
|
||||
> - `launcher.useFuzzy` (`apps`, `actions`, `schemes`, `variants`, `wallpapers`)
|
||||
> - `notifs` (`expire`, `fullscreen`, `defaultExpireTimeout`, `actionOnClick`)
|
||||
> - `lock` (`enableFprint`, `maxFprintTries`)
|
||||
> - `utilities` (`toasts`, `vpn`)
|
||||
> - `services` (`weatherLocation`, `useFahrenheit`, `useFahrenheitPerformance`, `useTwelveHourClock`,
|
||||
> `gpuType`, `visualiserBars`, `audioIncrement`, `brightnessIncrement`, `maxVolume`, `smartScheme`,
|
||||
> `defaultPlayer`, `playerAliases`, `showLyrics`, `lyricsBackend`)
|
||||
> - `paths` (`wallpaperDir`, `lyricsDir`)
|
||||
>
|
||||
> </details>
|
||||
|
||||
### Example configuration
|
||||
|
||||
> [!NOTE]
|
||||
> The example configuration only includes recommended configuration options. For more advanced customisation
|
||||
> such as modifying the size of individual items or changing constants in the code, there are some other
|
||||
> options which can be found in the source files in the `config` directory.
|
||||
> The example configuration includes ALL configuration options in `shell.json`. You are
|
||||
> **not** recommended to copy and paste this entire configuration into `shell.json`.
|
||||
> This is meant to serve as a reference of all the available options, and you should
|
||||
> only add the ones you want to change to `shell.json`.
|
||||
|
||||
<details><summary>Example</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": true,
|
||||
"appearance": {
|
||||
"mediaGifSpeedAdjustment": 300,
|
||||
"sessionGifSpeed": 0.7,
|
||||
"anim": {
|
||||
"durations": {
|
||||
"scale": 1
|
||||
|
|
@ -254,6 +297,8 @@ default, you must create it manually.
|
|||
},
|
||||
"general": {
|
||||
"logo": "caelestia",
|
||||
"mediaGifSpeedAdjustment": 300,
|
||||
"sessionGifSpeed": 0.7,
|
||||
"apps": {
|
||||
"terminal": ["foot"],
|
||||
"audio": ["pavucontrol"],
|
||||
|
|
@ -438,13 +483,18 @@ default, you must create it manually.
|
|||
},
|
||||
"border": {
|
||||
"rounding": 25,
|
||||
"smoothing": 32,
|
||||
"thickness": 10
|
||||
},
|
||||
"dashboard": {
|
||||
"enabled": true,
|
||||
"showOnHover": true,
|
||||
"showDashboard": true,
|
||||
"showMedia": true,
|
||||
"showPerformance": true,
|
||||
"showWeather": true,
|
||||
"dragThreshold": 50,
|
||||
"mediaUpdateInterval": 500,
|
||||
"showOnHover": true
|
||||
"mediaUpdateInterval": 500
|
||||
},
|
||||
"launcher": {
|
||||
"actionPrefix": ">",
|
||||
|
|
@ -704,6 +754,22 @@ default, you must create it manually.
|
|||
|
||||
</details>
|
||||
|
||||
### Advanced configuration
|
||||
|
||||
> [!WARNING]
|
||||
> Do NOT change any of these options if you do not know what you are doing. These options control the
|
||||
> tokens used internally within the shell, and can cause visual issues if changed. The existence of
|
||||
> the options are also not guaranteed across versions, and may change or be removed without notice.
|
||||
|
||||
A separate `~/.config/caelestia/shell-tokens.json` file allows editing the internal tokens without
|
||||
touching the source code of the shell. These tokens affect, for example, individual rounding,
|
||||
spacing, padding, font size, animation duration and easing curves tokens, and the sizes of certain
|
||||
components. The appearance scale values in `shell.json` are multiplied against these base
|
||||
token values to produce the final computed values.
|
||||
|
||||
Per-monitor token overrides are also available at
|
||||
`~/.config/caelestia/monitors/<screen-name>/shell-tokens.json`.
|
||||
|
||||
### Home Manager Module
|
||||
|
||||
For NixOS users, a home manager module is also available.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import QtQuick
|
||||
import qs.config
|
||||
import Caelestia.Config
|
||||
|
||||
NumberAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
duration: Tokens.anim.durations.normal
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import QtQuick
|
||||
import qs.config
|
||||
import Caelestia.Config
|
||||
|
||||
ColorAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
duration: Tokens.anim.durations.normal
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -9,14 +9,14 @@ ColumnLayout {
|
|||
required property string icon
|
||||
required property string title
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: root.icon
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
font.pointSize: Tokens.font.size.extraLarge * 3
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: root.title
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property var deviceDetails
|
||||
|
||||
spacing: Appearance.spacing.small / 2
|
||||
spacing: Tokens.spacing.small / 2
|
||||
|
||||
StyledText {
|
||||
text: qsTr("IP Address")
|
||||
|
|
@ -18,40 +18,40 @@ ColumnLayout {
|
|||
StyledText {
|
||||
text: root.deviceDetails?.ipAddress || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
text: qsTr("Subnet Mask")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.deviceDetails?.subnet || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
text: qsTr("Gateway")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.deviceDetails?.gateway || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
text: qsTr("DNS Servers")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: (root.deviceDetails && root.deviceDetails.dns && root.deviceDetails.dns.length > 0) ? root.deviceDetails.dns.join(", ") : qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: parent.width
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledText {
|
||||
property real fill
|
||||
property int grade: Colours.light ? 0 : -25
|
||||
|
||||
font.family: Appearance.font.family.material
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.family: Tokens.font.family.material
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
font.variableAxes: ({
|
||||
FILL: fill.toFixed(1),
|
||||
GRAD: grade,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -11,16 +11,16 @@ ColumnLayout {
|
|||
required property string value
|
||||
property bool showTopMargin: false
|
||||
|
||||
spacing: Appearance.spacing.small / 2
|
||||
spacing: Tokens.spacing.small / 2
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: root.showTopMargin ? Appearance.spacing.normal : 0
|
||||
Layout.topMargin: root.showTopMargin ? Tokens.spacing.normal : 0
|
||||
text: root.label
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.value
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
default property alias content: contentColumn.data
|
||||
property real contentSpacing: Appearance.spacing.larger
|
||||
property real contentSpacing: Tokens.spacing.larger
|
||||
property bool alignTop: false
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
||||
implicitHeight: contentColumn.implicitHeight + Tokens.padding.large * 2
|
||||
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : Colours.palette.m3surfaceContainerHigh
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -24,7 +24,7 @@ StyledRect {
|
|||
anchors.right: parent.right
|
||||
anchors.top: root.alignTop ? parent.top : undefined
|
||||
anchors.verticalCenter: root.alignTop ? undefined : parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.large
|
||||
|
||||
spacing: root.contentSpacing
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -13,9 +13,9 @@ ColumnLayout {
|
|||
spacing: 0
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
text: root.title
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
|
@ -63,7 +63,7 @@ MouseArea {
|
|||
properties: "implicitWidth,implicitHeight"
|
||||
from: 0
|
||||
to: rippleAnim.radius * 2
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
target: ripple
|
||||
|
|
@ -83,7 +83,7 @@ MouseArea {
|
|||
StyledRect {
|
||||
id: ripple
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: root.color
|
||||
opacity: 0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Text {
|
||||
id: root
|
||||
|
|
@ -11,13 +11,13 @@ Text {
|
|||
property string animateProp: "scale"
|
||||
property real animateFrom: 0
|
||||
property real animateTo: 1
|
||||
property int animateDuration: Appearance.anim.durations.normal
|
||||
property int animateDuration: Tokens.anim.durations.normal
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
textFormat: Text.PlainText
|
||||
color: Colours.palette.m3onSurface
|
||||
font.family: Appearance.font.family.sans
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Tokens.font.family.sans
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
|
|
@ -29,12 +29,12 @@ Text {
|
|||
SequentialAnimation {
|
||||
Anim {
|
||||
to: root.animateFrom
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
easing: Tokens.anim.standardAccel
|
||||
}
|
||||
PropertyAction {}
|
||||
Anim {
|
||||
to: root.animateTo
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -43,6 +43,5 @@ Text {
|
|||
target: root
|
||||
property: root.animateProp
|
||||
duration: root.animateDuration / 2
|
||||
easing.type: Easing.BezierSpline
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Caelestia.Config
|
||||
|
||||
// qmllint disable uncreatable-type
|
||||
PanelWindow {
|
||||
|
|
@ -8,4 +9,7 @@ PanelWindow {
|
|||
|
||||
WlrLayershell.namespace: `caelestia-${name}`
|
||||
color: "transparent"
|
||||
|
||||
contentItem.Config.screen: screen.name
|
||||
contentItem.Tokens.screen: screen.name
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import Caelestia.Internal
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
BusyIndicator {
|
||||
id: root
|
||||
|
|
@ -19,8 +19,8 @@ BusyIndicator {
|
|||
Completing
|
||||
}
|
||||
|
||||
property real implicitSize: Appearance.font.size.normal * 3
|
||||
property real strokeWidth: Appearance.padding.small * 0.8
|
||||
property real implicitSize: Tokens.font.size.normal * 3
|
||||
property real strokeWidth: Tokens.padding.small * 0.8
|
||||
property color fgColour: Colours.palette.m3primary
|
||||
property color bgColour: Colours.palette.m3secondaryContainer
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ BusyIndicator {
|
|||
transitions: Transition {
|
||||
Anim {
|
||||
properties: "opacity,internalStrokeWidth"
|
||||
duration: manager.completeEndDuration * Appearance.anim.durations.scale
|
||||
duration: manager.completeEndDuration * Tokens.anim.durations.scale
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ BusyIndicator {
|
|||
property: "progress"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: manager.duration * Appearance.anim.durations.scale
|
||||
duration: manager.duration * Tokens.anim.durations.scale
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
|
|
@ -99,7 +99,7 @@ BusyIndicator {
|
|||
property: "completeEndProgress"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: manager.completeEndDuration * Appearance.anim.durations.scale
|
||||
duration: manager.completeEndDuration * Tokens.anim.durations.scale
|
||||
onFinished: {
|
||||
if (root.animState === CircularIndicator.Completing)
|
||||
root.animState = CircularIndicator.Stopped;
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Shape {
|
||||
id: root
|
||||
|
||||
property real value
|
||||
property int startAngle: -90
|
||||
property int strokeWidth: Appearance.padding.smaller
|
||||
property int strokeWidth: Tokens.padding.smaller
|
||||
property int padding: 0
|
||||
property int spacing: Appearance.spacing.small
|
||||
property int spacing: Tokens.spacing.small
|
||||
property color fgColour: Colours.palette.m3primary
|
||||
property color bgColour: Colours.palette.m3secondaryContainer
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ Shape {
|
|||
fillColor: "transparent"
|
||||
strokeColor: root.bgColour
|
||||
strokeWidth: root.strokeWidth
|
||||
capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
capStyle: root.Tokens.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
|
||||
PathAngleArc {
|
||||
startAngle: root.startAngle + 360 * root.vValue + root.gapAngle
|
||||
|
|
@ -40,7 +40,7 @@ Shape {
|
|||
|
||||
Behavior on strokeColor {
|
||||
CAnim {
|
||||
duration: Appearance.anim.durations.large
|
||||
duration: Tokens.anim.durations.large
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ Shape {
|
|||
fillColor: "transparent"
|
||||
strokeColor: root.fgColour
|
||||
strokeWidth: root.strokeWidth
|
||||
capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
capStyle: root.Tokens.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
|
||||
PathAngleArc {
|
||||
startAngle: root.startAngle
|
||||
|
|
@ -62,7 +62,7 @@ Shape {
|
|||
|
||||
Behavior on strokeColor {
|
||||
CAnim {
|
||||
duration: Appearance.anim.durations.large
|
||||
duration: Tokens.anim.durations.large
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -18,14 +18,14 @@ ColumnLayout {
|
|||
|
||||
signal toggleRequested
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
Layout.fillWidth: true
|
||||
|
||||
Item {
|
||||
id: sectionHeaderItem
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.max(titleRow.implicitHeight + Appearance.padding.normal * 2, 48)
|
||||
Layout.preferredHeight: Math.max(titleRow.implicitHeight + Tokens.padding.normal * 2, 48)
|
||||
|
||||
RowLayout {
|
||||
id: titleRow
|
||||
|
|
@ -33,13 +33,13 @@ ColumnLayout {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
text: root.title
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
|
|
@ -51,12 +51,12 @@ ColumnLayout {
|
|||
text: "expand_more"
|
||||
rotation: root.expanded ? 180 : 0
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
|
||||
Behavior on rotation {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
duration: Tokens.anim.durations.small
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ ColumnLayout {
|
|||
|
||||
anchors.fill: parent
|
||||
color: Colours.palette.m3onSurface
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
showHoverBackground: false
|
||||
}
|
||||
}
|
||||
|
|
@ -79,12 +79,12 @@ ColumnLayout {
|
|||
id: contentWrapper
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: root.expanded ? (contentColumn.implicitHeight + Appearance.spacing.small * 2) : 0
|
||||
Layout.preferredHeight: root.expanded ? (contentColumn.implicitHeight + Tokens.spacing.small * 2) : 0
|
||||
clip: true
|
||||
|
||||
Behavior on Layout.preferredHeight {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,14 +92,14 @@ ColumnLayout {
|
|||
id: backgroundRect
|
||||
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, root.nested ? 3 : 2) : (root.nested ? Colours.palette.m3surfaceContainerHigh : Colours.palette.m3surfaceContainer)
|
||||
opacity: root.showBackground && root.expanded ? 1.0 : 0.0
|
||||
visible: root.showBackground
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -109,16 +109,16 @@ ColumnLayout {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
y: Appearance.spacing.small
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
anchors.bottomMargin: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.small
|
||||
y: Tokens.spacing.small
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
anchors.rightMargin: Tokens.padding.normal
|
||||
anchors.bottomMargin: Tokens.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
opacity: root.expanded ? 1.0 : 0.0
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -126,12 +126,12 @@ ColumnLayout {
|
|||
id: descriptionText
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: root.description !== "" ? Appearance.spacing.smaller : 0
|
||||
Layout.bottomMargin: root.description !== "" ? Appearance.spacing.small : 0
|
||||
Layout.topMargin: root.description !== "" ? Tokens.spacing.smaller : 0
|
||||
Layout.bottomMargin: root.description !== "" ? Tokens.spacing.small : 0
|
||||
visible: root.description !== ""
|
||||
text: root.description
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
|
|
@ -20,7 +20,7 @@ RowLayout {
|
|||
|
||||
signal valueModified(value: real)
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
onValueChanged: {
|
||||
if (!root.isEditing) {
|
||||
|
|
@ -73,23 +73,23 @@ RowLayout {
|
|||
root.isEditing = false;
|
||||
}
|
||||
|
||||
padding: Appearance.padding.small
|
||||
leftPadding: Appearance.padding.normal
|
||||
rightPadding: Appearance.padding.normal
|
||||
padding: Tokens.padding.small
|
||||
leftPadding: Tokens.padding.normal
|
||||
rightPadding: Tokens.padding.normal
|
||||
|
||||
background: StyledRect {
|
||||
implicitWidth: 100
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
color: Colours.tPalette.m3surfaceContainerHigh
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
color: Colours.palette.m3primary
|
||||
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: upIcon.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StateLayer {
|
||||
id: upState
|
||||
|
|
@ -120,11 +120,11 @@ RowLayout {
|
|||
}
|
||||
|
||||
StyledRect {
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
color: Colours.palette.m3primary
|
||||
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: downIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: downIcon.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StateLayer {
|
||||
id: downState
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import ".."
|
|||
import "../effects"
|
||||
import QtQuick
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Slider {
|
||||
id: root
|
||||
|
|
@ -16,7 +16,7 @@ Slider {
|
|||
|
||||
background: StyledRect {
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StyledRect {
|
||||
anchors.left: parent.left
|
||||
|
|
@ -51,7 +51,7 @@ Slider {
|
|||
anchors.fill: parent
|
||||
|
||||
color: Colours.palette.m3inverseSurface
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
MouseArea {
|
||||
id: handleInteraction
|
||||
|
|
@ -70,8 +70,8 @@ Slider {
|
|||
function update(): void {
|
||||
animate = !moving;
|
||||
binding.when = moving;
|
||||
font.pointSize = moving ? Appearance.font.size.small : Appearance.font.size.larger;
|
||||
font.family = moving ? Appearance.font.family.sans : Appearance.font.family.material;
|
||||
font.pointSize = moving ? Tokens.font.size.small : Tokens.font.size.larger;
|
||||
font.family = moving ? Tokens.font.family.sans : Tokens.font.family.material;
|
||||
}
|
||||
|
||||
text: root.icon
|
||||
|
|
@ -96,8 +96,8 @@ Slider {
|
|||
target: icon
|
||||
property: "scale"
|
||||
to: 0
|
||||
duration: Appearance.anim.durations.normal / 2
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
duration: Tokens.anim.durations.normal / 2
|
||||
easing: Tokens.anim.standardAccel
|
||||
}
|
||||
ScriptAction {
|
||||
script: icon.update()
|
||||
|
|
@ -106,8 +106,8 @@ Slider {
|
|||
target: icon
|
||||
property: "scale"
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.normal / 2
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
duration: Tokens.anim.durations.normal / 2
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ Slider {
|
|||
|
||||
Behavior on value {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.large
|
||||
duration: Tokens.anim.durations.large
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -15,7 +15,7 @@ StyledRect {
|
|||
property alias icon: label.text
|
||||
property bool checked
|
||||
property bool toggle
|
||||
property real padding: type === IconButton.Text ? Appearance.padding.small / 2 : Appearance.padding.smaller
|
||||
property real padding: type === IconButton.Text ? Tokens.padding.small / 2 : Tokens.padding.smaller
|
||||
property alias font: label.font
|
||||
property int type: IconButton.Filled
|
||||
property bool disabled
|
||||
|
|
@ -44,7 +44,7 @@ StyledRect {
|
|||
|
||||
onCheckedChanged: internalChecked = checked
|
||||
|
||||
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
radius: internalChecked ? Tokens.rounding.small : implicitHeight / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
color: type === IconButton.Text ? "transparent" : disabled ? disabledColour : internalChecked ? activeColour : inactiveColour
|
||||
|
||||
implicitWidth: implicitHeight
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -17,8 +17,8 @@ StyledRect {
|
|||
property alias text: label.text
|
||||
property bool checked
|
||||
property bool toggle
|
||||
property real horizontalPadding: Appearance.padding.normal
|
||||
property real verticalPadding: Appearance.padding.smaller
|
||||
property real horizontalPadding: Tokens.padding.normal
|
||||
property real verticalPadding: Tokens.padding.smaller
|
||||
property alias font: label.font
|
||||
property int type: IconTextButton.Filled
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ StyledRect {
|
|||
|
||||
onCheckedChanged: internalChecked = checked
|
||||
|
||||
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
radius: internalChecked ? Tokens.rounding.small : implicitHeight / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
color: type === IconTextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour
|
||||
|
||||
implicitWidth: row.implicitWidth + horizontalPadding * 2
|
||||
|
|
@ -58,7 +58,7 @@ StyledRect {
|
|||
id: row
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
id: iconLabel
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import ".."
|
|||
import "../effects"
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Elevation {
|
||||
id: root
|
||||
|
|
@ -16,7 +16,7 @@ Elevation {
|
|||
|
||||
signal itemSelected(item: MenuItem)
|
||||
|
||||
radius: Appearance.rounding.small / 2
|
||||
radius: Tokens.rounding.small / 2
|
||||
level: 2
|
||||
|
||||
implicitWidth: Math.max(200, column.implicitWidth)
|
||||
|
|
@ -46,8 +46,8 @@ Elevation {
|
|||
readonly property bool active: modelData === root.active
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitWidth: menuOptionRow.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: menuOptionRow.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitWidth: menuOptionRow.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: menuOptionRow.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
color: Qt.alpha(Colours.palette.m3secondaryContainer, active ? 1 : 0)
|
||||
|
||||
|
|
@ -67,8 +67,8 @@ Elevation {
|
|||
id: menuOptionRow
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
spacing: Appearance.spacing.small
|
||||
anchors.margins: Tokens.padding.normal
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
|
@ -102,14 +102,14 @@ Elevation {
|
|||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -16,8 +16,8 @@ StyledRect {
|
|||
property var onValueModified: function (value) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.large * 2
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
|
|
@ -30,8 +30,8 @@ StyledRect {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Row {
|
||||
id: root
|
||||
|
|
@ -12,8 +12,8 @@ Row {
|
|||
Tonal
|
||||
}
|
||||
|
||||
property real horizontalPadding: Appearance.padding.normal
|
||||
property real verticalPadding: Appearance.padding.smaller
|
||||
property real horizontalPadding: Tokens.padding.normal
|
||||
property real verticalPadding: Tokens.padding.smaller
|
||||
property int type: SplitButton.Filled
|
||||
property bool disabled
|
||||
property bool menuOnTop
|
||||
|
|
@ -33,12 +33,12 @@ Row {
|
|||
property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1)
|
||||
property color disabledTextColour: Qt.alpha(Colours.palette.m3onSurface, 0.38)
|
||||
|
||||
spacing: Math.floor(Appearance.spacing.small / 2)
|
||||
spacing: Math.floor(Tokens.spacing.small / 2)
|
||||
|
||||
StyledRect {
|
||||
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
topRightRadius: Appearance.rounding.small / 2
|
||||
bottomRightRadius: Appearance.rounding.small / 2
|
||||
radius: implicitHeight / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
topRightRadius: Tokens.rounding.small / 2
|
||||
bottomRightRadius: Tokens.rounding.small / 2
|
||||
color: root.disabled ? root.disabledColour : root.colour
|
||||
|
||||
implicitWidth: textRow.implicitWidth + root.horizontalPadding * 2
|
||||
|
|
@ -62,7 +62,7 @@ Row {
|
|||
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: Math.floor(root.verticalPadding / 4)
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
id: iconLabel
|
||||
|
|
@ -86,7 +86,7 @@ Row {
|
|||
|
||||
Behavior on Layout.preferredWidth {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -96,9 +96,9 @@ Row {
|
|||
StyledRect {
|
||||
id: expandBtn
|
||||
|
||||
property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Appearance.rounding.scale) : Appearance.rounding.small / 2
|
||||
property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Tokens.rounding.scale) : Tokens.rounding.small / 2
|
||||
|
||||
radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
radius: implicitHeight / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
topLeftRadius: rad
|
||||
bottomLeftRadius: rad
|
||||
color: root.disabled ? root.disabledColour : root.colour
|
||||
|
|
@ -157,8 +157,8 @@ Row {
|
|||
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: Appearance.spacing.small
|
||||
anchors.bottomMargin: Appearance.spacing.small
|
||||
anchors.topMargin: Tokens.spacing.small
|
||||
anchors.bottomMargin: Tokens.spacing.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -21,8 +21,8 @@ StyledRect {
|
|||
signal selected(item: MenuItem)
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.large * 2
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
clip: false
|
||||
|
|
@ -33,8 +33,8 @@ StyledRect {
|
|||
id: row
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import ".."
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -22,14 +22,14 @@ Item {
|
|||
signal editingFinished
|
||||
|
||||
implicitWidth: 70
|
||||
implicitHeight: inputField.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: inputField.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StyledRect {
|
||||
id: container
|
||||
|
||||
anchors.fill: parent
|
||||
color: inputHover.containsMouse || inputField.activeFocus ? Colours.layer(Colours.palette.m3surfaceContainer, 3) : Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
border.width: 1
|
||||
border.color: inputField.activeFocus ? Colours.palette.m3primary : Qt.alpha(Colours.palette.m3outline, 0.3)
|
||||
opacity: root.enabled ? 1 : 0.5
|
||||
|
|
@ -55,7 +55,7 @@ Item {
|
|||
id: inputField
|
||||
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - Appearance.padding.normal
|
||||
width: parent.width - Tokens.padding.normal
|
||||
horizontalAlignment: root.horizontalAlignment
|
||||
validator: root.validator
|
||||
readOnly: root.readOnly
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import QtQuick
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
RadioButton {
|
||||
id: root
|
||||
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
|
||||
implicitWidth: implicitIndicatorWidth + implicitContentWidth + contentItem.anchors.leftMargin
|
||||
implicitHeight: Math.max(implicitIndicatorHeight, implicitContentHeight)
|
||||
|
|
@ -17,7 +17,7 @@ RadioButton {
|
|||
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: "transparent"
|
||||
border.color: root.checked ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||
border.width: 2
|
||||
|
|
@ -28,7 +28,7 @@ RadioButton {
|
|||
root.click();
|
||||
}
|
||||
|
||||
anchors.margins: -Appearance.padding.smaller
|
||||
anchors.margins: -Tokens.padding.smaller
|
||||
color: root.checked ? Colours.palette.m3onSurface : Colours.palette.m3primary
|
||||
z: -1
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ RadioButton {
|
|||
implicitWidth: 8
|
||||
implicitHeight: 8
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3primary, root.checked ? 1 : 0)
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +52,6 @@ RadioButton {
|
|||
font.pointSize: root.font.pointSize
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: outerCircle.right
|
||||
anchors.leftMargin: Appearance.spacing.smaller
|
||||
anchors.leftMargin: Tokens.spacing.smaller
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ScrollBar {
|
||||
id: root
|
||||
|
|
@ -45,7 +45,7 @@ ScrollBar {
|
|||
}
|
||||
}
|
||||
}
|
||||
implicitWidth: Appearance.padding.small
|
||||
implicitWidth: Tokens.padding.small
|
||||
|
||||
contentItem: StyledRect {
|
||||
anchors.left: parent.left
|
||||
|
|
@ -61,7 +61,7 @@ ScrollBar {
|
|||
return 0.6;
|
||||
return 0;
|
||||
}
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Colours.palette.m3secondary
|
||||
|
||||
MouseArea {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Slider {
|
||||
id: root
|
||||
|
|
@ -18,7 +18,7 @@ Slider {
|
|||
implicitWidth: root.handle.x - root.implicitHeight / 6
|
||||
|
||||
color: Colours.palette.m3primary
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
topRightRadius: root.implicitHeight / 15
|
||||
bottomRightRadius: root.implicitHeight / 15
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ Slider {
|
|||
implicitWidth: parent.width - root.handle.x - root.handle.implicitWidth - root.implicitHeight / 6
|
||||
|
||||
color: Colours.palette.m3surfaceContainerHighest
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
topLeftRadius: root.implicitHeight / 15
|
||||
bottomLeftRadius: root.implicitHeight / 15
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ Slider {
|
|||
implicitHeight: root.implicitHeight
|
||||
|
||||
color: Colours.palette.m3primary
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import ".."
|
|||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import QtQuick.Templates
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Switch {
|
||||
id: root
|
||||
|
|
@ -14,21 +14,21 @@ Switch {
|
|||
implicitHeight: implicitIndicatorHeight
|
||||
|
||||
indicator: StyledRect {
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: root.checked ? Colours.palette.m3primary : Colours.layer(Colours.palette.m3surfaceContainerHighest, root.cLayer)
|
||||
|
||||
implicitWidth: implicitHeight * 1.7
|
||||
implicitHeight: Appearance.font.size.normal + Appearance.padding.smaller * 2
|
||||
implicitHeight: Tokens.font.size.normal + Tokens.padding.smaller * 2
|
||||
|
||||
StyledRect {
|
||||
readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.3 : implicitHeight
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: root.checked ? Colours.palette.m3onPrimary : Colours.layer(Colours.palette.m3outline, root.cLayer + 1)
|
||||
|
||||
x: root.checked ? parent.implicitWidth - nonAnimWidth - Appearance.padding.small / 2 : Appearance.padding.small / 2
|
||||
x: root.checked ? parent.implicitWidth - nonAnimWidth - Tokens.padding.small / 2 : Tokens.padding.small / 2
|
||||
implicitWidth: nonAnimWidth
|
||||
implicitHeight: parent.implicitHeight - Appearance.padding.small
|
||||
implicitHeight: parent.implicitHeight - Tokens.padding.small
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledRect {
|
||||
|
|
@ -83,15 +83,15 @@ Switch {
|
|||
|
||||
anchors.centerIn: parent
|
||||
width: height
|
||||
height: parent.implicitHeight - Appearance.padding.small * 2
|
||||
height: parent.implicitHeight - Tokens.padding.small * 2
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
asynchronous: true
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: Appearance.font.size.larger * 0.15
|
||||
strokeWidth: root.Tokens.font.size.larger * 0.15
|
||||
strokeColor: root.checked ? Colours.palette.m3primary : Colours.palette.m3surfaceContainerHighest
|
||||
fillColor: "transparent"
|
||||
capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
capStyle: root.Tokens.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap
|
||||
|
||||
startX: icon.start1.x
|
||||
startY: icon.start1.y
|
||||
|
|
@ -145,8 +145,7 @@ Switch {
|
|||
}
|
||||
|
||||
component PropAnim: PropertyAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
duration: Tokens.anim.durations.normal
|
||||
easing: Tokens.anim.standard
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
TextField {
|
||||
id: root
|
||||
|
||||
color: Colours.palette.m3onSurface
|
||||
placeholderTextColor: Colours.palette.m3outline
|
||||
font.family: Appearance.font.family.sans
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Tokens.font.family.sans
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
renderType: echoMode === TextField.Password ? TextField.QtRendering : TextField.NativeRendering
|
||||
cursorVisible: !readOnly
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ TextField {
|
|||
|
||||
implicitWidth: 2
|
||||
color: Colours.palette.m3primary
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
|
||||
Connections {
|
||||
function onCursorPositionChanged(): void {
|
||||
|
|
@ -61,7 +61,7 @@ TextField {
|
|||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -13,8 +13,8 @@ StyledRect {
|
|||
property var onToggled: function (checked) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.large * 2
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
|
|
@ -27,8 +27,8 @@ StyledRect {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -15,8 +15,8 @@ StyledRect {
|
|||
property alias text: label.text
|
||||
property bool checked
|
||||
property bool toggle
|
||||
property real horizontalPadding: Appearance.padding.normal
|
||||
property real verticalPadding: Appearance.padding.smaller
|
||||
property real horizontalPadding: Tokens.padding.normal
|
||||
property real verticalPadding: Tokens.padding.smaller
|
||||
property alias font: label.font
|
||||
property int type: TextButton.Filled
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ StyledRect {
|
|||
|
||||
onCheckedChanged: internalChecked = checked
|
||||
|
||||
radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
radius: internalChecked ? Tokens.rounding.small : implicitHeight / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
color: type === TextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour
|
||||
|
||||
implicitWidth: label.implicitWidth + horizontalPadding * 2
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -15,9 +15,9 @@ StyledRect {
|
|||
property string icon
|
||||
property string label
|
||||
property string accent: "Secondary"
|
||||
property real iconSize: Appearance.font.size.large
|
||||
property real horizontalPadding: Appearance.padding.large
|
||||
property real verticalPadding: Appearance.padding.normal
|
||||
property real iconSize: Tokens.font.size.large
|
||||
property real horizontalPadding: Tokens.padding.large
|
||||
property real verticalPadding: Tokens.padding.normal
|
||||
property string tooltip: ""
|
||||
property bool hovered: false
|
||||
|
||||
|
|
@ -26,10 +26,10 @@ StyledRect {
|
|||
Component.onCompleted: {
|
||||
hovered = toggleStateLayer.containsMouse;
|
||||
}
|
||||
Layout.preferredWidth: implicitWidth + (toggleStateLayer.pressed ? Appearance.padding.normal * 2 : toggled ? Appearance.padding.small * 2 : 0)
|
||||
Layout.preferredWidth: implicitWidth + (toggleStateLayer.pressed ? Tokens.padding.normal * 2 : toggled ? Tokens.padding.small * 2 : 0)
|
||||
implicitWidth: toggleBtnInner.implicitWidth + horizontalPadding * 2
|
||||
implicitHeight: toggleBtnIcon.implicitHeight + verticalPadding * 2
|
||||
radius: toggled || toggleStateLayer.pressed ? Appearance.rounding.small : Math.min(width, height) / 2 * Math.min(1, Appearance.rounding.scale)
|
||||
radius: toggled || toggleStateLayer.pressed ? Tokens.rounding.small : Math.min(width, height) / 2 * Math.min(1, Tokens.rounding.scale)
|
||||
color: toggled ? Colours.palette[`m3${accent.toLowerCase()}`] : Colours.palette[`m3${accent.toLowerCase()}Container`]
|
||||
|
||||
Connections {
|
||||
|
|
@ -57,7 +57,7 @@ StyledRect {
|
|||
id: toggleBtnInner
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
id: toggleBtnIcon
|
||||
|
|
@ -87,15 +87,15 @@ StyledRect {
|
|||
|
||||
Behavior on radius {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on Layout.preferredWidth {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.config
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
|
|
@ -12,7 +12,7 @@ RowLayout {
|
|||
property alias toggle: toggle
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Caelestia.Config
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
|
|
@ -44,10 +44,10 @@ Popup {
|
|||
let newX = targetCenterX - tooltipWidth / 2;
|
||||
|
||||
// Position tooltip above target
|
||||
let newY = targetPos.y - tooltipHeight - Appearance.spacing.small;
|
||||
let newY = targetPos.y - tooltipHeight - Tokens.spacing.small;
|
||||
|
||||
// Keep within bounds
|
||||
const padding = Appearance.padding.normal;
|
||||
const padding = Tokens.padding.normal;
|
||||
if (newX < padding) {
|
||||
newX = padding;
|
||||
} else if (newX + tooltipWidth > (parent.width - padding)) {
|
||||
|
|
@ -100,8 +100,8 @@ Popup {
|
|||
property: "opacity"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -110,19 +110,19 @@ Popup {
|
|||
property: "opacity"
|
||||
from: 1
|
||||
to: 0
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: StyledRect {
|
||||
id: tooltipRect
|
||||
|
||||
implicitWidth: tooltipText.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: tooltipText.implicitHeight + Appearance.padding.smaller * 2
|
||||
implicitWidth: tooltipText.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: tooltipText.implicitHeight + Tokens.padding.smaller * 2
|
||||
|
||||
color: Colours.palette.m3surfaceContainerHighest
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
antialiasing: true
|
||||
|
||||
// Add elevation for depth
|
||||
|
|
@ -140,7 +140,7 @@ Popup {
|
|||
|
||||
text: root.text
|
||||
color: Colours.palette.m3onSurface
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
property alias innerRadius: maskInner.radius
|
||||
|
|
@ -37,8 +37,8 @@ StyledRect {
|
|||
id: maskInner
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
radius: Appearance.rounding.small
|
||||
anchors.margins: Tokens.padding.normal
|
||||
radius: Tokens.rounding.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property var currentItem
|
||||
|
||||
implicitWidth: content.implicitWidth + Appearance.padding.larger + content.anchors.rightMargin
|
||||
implicitHeight: currentItem ? content.implicitHeight + Appearance.padding.normal + content.anchors.bottomMargin : 0
|
||||
implicitWidth: content.implicitWidth + Tokens.padding.larger + content.anchors.rightMargin
|
||||
implicitHeight: currentItem ? content.implicitHeight + Tokens.padding.normal + content.anchors.bottomMargin : 0
|
||||
|
||||
Shape {
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
|
|
@ -18,7 +18,7 @@ Item {
|
|||
ShapePath {
|
||||
id: path
|
||||
|
||||
readonly property real rounding: Appearance.rounding.small
|
||||
readonly property real rounding: Tokens.rounding.small
|
||||
readonly property bool flatten: root.implicitHeight < rounding * 2
|
||||
readonly property real roundingY: flatten ? root.implicitHeight / 2 : rounding
|
||||
|
||||
|
|
@ -76,8 +76,8 @@ Item {
|
|||
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.rightMargin: Appearance.padding.larger - Appearance.padding.small
|
||||
anchors.bottomMargin: Appearance.padding.normal - Appearance.padding.small
|
||||
anchors.rightMargin: Tokens.padding.larger - Tokens.padding.small
|
||||
anchors.bottomMargin: Tokens.padding.normal - Tokens.padding.small
|
||||
|
||||
Connections {
|
||||
function onCurrentItemChanged(): void {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -9,7 +9,7 @@ StyledRect {
|
|||
required property var dialog
|
||||
required property FolderContents folder
|
||||
|
||||
implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitHeight: inner.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
|
||||
|
|
@ -17,9 +17,9 @@ StyledRect {
|
|||
id: inner
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Filter:")
|
||||
|
|
@ -28,14 +28,14 @@ StyledRect {
|
|||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: Appearance.spacing.normal
|
||||
Layout.rightMargin: Tokens.spacing.normal
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainerHigh
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
StyledText {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
text: `${root.dialog.filterLabel} (${root.dialog.filters.map(f => `*.${f}`).join(", ")})`
|
||||
}
|
||||
|
|
@ -43,10 +43,10 @@ StyledRect {
|
|||
|
||||
StyledRect {
|
||||
color: Colours.tPalette.m3surfaceContainerHigh
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitWidth: cancelText.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: cancelText.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
|
|
@ -60,7 +60,7 @@ StyledRect {
|
|||
id: selectText
|
||||
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
text: qsTr("Select")
|
||||
color: root.dialog.selectionValid ? Colours.palette.m3onSurface : Colours.palette.m3outline
|
||||
|
|
@ -69,10 +69,10 @@ StyledRect {
|
|||
|
||||
StyledRect {
|
||||
color: Colours.tPalette.m3surfaceContainerHigh
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitWidth: cancelText.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: cancelText.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
|
|
@ -84,7 +84,7 @@ StyledRect {
|
|||
id: cancelText
|
||||
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
text: qsTr("Cancel")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ import QtQuick
|
|||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import Caelestia.Models
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.components.filedialog
|
||||
import qs.components.images
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
|
|
@ -42,8 +42,8 @@ Item {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.small
|
||||
radius: Appearance.rounding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
radius: Tokens.rounding.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,14 +59,14 @@ Item {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "scan_delete"
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.extraLarge * 2
|
||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: qsTr("This folder is empty")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
font.weight: 500
|
||||
}
|
||||
}
|
||||
|
|
@ -80,10 +80,10 @@ Item {
|
|||
id: view
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.small + Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.small + Tokens.padding.normal
|
||||
|
||||
cellWidth: Sizes.itemWidth + Appearance.spacing.small
|
||||
cellHeight: Sizes.itemWidth + Appearance.spacing.small * 2 + Appearance.padding.normal * 2 + 1
|
||||
cellWidth: Sizes.itemWidth + Tokens.spacing.small
|
||||
cellHeight: Sizes.itemWidth + Tokens.spacing.small * 2 + Tokens.padding.normal * 2 + 1
|
||||
|
||||
clip: true
|
||||
focus: true
|
||||
|
|
@ -120,8 +120,8 @@ Item {
|
|||
properties: "opacity,scale"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -140,12 +140,12 @@ Item {
|
|||
Anim {
|
||||
properties: "opacity,scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ Item {
|
|||
CurrentItem {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: Appearance.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
|
||||
currentItem: view.currentItem
|
||||
}
|
||||
|
|
@ -164,12 +164,12 @@ Item {
|
|||
required property int index
|
||||
required property FileSystemEntry modelData
|
||||
|
||||
readonly property real nonAnimHeight: icon.implicitHeight + name.anchors.topMargin + name.implicitHeight + Appearance.padding.normal * 2
|
||||
readonly property real nonAnimHeight: icon.implicitHeight + name.anchors.topMargin + name.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
implicitWidth: Sizes.itemWidth
|
||||
implicitHeight: nonAnimHeight
|
||||
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainerHighest, GridView.isCurrentItem ? Colours.tPalette.m3surfaceContainerHighest.a : 0)
|
||||
z: GridView.isCurrentItem || implicitHeight !== nonAnimHeight ? 1 : 0
|
||||
clip: true
|
||||
|
|
@ -192,9 +192,9 @@ Item {
|
|||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Appearance.padding.normal
|
||||
anchors.topMargin: Tokens.padding.normal
|
||||
|
||||
implicitSize: Sizes.itemWidth - Appearance.padding.normal * 2
|
||||
implicitSize: Sizes.itemWidth - Tokens.padding.normal * 2
|
||||
|
||||
Component.onCompleted: {
|
||||
const file = item.modelData;
|
||||
|
|
@ -215,8 +215,8 @@ Item {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: icon.bottom
|
||||
anchors.topMargin: Appearance.spacing.small
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.topMargin: Tokens.spacing.small
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
elide: item.GridView.isCurrentItem ? Text.ElideNone : Text.ElideRight
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
required property var dialog
|
||||
|
||||
implicitWidth: inner.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitWidth: inner.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: inner.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
|
||||
|
|
@ -20,19 +20,19 @@ StyledRect {
|
|||
id: inner
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
spacing: Appearance.spacing.small
|
||||
anchors.margins: Tokens.padding.normal
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
Item {
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: upIcon.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
root.dialog.cwd.pop();
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
disabled: root.dialog.cwd.length === 1
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ StyledRect {
|
|||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
color: Colours.tPalette.m3surfaceContainerHigh
|
||||
|
||||
implicitHeight: pathComponents.implicitHeight + pathComponents.anchors.margins * 2
|
||||
|
|
@ -58,10 +58,10 @@ StyledRect {
|
|||
id: pathComponents
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.small / 2
|
||||
anchors.margins: Tokens.padding.small / 2
|
||||
anchors.leftMargin: 0
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
Repeater {
|
||||
model: root.dialog.cwd
|
||||
|
|
@ -76,7 +76,7 @@ StyledRect {
|
|||
|
||||
Loader {
|
||||
asynchronous: true
|
||||
Layout.rightMargin: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.spacing.small
|
||||
active: folder.index > 0
|
||||
sourceComponent: StyledText {
|
||||
text: "/"
|
||||
|
|
@ -86,8 +86,8 @@ StyledRect {
|
|||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: homeIcon.implicitWidth + (homeIcon.active ? Appearance.padding.small : 0) + folderName.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: folderName.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: homeIcon.implicitWidth + (homeIcon.active ? Tokens.padding.small : 0) + folderName.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: folderName.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
Loader {
|
||||
asynchronous: true
|
||||
|
|
@ -98,7 +98,7 @@ StyledRect {
|
|||
root.dialog.cwd = root.dialog.cwd.slice(0, folder.index + 1);
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ StyledRect {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
anchors.leftMargin: Tokens.padding.normal
|
||||
|
||||
active: folder.index === 0 && folder.modelData === "Home"
|
||||
sourceComponent: MaterialIcon {
|
||||
|
|
@ -124,7 +124,7 @@ StyledRect {
|
|||
|
||||
anchors.left: homeIcon.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: homeIcon.active ? Appearance.padding.small : 0
|
||||
anchors.leftMargin: homeIcon.active ? Tokens.padding.small : 0
|
||||
|
||||
text: folder.modelData
|
||||
color: folder.index < root.dialog.cwd.length - 1 ? Colours.palette.m3onSurfaceVariant : Colours.palette.m3onSurface
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.filedialog
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -13,7 +13,7 @@ StyledRect {
|
|||
required property var dialog
|
||||
|
||||
implicitWidth: Sizes.sidebarWidth
|
||||
implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitHeight: inner.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
|
||||
|
|
@ -23,16 +23,16 @@ StyledRect {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Appearance.padding.normal
|
||||
spacing: Appearance.spacing.small / 2
|
||||
anchors.margins: Tokens.padding.normal
|
||||
spacing: Tokens.spacing.small / 2
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Appearance.padding.small / 2
|
||||
Layout.bottomMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.padding.small / 2
|
||||
Layout.bottomMargin: Tokens.spacing.normal
|
||||
text: qsTr("Files")
|
||||
color: Colours.palette.m3onSurface
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.pointSize: Tokens.font.size.larger
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
|
|
@ -46,9 +46,9 @@ StyledRect {
|
|||
readonly property bool selected: modelData === root.dialog.cwd[root.dialog.cwd.length - 1]
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: placeInner.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitHeight: placeInner.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3secondaryContainer, selected ? 1 : 0)
|
||||
|
||||
StateLayer {
|
||||
|
|
@ -66,11 +66,11 @@ StyledRect {
|
|||
id: placeInner
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.leftMargin: Appearance.padding.large
|
||||
anchors.rightMargin: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.normal
|
||||
anchors.leftMargin: Tokens.padding.large
|
||||
anchors.rightMargin: Tokens.padding.large
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
text: {
|
||||
|
|
@ -92,7 +92,7 @@ StyledRect {
|
|||
return "folder";
|
||||
}
|
||||
color: place.selected ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
fill: place.selected ? 1 : 0
|
||||
|
||||
Behavior on fill {
|
||||
|
|
@ -104,7 +104,7 @@ StyledRect {
|
|||
Layout.fillWidth: true
|
||||
text: place.modelData
|
||||
color: place.selected ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import ".."
|
||||
import "../effects"
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
required property int extra
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
|
||||
color: Colours.palette.m3tertiary
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
implicitWidth: count.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: count.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: count.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: count.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
opacity: extra > 0 ? 1 : 0
|
||||
scale: extra > 0 ? 1 : 0.5
|
||||
|
|
@ -38,14 +38,14 @@ StyledRect {
|
|||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
// Literally just here to shorten accessing stuff :woe:
|
||||
// Also kinda so I can keep accessing it with `Appearance.xxx` instead of `Config.appearance.xxx`
|
||||
readonly property AppearanceConfig.Rounding rounding: Config.appearance.rounding // qmllint disable missing-property
|
||||
readonly property AppearanceConfig.Spacing spacing: Config.appearance.spacing // qmllint disable missing-property
|
||||
readonly property AppearanceConfig.Padding padding: Config.appearance.padding // qmllint disable missing-property
|
||||
readonly property AppearanceConfig.FontStuff font: Config.appearance.font // qmllint disable missing-property
|
||||
readonly property AppearanceConfig.Anim anim: Config.appearance.anim // qmllint disable missing-property
|
||||
readonly property AppearanceConfig.Transparency transparency: Config.appearance.transparency // qmllint disable missing-property
|
||||
}
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property Rounding rounding: Rounding {}
|
||||
property Spacing spacing: Spacing {}
|
||||
property Padding padding: Padding {}
|
||||
property FontStuff font: FontStuff {}
|
||||
property Anim anim: Anim {}
|
||||
property Transparency transparency: Transparency {}
|
||||
|
||||
component Rounding: JsonObject {
|
||||
property real scale: 1
|
||||
property int small: 12 * scale
|
||||
property int normal: 17 * scale
|
||||
property int large: 25 * scale
|
||||
property int full: 1000 * scale
|
||||
}
|
||||
|
||||
component Spacing: JsonObject {
|
||||
property real scale: 1
|
||||
property int small: 7 * scale
|
||||
property int smaller: 10 * scale
|
||||
property int normal: 12 * scale
|
||||
property int larger: 15 * scale
|
||||
property int large: 20 * scale
|
||||
}
|
||||
|
||||
component Padding: JsonObject {
|
||||
property real scale: 1
|
||||
property int small: 5 * scale
|
||||
property int smaller: 7 * scale
|
||||
property int normal: 10 * scale
|
||||
property int larger: 12 * scale
|
||||
property int large: 15 * scale
|
||||
}
|
||||
|
||||
component FontFamily: JsonObject {
|
||||
property string sans: "Rubik"
|
||||
property string mono: "CaskaydiaCove NF"
|
||||
property string material: "Material Symbols Rounded"
|
||||
property string clock: "Rubik"
|
||||
}
|
||||
|
||||
component FontSize: JsonObject {
|
||||
property real scale: 1
|
||||
property int small: 11 * scale
|
||||
property int smaller: 12 * scale
|
||||
property int normal: 13 * scale
|
||||
property int larger: 15 * scale
|
||||
property int large: 18 * scale
|
||||
property int extraLarge: 28 * scale
|
||||
}
|
||||
|
||||
component FontStuff: JsonObject {
|
||||
property FontFamily family: FontFamily {}
|
||||
property FontSize size: FontSize {}
|
||||
}
|
||||
|
||||
component AnimCurves: JsonObject {
|
||||
property list<real> emphasized: [0.05, 0, 2 / 15, 0.06, 1 / 6, 0.4, 5 / 24, 0.82, 0.25, 1, 1, 1]
|
||||
property list<real> emphasizedAccel: [0.3, 0, 0.8, 0.15, 1, 1]
|
||||
property list<real> emphasizedDecel: [0.05, 0.7, 0.1, 1, 1, 1]
|
||||
property list<real> standard: [0.2, 0, 0, 1, 1, 1]
|
||||
property list<real> standardAccel: [0.3, 0, 1, 1, 1, 1]
|
||||
property list<real> standardDecel: [0, 0, 0, 1, 1, 1]
|
||||
property list<real> expressiveFastSpatial: [0.42, 1.67, 0.21, 0.9, 1, 1]
|
||||
property list<real> expressiveDefaultSpatial: [0.38, 1.21, 0.22, 1, 1, 1]
|
||||
property list<real> expressiveSlowSpatial: [0.39, 1.29, 0.35, 0.98, 1, 1]
|
||||
}
|
||||
|
||||
component AnimDurations: JsonObject {
|
||||
property real scale: 1
|
||||
property int small: 200 * scale
|
||||
property int normal: 400 * scale
|
||||
property int large: 600 * scale
|
||||
property int extraLarge: 1000 * scale
|
||||
property int expressiveFastSpatial: 350 * scale
|
||||
property int expressiveDefaultSpatial: 500 * scale
|
||||
property int expressiveSlowSpatial: 650 * scale
|
||||
}
|
||||
|
||||
component Anim: JsonObject {
|
||||
property real mediaGifSpeedAdjustment: 300
|
||||
property real sessionGifSpeed: 0.7
|
||||
property AnimCurves curves: AnimCurves {}
|
||||
property AnimDurations durations: AnimDurations {}
|
||||
}
|
||||
|
||||
component Transparency: JsonObject {
|
||||
property bool enabled: false
|
||||
property real base: 0.85
|
||||
property real layers: 0.4
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property bool wallpaperEnabled: true
|
||||
property DesktopClock desktopClock: DesktopClock {}
|
||||
property Visualiser visualiser: Visualiser {}
|
||||
|
||||
component DesktopClock: JsonObject {
|
||||
property bool enabled: false
|
||||
property real scale: 1.0
|
||||
property string position: "bottom-right"
|
||||
property bool invertColors: false
|
||||
property DesktopClockBackground background: DesktopClockBackground {}
|
||||
property DesktopClockShadow shadow: DesktopClockShadow {}
|
||||
}
|
||||
|
||||
component DesktopClockBackground: JsonObject {
|
||||
property bool enabled: false
|
||||
property real opacity: 0.7
|
||||
property bool blur: true
|
||||
}
|
||||
|
||||
component DesktopClockShadow: JsonObject {
|
||||
property bool enabled: true
|
||||
property real opacity: 0.7
|
||||
property real blur: 0.4
|
||||
}
|
||||
|
||||
component Visualiser: JsonObject {
|
||||
property bool enabled: false
|
||||
property bool autoHide: true
|
||||
property bool blur: false
|
||||
property real rounding: 1
|
||||
property real spacing: 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool persistent: true
|
||||
property bool showOnHover: true
|
||||
property int dragThreshold: 20
|
||||
property ScrollActions scrollActions: ScrollActions {}
|
||||
property Popouts popouts: Popouts {}
|
||||
property Workspaces workspaces: Workspaces {}
|
||||
property ActiveWindow activeWindow: ActiveWindow {}
|
||||
property Tray tray: Tray {}
|
||||
property Status status: Status {}
|
||||
property Clock clock: Clock {}
|
||||
property Sizes sizes: Sizes {}
|
||||
property list<string> excludedScreens: []
|
||||
|
||||
property list<var> entries: [
|
||||
{
|
||||
id: "logo",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "workspaces",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "spacer",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "activeWindow",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "spacer",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "tray",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "clock",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "statusIcons",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "power",
|
||||
enabled: true
|
||||
}
|
||||
]
|
||||
|
||||
component ScrollActions: JsonObject {
|
||||
property bool workspaces: true
|
||||
property bool volume: true
|
||||
property bool brightness: true
|
||||
}
|
||||
|
||||
component Popouts: JsonObject {
|
||||
property bool activeWindow: true
|
||||
property bool tray: true
|
||||
property bool statusIcons: true
|
||||
}
|
||||
|
||||
component Workspaces: JsonObject {
|
||||
property int shown: 5
|
||||
property bool activeIndicator: true
|
||||
property bool occupiedBg: false
|
||||
property bool showWindows: true
|
||||
property bool showWindowsOnSpecialWorkspaces: showWindows
|
||||
property int maxWindowIcons: 0 // 0 = unlimited
|
||||
property bool activeTrail: false
|
||||
property bool perMonitorWorkspaces: true
|
||||
property string label: " " // if empty, will show workspace name's first letter
|
||||
property string occupiedLabel: ""
|
||||
property string activeLabel: ""
|
||||
property string capitalisation: "preserve" // upper, lower, or preserve - relevant only if label is empty
|
||||
property list<var> specialWorkspaceIcons: []
|
||||
property list<var> windowIcons: [
|
||||
{
|
||||
regex: "steam(_app_(default|[0-9]+))?",
|
||||
icon: "sports_esports"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
component ActiveWindow: JsonObject {
|
||||
property bool compact: false
|
||||
property bool inverted: false
|
||||
property bool showOnHover: true
|
||||
}
|
||||
|
||||
component Tray: JsonObject {
|
||||
property bool background: false
|
||||
property bool recolour: false
|
||||
property bool compact: false
|
||||
property list<var> iconSubs: []
|
||||
property list<string> hiddenIcons: []
|
||||
}
|
||||
|
||||
component Status: JsonObject {
|
||||
property bool showAudio: false
|
||||
property bool showMicrophone: false
|
||||
property bool showKbLayout: false
|
||||
property bool showNetwork: true
|
||||
property bool showWifi: true
|
||||
property bool showBluetooth: true
|
||||
property bool showBattery: true
|
||||
property bool showLockStatus: true
|
||||
}
|
||||
|
||||
component Clock: JsonObject {
|
||||
property bool background: false
|
||||
property bool showDate: false
|
||||
property bool showIcon: true
|
||||
}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int innerWidth: 40
|
||||
property int windowPreviewSize: 400
|
||||
property int trayMenuWidth: 300
|
||||
property int batteryWidth: 250
|
||||
property int networkWidth: 320
|
||||
property int kbLayoutWidth: 320
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import Quickshell.Io
|
||||
import qs.config
|
||||
|
||||
JsonObject {
|
||||
property int thickness: Config.appearance.padding.normal
|
||||
property int rounding: Config.appearance.rounding.large
|
||||
|
||||
readonly property int minThickness: 2
|
||||
readonly property int clampedThickness: Math.max(minThickness, thickness)
|
||||
}
|
||||
|
|
@ -1,500 +0,0 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Caelestia
|
||||
import qs.utils
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property alias appearance: adapter.appearance
|
||||
property alias general: adapter.general
|
||||
property alias background: adapter.background
|
||||
property alias bar: adapter.bar
|
||||
property alias border: adapter.border
|
||||
property alias dashboard: adapter.dashboard
|
||||
property alias controlCenter: adapter.controlCenter
|
||||
property alias launcher: adapter.launcher
|
||||
property alias notifs: adapter.notifs
|
||||
property alias osd: adapter.osd
|
||||
property alias session: adapter.session
|
||||
property alias winfo: adapter.winfo
|
||||
property alias lock: adapter.lock
|
||||
property alias utilities: adapter.utilities
|
||||
property alias sidebar: adapter.sidebar
|
||||
property alias services: adapter.services
|
||||
property alias paths: adapter.paths
|
||||
|
||||
property bool recentlySaved: false
|
||||
|
||||
// Public save function - call this to persist config changes
|
||||
function save(): void {
|
||||
saveTimer.restart();
|
||||
recentlySaved = true;
|
||||
recentSaveCooldown.restart();
|
||||
}
|
||||
|
||||
// Helper function to serialize the config object
|
||||
function serializeConfig(): var {
|
||||
return {
|
||||
appearance: serializeAppearance(),
|
||||
general: serializeGeneral(),
|
||||
background: serializeBackground(),
|
||||
bar: serializeBar(),
|
||||
border: serializeBorder(),
|
||||
dashboard: serializeDashboard(),
|
||||
controlCenter: serializeControlCenter(),
|
||||
launcher: serializeLauncher(),
|
||||
notifs: serializeNotifs(),
|
||||
osd: serializeOsd(),
|
||||
session: serializeSession(),
|
||||
winfo: serializeWinfo(),
|
||||
lock: serializeLock(),
|
||||
utilities: serializeUtilities(),
|
||||
sidebar: serializeSidebar(),
|
||||
services: serializeServices(),
|
||||
paths: serializePaths()
|
||||
};
|
||||
}
|
||||
|
||||
function serializeAppearance(): var {
|
||||
return {
|
||||
rounding: {
|
||||
scale: appearance.rounding.scale
|
||||
},
|
||||
spacing: {
|
||||
scale: appearance.spacing.scale
|
||||
},
|
||||
padding: {
|
||||
scale: appearance.padding.scale
|
||||
},
|
||||
font: {
|
||||
family: {
|
||||
sans: appearance.font.family.sans,
|
||||
mono: appearance.font.family.mono,
|
||||
material: appearance.font.family.material,
|
||||
clock: appearance.font.family.clock
|
||||
},
|
||||
size: {
|
||||
scale: appearance.font.size.scale
|
||||
}
|
||||
},
|
||||
anim: {
|
||||
mediaGifSpeedAdjustment: 300,
|
||||
sessionGifSpeed: 0.7,
|
||||
durations: {
|
||||
scale: appearance.anim.durations.scale
|
||||
}
|
||||
},
|
||||
transparency: {
|
||||
enabled: appearance.transparency.enabled,
|
||||
base: appearance.transparency.base,
|
||||
layers: appearance.transparency.layers
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function serializeGeneral(): var {
|
||||
return {
|
||||
logo: general.logo,
|
||||
excludedScreens: general.excludedScreens,
|
||||
apps: {
|
||||
terminal: general.apps.terminal,
|
||||
audio: general.apps.audio,
|
||||
playback: general.apps.playback,
|
||||
explorer: general.apps.explorer
|
||||
},
|
||||
idle: {
|
||||
lockBeforeSleep: general.idle.lockBeforeSleep,
|
||||
inhibitWhenAudio: general.idle.inhibitWhenAudio,
|
||||
timeouts: general.idle.timeouts
|
||||
},
|
||||
battery: {
|
||||
warnLevels: general.battery.warnLevels,
|
||||
criticalLevel: general.battery.criticalLevel
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function serializeBackground(): var {
|
||||
return {
|
||||
enabled: background.enabled,
|
||||
wallpaperEnabled: background.wallpaperEnabled,
|
||||
desktopClock: {
|
||||
enabled: background.desktopClock.enabled,
|
||||
scale: background.desktopClock.scale,
|
||||
position: background.desktopClock.position,
|
||||
invertColors: background.desktopClock.invertColors,
|
||||
background: {
|
||||
enabled: background.desktopClock.background.enabled,
|
||||
opacity: background.desktopClock.background.opacity,
|
||||
blur: background.desktopClock.background.blur
|
||||
},
|
||||
shadow: {
|
||||
enabled: background.desktopClock.shadow.enabled,
|
||||
opacity: background.desktopClock.shadow.opacity,
|
||||
blur: background.desktopClock.shadow.blur
|
||||
}
|
||||
},
|
||||
visualiser: {
|
||||
enabled: background.visualiser.enabled,
|
||||
autoHide: background.visualiser.autoHide,
|
||||
blur: background.visualiser.blur,
|
||||
rounding: background.visualiser.rounding,
|
||||
spacing: background.visualiser.spacing
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function serializeBar(): var {
|
||||
return {
|
||||
persistent: bar.persistent,
|
||||
showOnHover: bar.showOnHover,
|
||||
dragThreshold: bar.dragThreshold,
|
||||
scrollActions: {
|
||||
workspaces: bar.scrollActions.workspaces,
|
||||
volume: bar.scrollActions.volume,
|
||||
brightness: bar.scrollActions.brightness
|
||||
},
|
||||
popouts: {
|
||||
activeWindow: bar.popouts.activeWindow,
|
||||
tray: bar.popouts.tray,
|
||||
statusIcons: bar.popouts.statusIcons
|
||||
},
|
||||
workspaces: {
|
||||
shown: bar.workspaces.shown,
|
||||
activeIndicator: bar.workspaces.activeIndicator,
|
||||
occupiedBg: bar.workspaces.occupiedBg,
|
||||
showWindows: bar.workspaces.showWindows,
|
||||
showWindowsOnSpecialWorkspaces: bar.workspaces.showWindowsOnSpecialWorkspaces,
|
||||
maxWindowIcons: bar.workspaces.maxWindowIcons,
|
||||
activeTrail: bar.workspaces.activeTrail,
|
||||
perMonitorWorkspaces: bar.workspaces.perMonitorWorkspaces,
|
||||
label: bar.workspaces.label,
|
||||
occupiedLabel: bar.workspaces.occupiedLabel,
|
||||
activeLabel: bar.workspaces.activeLabel,
|
||||
capitalisation: bar.workspaces.capitalisation,
|
||||
specialWorkspaceIcons: bar.workspaces.specialWorkspaceIcons,
|
||||
windowIcons: bar.workspaces.windowIcons
|
||||
},
|
||||
activeWindow: {
|
||||
compact: bar.activeWindow.compact,
|
||||
inverted: bar.activeWindow.inverted,
|
||||
showOnHover: bar.activeWindow.showOnHover
|
||||
},
|
||||
tray: {
|
||||
background: bar.tray.background,
|
||||
recolour: bar.tray.recolour,
|
||||
compact: bar.tray.compact,
|
||||
iconSubs: bar.tray.iconSubs,
|
||||
hiddenIcons: bar.tray.hiddenIcons
|
||||
},
|
||||
status: {
|
||||
showAudio: bar.status.showAudio,
|
||||
showMicrophone: bar.status.showMicrophone,
|
||||
showKbLayout: bar.status.showKbLayout,
|
||||
showNetwork: bar.status.showNetwork,
|
||||
showWifi: bar.status.showWifi,
|
||||
showBluetooth: bar.status.showBluetooth,
|
||||
showBattery: bar.status.showBattery,
|
||||
showLockStatus: bar.status.showLockStatus
|
||||
},
|
||||
clock: {
|
||||
background: bar.clock.background,
|
||||
showDate: bar.clock.showDate,
|
||||
showIcon: bar.clock.showIcon
|
||||
},
|
||||
entries: bar.entries,
|
||||
excludedScreens: bar.excludedScreens
|
||||
};
|
||||
}
|
||||
|
||||
function serializeBorder(): var {
|
||||
return {
|
||||
thickness: border.thickness,
|
||||
rounding: border.rounding
|
||||
};
|
||||
}
|
||||
|
||||
function serializeDashboard(): var {
|
||||
return {
|
||||
enabled: dashboard.enabled,
|
||||
showOnHover: dashboard.showOnHover,
|
||||
mediaUpdateInterval: dashboard.mediaUpdateInterval,
|
||||
resourceUpdateInterval: dashboard.resourceUpdateInterval,
|
||||
dragThreshold: dashboard.dragThreshold,
|
||||
performance: {
|
||||
showBattery: dashboard.performance.showBattery,
|
||||
showGpu: dashboard.performance.showGpu,
|
||||
showCpu: dashboard.performance.showCpu,
|
||||
showMemory: dashboard.performance.showMemory,
|
||||
showStorage: dashboard.performance.showStorage,
|
||||
showNetwork: dashboard.performance.showNetwork
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function serializeControlCenter(): var {
|
||||
return {};
|
||||
}
|
||||
|
||||
function serializeLauncher(): var {
|
||||
return {
|
||||
enabled: launcher.enabled,
|
||||
showOnHover: launcher.showOnHover,
|
||||
maxShown: launcher.maxShown,
|
||||
maxWallpapers: launcher.maxWallpapers,
|
||||
specialPrefix: launcher.specialPrefix,
|
||||
actionPrefix: launcher.actionPrefix,
|
||||
enableDangerousActions: launcher.enableDangerousActions,
|
||||
dragThreshold: launcher.dragThreshold,
|
||||
vimKeybinds: launcher.vimKeybinds,
|
||||
favouriteApps: launcher.favouriteApps,
|
||||
hiddenApps: launcher.hiddenApps,
|
||||
useFuzzy: {
|
||||
apps: launcher.useFuzzy.apps,
|
||||
actions: launcher.useFuzzy.actions,
|
||||
schemes: launcher.useFuzzy.schemes,
|
||||
variants: launcher.useFuzzy.variants,
|
||||
wallpapers: launcher.useFuzzy.wallpapers
|
||||
},
|
||||
actions: launcher.actions
|
||||
};
|
||||
}
|
||||
|
||||
function serializeNotifs(): var {
|
||||
return {
|
||||
expire: notifs.expire,
|
||||
fullscreen: notifs.fullscreen,
|
||||
defaultExpireTimeout: notifs.defaultExpireTimeout,
|
||||
clearThreshold: notifs.clearThreshold,
|
||||
expandThreshold: notifs.expandThreshold,
|
||||
actionOnClick: notifs.actionOnClick,
|
||||
groupPreviewNum: notifs.groupPreviewNum,
|
||||
openExpanded: notifs.openExpanded
|
||||
};
|
||||
}
|
||||
|
||||
function serializeOsd(): var {
|
||||
return {
|
||||
enabled: osd.enabled,
|
||||
hideDelay: osd.hideDelay,
|
||||
enableBrightness: osd.enableBrightness,
|
||||
enableMicrophone: osd.enableMicrophone
|
||||
};
|
||||
}
|
||||
|
||||
function serializeSession(): var {
|
||||
return {
|
||||
enabled: session.enabled,
|
||||
dragThreshold: session.dragThreshold,
|
||||
vimKeybinds: session.vimKeybinds,
|
||||
icons: {
|
||||
logout: session.icons.logout,
|
||||
shutdown: session.icons.shutdown,
|
||||
hibernate: session.icons.hibernate,
|
||||
reboot: session.icons.reboot
|
||||
},
|
||||
commands: {
|
||||
logout: session.commands.logout,
|
||||
shutdown: session.commands.shutdown,
|
||||
hibernate: session.commands.hibernate,
|
||||
reboot: session.commands.reboot
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function serializeWinfo(): var {
|
||||
return {};
|
||||
}
|
||||
|
||||
function serializeLock(): var {
|
||||
return {
|
||||
recolourLogo: lock.recolourLogo,
|
||||
enableFprint: lock.enableFprint,
|
||||
maxFprintTries: lock.maxFprintTries,
|
||||
hideNotifs: lock.hideNotifs
|
||||
};
|
||||
}
|
||||
|
||||
function serializeUtilities(): var {
|
||||
const vpnProviders = [];
|
||||
for (let i = 0; i < utilities.vpn.provider.length; i++) {
|
||||
const p = utilities.vpn.provider[i];
|
||||
const provider = {
|
||||
displayName: p.displayName,
|
||||
enabled: p.enabled,
|
||||
interface: p.interface,
|
||||
name: p.name
|
||||
};
|
||||
if (p.connectCmd && p.connectCmd.length > 0) {
|
||||
provider.connectCmd = p.connectCmd;
|
||||
}
|
||||
if (p.disconnectCmd && p.disconnectCmd.length > 0) {
|
||||
provider.disconnectCmd = p.disconnectCmd;
|
||||
}
|
||||
vpnProviders.push(provider);
|
||||
}
|
||||
|
||||
return {
|
||||
enabled: utilities.enabled,
|
||||
maxToasts: utilities.maxToasts,
|
||||
toasts: {
|
||||
configLoaded: utilities.toasts.configLoaded,
|
||||
fullscreen: utilities.toasts.fullscreen,
|
||||
chargingChanged: utilities.toasts.chargingChanged,
|
||||
gameModeChanged: utilities.toasts.gameModeChanged,
|
||||
dndChanged: utilities.toasts.dndChanged,
|
||||
audioOutputChanged: utilities.toasts.audioOutputChanged,
|
||||
audioInputChanged: utilities.toasts.audioInputChanged,
|
||||
capsLockChanged: utilities.toasts.capsLockChanged,
|
||||
numLockChanged: utilities.toasts.numLockChanged,
|
||||
kbLayoutChanged: utilities.toasts.kbLayoutChanged,
|
||||
vpnChanged: utilities.toasts.vpnChanged,
|
||||
nowPlaying: utilities.toasts.nowPlaying
|
||||
},
|
||||
vpn: {
|
||||
enabled: utilities.vpn.enabled,
|
||||
provider: vpnProviders
|
||||
},
|
||||
quickToggles: utilities.quickToggles
|
||||
};
|
||||
}
|
||||
|
||||
function serializeSidebar(): var {
|
||||
return {
|
||||
enabled: sidebar.enabled,
|
||||
dragThreshold: sidebar.dragThreshold
|
||||
};
|
||||
}
|
||||
|
||||
function serializeServices(): var {
|
||||
return {
|
||||
weatherLocation: services.weatherLocation,
|
||||
useFahrenheit: services.useFahrenheit,
|
||||
useFahrenheitPerformance: services.useFahrenheitPerformance,
|
||||
useTwelveHourClock: services.useTwelveHourClock,
|
||||
gpuType: services.gpuType,
|
||||
visualiserBars: services.visualiserBars,
|
||||
audioIncrement: services.audioIncrement,
|
||||
brightnessIncrement: services.brightnessIncrement,
|
||||
maxVolume: services.maxVolume,
|
||||
smartScheme: services.smartScheme,
|
||||
defaultPlayer: services.defaultPlayer,
|
||||
playerAliases: services.playerAliases,
|
||||
showLyrics: services.showLyrics,
|
||||
lyricsBackend: services.lyricsBackend
|
||||
};
|
||||
}
|
||||
|
||||
function serializePaths(): var {
|
||||
return {
|
||||
wallpaperDir: paths.wallpaperDir,
|
||||
lyricsDir: paths.lyricsDir,
|
||||
sessionGif: paths.sessionGif,
|
||||
mediaGif: paths.mediaGif,
|
||||
noNotifsPic: paths.noNotifsPic,
|
||||
lockNoNotifsPic: paths.lockNoNotifsPic
|
||||
};
|
||||
}
|
||||
|
||||
ElapsedTimer {
|
||||
id: timer
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: saveTimer
|
||||
|
||||
interval: 500
|
||||
onTriggered: {
|
||||
timer.restart();
|
||||
try {
|
||||
// Parse current config to preserve structure and comments if possible
|
||||
let config = {};
|
||||
try {
|
||||
config = JSON.parse(fileView.text());
|
||||
} catch (e) {
|
||||
// If parsing fails, start with empty object
|
||||
config = {};
|
||||
}
|
||||
|
||||
// Update config with current values
|
||||
config = root.serializeConfig();
|
||||
|
||||
// Save to file with pretty printing
|
||||
fileView.setText(JSON.stringify(config, null, 2));
|
||||
} catch (e) {
|
||||
Toaster.toast(qsTr("Failed to serialize config"), e.message, "settings_alert", Toast.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: recentSaveCooldown
|
||||
|
||||
interval: 2000
|
||||
onTriggered: {
|
||||
root.recentlySaved = false;
|
||||
}
|
||||
}
|
||||
|
||||
FileView {
|
||||
id: fileView
|
||||
|
||||
path: `${Paths.config}/shell.json`
|
||||
watchChanges: true
|
||||
onFileChanged: {
|
||||
// Prevent reload loop - don't reload if we just saved
|
||||
if (!root.recentlySaved) {
|
||||
timer.restart();
|
||||
reload();
|
||||
} else {
|
||||
// Self-initiated save - reload without toast
|
||||
reload();
|
||||
}
|
||||
}
|
||||
onLoaded: {
|
||||
try {
|
||||
JSON.parse(text());
|
||||
const elapsed = timer.elapsedMs();
|
||||
// Only show toast for external changes (not our own saves) and when elapsed time is meaningful
|
||||
if (adapter.utilities.toasts.configLoaded && !root.recentlySaved && elapsed > 0) { // qmllint disable unresolved-type
|
||||
Toaster.toast(qsTr("Config loaded"), qsTr("Config loaded in %1ms").arg(elapsed), "rule_settings"); // qmllint disable unresolved-type
|
||||
} else if (adapter.utilities.toasts.configLoaded && root.recentlySaved && elapsed > 0) { // qmllint disable unresolved-type
|
||||
Toaster.toast(qsTr("Config saved"), qsTr("Config reloaded in %1ms").arg(elapsed), "rule_settings");
|
||||
}
|
||||
} catch (e) {
|
||||
Toaster.toast(qsTr("Failed to load config"), e.message, "settings_alert", Toast.Error);
|
||||
}
|
||||
}
|
||||
onLoadFailed: err => {
|
||||
if (err !== FileViewError.FileNotFound)
|
||||
Toaster.toast(qsTr("Failed to read config file"), FileViewError.toString(err), "settings_alert", Toast.Warning);
|
||||
}
|
||||
onSaveFailed: err => Toaster.toast(qsTr("Failed to save config"), FileViewError.toString(err), "settings_alert", Toast.Error)
|
||||
|
||||
JsonAdapter { // qmllint disable unresolved-type
|
||||
id: adapter
|
||||
|
||||
property AppearanceConfig appearance: AppearanceConfig {}
|
||||
property GeneralConfig general: GeneralConfig {}
|
||||
property BackgroundConfig background: BackgroundConfig {}
|
||||
property BarConfig bar: BarConfig {}
|
||||
property BorderConfig border: BorderConfig {}
|
||||
property DashboardConfig dashboard: DashboardConfig {}
|
||||
property ControlCenterConfig controlCenter: ControlCenterConfig {}
|
||||
property LauncherConfig launcher: LauncherConfig {}
|
||||
property NotifsConfig notifs: NotifsConfig {}
|
||||
property OsdConfig osd: OsdConfig {}
|
||||
property SessionConfig session: SessionConfig {}
|
||||
property WInfoConfig winfo: WInfoConfig {}
|
||||
property LockConfig lock: LockConfig {}
|
||||
property UtilitiesConfig utilities: UtilitiesConfig {}
|
||||
property SidebarConfig sidebar: SidebarConfig {}
|
||||
property ServiceConfig services: ServiceConfig {}
|
||||
property UserPaths paths: UserPaths {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property real heightMult: 0.7
|
||||
property real ratio: 16 / 9
|
||||
}
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property bool showOnHover: true
|
||||
property int mediaUpdateInterval: 500
|
||||
property int resourceUpdateInterval: 1000
|
||||
property int dragThreshold: 50
|
||||
property bool showDashboard: true
|
||||
property bool showMedia: true
|
||||
property bool showPerformance: true
|
||||
property bool showWeather: true
|
||||
property Sizes sizes: Sizes {}
|
||||
property Performance performance: Performance {}
|
||||
|
||||
component Performance: JsonObject {
|
||||
property bool showBattery: true
|
||||
property bool showGpu: true
|
||||
property bool showCpu: true
|
||||
property bool showMemory: true
|
||||
property bool showStorage: true
|
||||
property bool showNetwork: true
|
||||
}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
readonly property int tabIndicatorHeight: 3
|
||||
readonly property int tabIndicatorSpacing: 5
|
||||
readonly property int infoWidth: 200
|
||||
readonly property int infoIconSize: 25
|
||||
readonly property int dateTimeWidth: 110
|
||||
readonly property int mediaWidth: 200
|
||||
readonly property int mediaProgressSweep: 180
|
||||
readonly property int mediaProgressThickness: 8
|
||||
readonly property int resourceProgessThickness: 10
|
||||
readonly property int weatherWidth: 250
|
||||
readonly property int mediaCoverArtSize: 150
|
||||
readonly property int mediaVisualiserSize: 80
|
||||
readonly property int resourceSize: 200
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property string logo: ""
|
||||
property list<string> excludedScreens: []
|
||||
property Apps apps: Apps {}
|
||||
property Idle idle: Idle {}
|
||||
property Battery battery: Battery {}
|
||||
|
||||
component Apps: JsonObject {
|
||||
property list<string> terminal: ["foot"]
|
||||
property list<string> audio: ["pavucontrol"]
|
||||
property list<string> playback: ["mpv"]
|
||||
property list<string> explorer: ["thunar"]
|
||||
}
|
||||
|
||||
component Idle: JsonObject {
|
||||
property bool lockBeforeSleep: true
|
||||
property bool inhibitWhenAudio: true
|
||||
property list<var> timeouts: [
|
||||
{
|
||||
timeout: 180,
|
||||
idleAction: "lock"
|
||||
},
|
||||
{
|
||||
timeout: 300,
|
||||
idleAction: "dpms off",
|
||||
returnAction: "dpms on"
|
||||
},
|
||||
{
|
||||
timeout: 600,
|
||||
idleAction: ["systemctl", "suspend-then-hibernate"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
component Battery: JsonObject {
|
||||
property list<var> warnLevels: [
|
||||
{
|
||||
level: 20,
|
||||
title: qsTr("Low battery"),
|
||||
message: qsTr("You might want to plug in a charger"),
|
||||
icon: "battery_android_frame_2"
|
||||
},
|
||||
{
|
||||
level: 10,
|
||||
title: qsTr("Did you see the previous message?"),
|
||||
message: qsTr("You should probably plug in a charger <b>now</b>"),
|
||||
icon: "battery_android_frame_1"
|
||||
},
|
||||
{
|
||||
level: 5,
|
||||
title: qsTr("Critical battery level"),
|
||||
message: qsTr("PLUG THE CHARGER RIGHT NOW!!"),
|
||||
icon: "battery_android_alert",
|
||||
critical: true
|
||||
},
|
||||
]
|
||||
property int criticalLevel: 3
|
||||
}
|
||||
}
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property bool showOnHover: false
|
||||
property int maxShown: 7
|
||||
property int maxWallpapers: 9 // Warning: even numbers look bad
|
||||
property string specialPrefix: "@"
|
||||
property string actionPrefix: ">"
|
||||
property bool enableDangerousActions: false // Allow actions that can cause losing data, like shutdown, reboot and logout
|
||||
property int dragThreshold: 50
|
||||
property bool vimKeybinds: false
|
||||
property list<string> favouriteApps: []
|
||||
property list<string> hiddenApps: []
|
||||
property UseFuzzy useFuzzy: UseFuzzy {}
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
property list<var> actions: [
|
||||
{
|
||||
name: "Calculator",
|
||||
icon: "calculate",
|
||||
description: "Do simple math equations (powered by Qalc)",
|
||||
command: ["autocomplete", "calc"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Scheme",
|
||||
icon: "palette",
|
||||
description: "Change the current colour scheme",
|
||||
command: ["autocomplete", "scheme"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Wallpaper",
|
||||
icon: "image",
|
||||
description: "Change the current wallpaper",
|
||||
command: ["autocomplete", "wallpaper"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Variant",
|
||||
icon: "colors",
|
||||
description: "Change the current scheme variant",
|
||||
command: ["autocomplete", "variant"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Transparency",
|
||||
icon: "opacity",
|
||||
description: "Change shell transparency",
|
||||
command: ["autocomplete", "transparency"],
|
||||
enabled: false,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Random",
|
||||
icon: "casino",
|
||||
description: "Switch to a random wallpaper",
|
||||
command: ["caelestia", "wallpaper", "-r"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Light",
|
||||
icon: "light_mode",
|
||||
description: "Change the scheme to light mode",
|
||||
command: ["setMode", "light"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Dark",
|
||||
icon: "dark_mode",
|
||||
description: "Change the scheme to dark mode",
|
||||
command: ["setMode", "dark"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Shutdown",
|
||||
icon: "power_settings_new",
|
||||
description: "Shutdown the system",
|
||||
command: ["systemctl", "poweroff"],
|
||||
enabled: true,
|
||||
dangerous: true
|
||||
},
|
||||
{
|
||||
name: "Reboot",
|
||||
icon: "cached",
|
||||
description: "Reboot the system",
|
||||
command: ["systemctl", "reboot"],
|
||||
enabled: true,
|
||||
dangerous: true
|
||||
},
|
||||
{
|
||||
name: "Logout",
|
||||
icon: "exit_to_app",
|
||||
description: "Log out of the current session",
|
||||
command: ["loginctl", "terminate-user", ""],
|
||||
enabled: true,
|
||||
dangerous: true
|
||||
},
|
||||
{
|
||||
name: "Lock",
|
||||
icon: "lock",
|
||||
description: "Lock the current session",
|
||||
command: ["loginctl", "lock-session"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Sleep",
|
||||
icon: "bedtime",
|
||||
description: "Suspend then hibernate",
|
||||
command: ["systemctl", "suspend-then-hibernate"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
},
|
||||
{
|
||||
name: "Settings",
|
||||
icon: "settings",
|
||||
description: "Configure the shell",
|
||||
command: ["caelestia", "shell", "controlCenter", "open"],
|
||||
enabled: true,
|
||||
dangerous: false
|
||||
}
|
||||
]
|
||||
|
||||
component UseFuzzy: JsonObject {
|
||||
property bool apps: false
|
||||
property bool actions: false
|
||||
property bool schemes: false
|
||||
property bool variants: false
|
||||
property bool wallpapers: false
|
||||
}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int itemWidth: 600
|
||||
property int itemHeight: 57
|
||||
property int wallpaperWidth: 280
|
||||
property int wallpaperHeight: 200
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool recolourLogo: false
|
||||
property bool enableFprint: true
|
||||
property int maxFprintTries: 3
|
||||
property bool hideNotifs: false
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property real heightMult: 0.7
|
||||
property real ratio: 16 / 9
|
||||
property int centerWidth: 600
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool expire: true
|
||||
property string fullscreen: "on"
|
||||
property int defaultExpireTimeout: 5000
|
||||
property real clearThreshold: 0.3
|
||||
property int expandThreshold: 20
|
||||
property bool actionOnClick: false
|
||||
property int groupPreviewNum: 3
|
||||
property bool openExpanded: false // Show the notifichation in expanded state when opening
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int width: 400
|
||||
property int image: 41
|
||||
property int badge: 20
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property int hideDelay: 2000
|
||||
property bool enableBrightness: true
|
||||
property bool enableMicrophone: false
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int sliderWidth: 30
|
||||
property int sliderHeight: 150
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
import QtQuick
|
||||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property string weatherLocation: "" // A lat,long pair or empty for autodetection, e.g. "37.8267,-122.4233"
|
||||
property bool useFahrenheit: [Locale.ImperialUSSystem, Locale.ImperialSystem].includes(Qt.locale().measurementSystem)
|
||||
property bool useFahrenheitPerformance: [Locale.ImperialUSSystem, Locale.ImperialSystem].includes(Qt.locale().measurementSystem)
|
||||
property bool useTwelveHourClock: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().includes("a")
|
||||
property string gpuType: ""
|
||||
property int visualiserBars: 45
|
||||
property real audioIncrement: 0.1
|
||||
property real brightnessIncrement: 0.1
|
||||
property real maxVolume: 1.0
|
||||
property bool smartScheme: true
|
||||
property string defaultPlayer: "Spotify"
|
||||
property list<var> playerAliases: [
|
||||
{
|
||||
"from": "com.github.th_ch.youtube_music",
|
||||
"to": "YT Music"
|
||||
}
|
||||
]
|
||||
property bool showLyrics: false
|
||||
property string lyricsBackend: "Auto"
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property int dragThreshold: 30
|
||||
property bool vimKeybinds: false
|
||||
property Icons icons: Icons {}
|
||||
property Commands commands: Commands {}
|
||||
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Icons: JsonObject {
|
||||
property string logout: "logout"
|
||||
property string shutdown: "power_settings_new"
|
||||
property string hibernate: "downloading"
|
||||
property string reboot: "cached"
|
||||
}
|
||||
|
||||
component Commands: JsonObject {
|
||||
property list<string> logout: ["loginctl", "terminate-user", ""]
|
||||
property list<string> shutdown: ["systemctl", "poweroff"]
|
||||
property list<string> hibernate: ["systemctl", "hibernate"]
|
||||
property list<string> reboot: ["systemctl", "reboot"]
|
||||
}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int button: 80
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property int dragThreshold: 80
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int width: 430
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import Quickshell.Io
|
||||
import qs.utils
|
||||
|
||||
JsonObject {
|
||||
property string wallpaperDir: `${Paths.pictures}/Wallpapers`
|
||||
property string lyricsDir: `${Paths.home}/Music/lyrics/`
|
||||
property string sessionGif: "root:/assets/kurukuru.gif"
|
||||
property string mediaGif: "root:/assets/bongocat.gif"
|
||||
property string noNotifsPic: "root:/assets/dino.png"
|
||||
property string lockNoNotifsPic: "root:/assets/dino.png"
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property bool enabled: true
|
||||
property int maxToasts: 4
|
||||
|
||||
property Sizes sizes: Sizes {}
|
||||
property Toasts toasts: Toasts {}
|
||||
property Vpn vpn: Vpn {}
|
||||
|
||||
property list<var> quickToggles: [
|
||||
{
|
||||
id: "wifi",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "bluetooth",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "mic",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "settings",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "gameMode",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "dnd",
|
||||
enabled: true
|
||||
},
|
||||
{
|
||||
id: "vpn",
|
||||
enabled: false
|
||||
}
|
||||
]
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property int width: 430
|
||||
property int toastWidth: 430
|
||||
}
|
||||
|
||||
component Toasts: JsonObject {
|
||||
property bool configLoaded: true
|
||||
property string fullscreen: "off"
|
||||
property bool chargingChanged: true
|
||||
property bool gameModeChanged: true
|
||||
property bool dndChanged: true
|
||||
property bool audioOutputChanged: true
|
||||
property bool audioInputChanged: true
|
||||
property bool capsLockChanged: true
|
||||
property bool numLockChanged: true
|
||||
property bool kbLayoutChanged: true
|
||||
property bool kbLimit: true
|
||||
property bool vpnChanged: true
|
||||
property bool nowPlaying: false
|
||||
}
|
||||
|
||||
component Vpn: JsonObject {
|
||||
property bool enabled: false
|
||||
property list<var> provider: []
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
property real heightMult: 0.7
|
||||
property real detailsWidth: 500
|
||||
}
|
||||
}
|
||||
|
|
@ -2,20 +2,20 @@ import QtQuick
|
|||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
import Caelestia
|
||||
import qs.config
|
||||
import Caelestia.Config
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
readonly property list<var> warnLevels: [...Config.general.battery.warnLevels].sort((a, b) => b.level - a.level)
|
||||
readonly property list<var> warnLevels: [...GlobalConfig.general.battery.warnLevels].sort((a, b) => b.level - a.level)
|
||||
|
||||
Connections {
|
||||
function onOnBatteryChanged(): void {
|
||||
if (UPower.onBattery) {
|
||||
if (Config.utilities.toasts.chargingChanged)
|
||||
if (GlobalConfig.utilities.toasts.chargingChanged)
|
||||
Toaster.toast(qsTr("Charger unplugged"), qsTr("Battery is discharging"), "power_off");
|
||||
} else {
|
||||
if (Config.utilities.toasts.chargingChanged)
|
||||
if (GlobalConfig.utilities.toasts.chargingChanged)
|
||||
Toaster.toast(qsTr("Charger plugged in"), qsTr("Battery is charging"), "power");
|
||||
for (const level of root.warnLevels)
|
||||
level.warned = false;
|
||||
|
|
@ -38,7 +38,7 @@ Scope {
|
|||
}
|
||||
}
|
||||
|
||||
if (!hibernateTimer.running && p <= Config.general.battery.criticalLevel) {
|
||||
if (!hibernateTimer.running && p <= GlobalConfig.general.battery.criticalLevel) {
|
||||
Toaster.toast(qsTr("Hibernating in 5 seconds"), qsTr("Hibernating to prevent data loss"), "battery_android_alert", Toast.Error);
|
||||
hibernateTimer.start();
|
||||
}
|
||||
|
|
|
|||
39
modules/ConfigToasts.qml
Normal file
39
modules/ConfigToasts.qml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Caelestia
|
||||
import Caelestia.Config
|
||||
|
||||
Scope {
|
||||
Connections {
|
||||
function onLoaded(): void {
|
||||
if (GlobalConfig.utilities.toasts.configLoaded)
|
||||
Toaster.toast(qsTr("Config loaded"), qsTr("Config loaded successfully!"), "rule_settings");
|
||||
}
|
||||
|
||||
function onLoadFailed(error: string, screen: string): void {
|
||||
Toaster.toast(qsTr("Failed to parse config%1").arg(screen ? " for " + screen : ""), error, "settings_alert", Toast.Warning);
|
||||
}
|
||||
|
||||
function onSaveFailed(error: string, screen: string): void {
|
||||
Toaster.toast(qsTr("Failed to save config%1").arg(screen ? " for " + screen : ""), error, "settings_alert", Toast.Error);
|
||||
}
|
||||
|
||||
function onUnknownOption(key: string, screen: string): void {
|
||||
Toaster.toast(qsTr("Unknown option in%1 config").arg(screen ? " " + screen : ""), key, "question_mark", Toast.Warning);
|
||||
}
|
||||
|
||||
target: GlobalConfig
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onLoadFailed(error: string, screen: string): void {
|
||||
Toaster.toast(qsTr("Failed to parse token config%1").arg(screen ? "for " + screen : ""), error, "settings_alert", Toast.Warning);
|
||||
}
|
||||
|
||||
function onUnknownOption(key: string, screen: string): void {
|
||||
Toaster.toast(qsTr("Unknown option in%1 token config").arg(screen ? " " + screen : ""), key, "question_mark", Toast.Warning);
|
||||
}
|
||||
|
||||
target: TokenConfig
|
||||
}
|
||||
}
|
||||
|
|
@ -3,15 +3,15 @@ pragma ComponentBehavior: Bound
|
|||
import "lock"
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Caelestia.Config
|
||||
import Caelestia.Internal
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
required property Lock lock
|
||||
readonly property bool enabled: !Config.general.idle.inhibitWhenAudio || !Players.list.some(p => p.isPlaying)
|
||||
readonly property bool enabled: !GlobalConfig.general.idle.inhibitWhenAudio || !Players.list.some(p => p.isPlaying)
|
||||
|
||||
function handleIdleAction(action: var): void {
|
||||
if (!action)
|
||||
|
|
@ -29,7 +29,7 @@ Scope {
|
|||
|
||||
LogindManager {
|
||||
onAboutToSleep: {
|
||||
if (Config.general.idle.lockBeforeSleep)
|
||||
if (GlobalConfig.general.idle.lockBeforeSleep)
|
||||
root.lock.lock.locked = true;
|
||||
}
|
||||
onLockRequested: root.lock.lock.locked = true
|
||||
|
|
@ -37,7 +37,7 @@ Scope {
|
|||
}
|
||||
|
||||
Variants {
|
||||
model: Config.general.idle.timeouts
|
||||
model: GlobalConfig.general.idle.timeouts
|
||||
|
||||
IdleMonitor {
|
||||
required property var modelData
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import Quickshell
|
|||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Caelestia
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
|
@ -167,7 +167,7 @@ MouseArea {
|
|||
target: root
|
||||
property: "opacity"
|
||||
to: 0
|
||||
duration: Appearance.anim.durations.large
|
||||
duration: Tokens.anim.durations.large
|
||||
}
|
||||
ExAnim {
|
||||
target: root
|
||||
|
|
@ -278,7 +278,7 @@ MouseArea {
|
|||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.large
|
||||
duration: Tokens.anim.durations.large
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ MouseArea {
|
|||
}
|
||||
|
||||
component ExAnim: Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Caelestia.Config
|
||||
import qs.components.containers
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Variants {
|
||||
model: Config.background.enabled ? Screens.screens : []
|
||||
model: Screens.screens.filter(s => GlobalConfig.forScreen(s.name).background.enabled)
|
||||
|
||||
StyledWindow {
|
||||
id: win
|
||||
|
|
@ -18,8 +18,8 @@ Variants {
|
|||
screen: modelData
|
||||
name: "background"
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: Config.background.wallpaperEnabled ? WlrLayer.Background : WlrLayer.Bottom
|
||||
color: Config.background.wallpaperEnabled ? "black" : "transparent"
|
||||
WlrLayershell.layer: contentItem.Config.background.wallpaperEnabled ? WlrLayer.Background : WlrLayer.Bottom
|
||||
color: contentItem.Config.background.wallpaperEnabled ? "black" : "transparent"
|
||||
surfaceFormat.opaque: false
|
||||
|
||||
anchors.top: true
|
||||
|
|
@ -56,8 +56,8 @@ Variants {
|
|||
asynchronous: true
|
||||
active: Config.background.desktopClock.enabled
|
||||
|
||||
anchors.margins: Appearance.padding.large * 2
|
||||
anchors.leftMargin: Appearance.padding.large * 2 + Config.bar.sizes.innerWidth + Math.max(Appearance.padding.smaller, Config.border.thickness)
|
||||
anchors.margins: Tokens.padding.large * 2
|
||||
anchors.leftMargin: Tokens.padding.large * 2 + Tokens.sizes.bar.innerWidth + Math.max(Tokens.padding.smaller, Config.border.thickness)
|
||||
|
||||
state: Config.background.desktopClock.position
|
||||
states: [
|
||||
|
|
@ -146,8 +146,8 @@ Variants {
|
|||
|
||||
transitions: Transition {
|
||||
AnchorAnimation {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -23,8 +23,8 @@ Item {
|
|||
readonly property color safeSecondary: useLightSet ? Colours.palette.m3secondaryContainer : Colours.palette.m3secondary
|
||||
readonly property color safeTertiary: useLightSet ? Colours.palette.m3tertiaryContainer : Colours.palette.m3tertiary
|
||||
|
||||
implicitWidth: layout.implicitWidth + (Appearance.padding.large * 4 * root.clockScale)
|
||||
implicitHeight: layout.implicitHeight + (Appearance.padding.large * 2 * root.clockScale)
|
||||
implicitWidth: layout.implicitWidth + (Tokens.padding.large * 4 * root.clockScale)
|
||||
implicitHeight: layout.implicitHeight + (Tokens.padding.large * 2 * root.clockScale)
|
||||
|
||||
Item {
|
||||
id: clockContainer
|
||||
|
|
@ -63,7 +63,7 @@ Item {
|
|||
|
||||
visible: root.bgEnabled
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.large * root.clockScale
|
||||
radius: Tokens.rounding.large * root.clockScale
|
||||
opacity: Config.background.desktopClock.background.opacity
|
||||
color: Colours.palette.m3surface
|
||||
|
||||
|
|
@ -74,29 +74,29 @@ Item {
|
|||
id: layout
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.larger * root.clockScale
|
||||
spacing: Tokens.spacing.larger * root.clockScale
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
StyledText {
|
||||
text: Time.hourStr
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
||||
font.weight: Font.Bold
|
||||
color: root.safePrimary
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: ":"
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
||||
color: root.safeTertiary
|
||||
opacity: 0.8
|
||||
Layout.topMargin: -Appearance.padding.large * 1.5 * root.clockScale
|
||||
Layout.topMargin: -Tokens.padding.large * 1.5 * root.clockScale
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: Time.minuteStr
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
font.pointSize: Tokens.font.size.extraLarge * 3 * root.clockScale
|
||||
font.weight: Font.Bold
|
||||
color: root.safeSecondary
|
||||
}
|
||||
|
|
@ -104,14 +104,14 @@ Item {
|
|||
Loader {
|
||||
asynchronous: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.topMargin: Appearance.padding.large * 1.4 * root.clockScale
|
||||
Layout.topMargin: Tokens.padding.large * 1.4 * root.clockScale
|
||||
|
||||
active: Config.services.useTwelveHourClock
|
||||
active: GlobalConfig.services.useTwelveHourClock
|
||||
visible: active
|
||||
|
||||
sourceComponent: StyledText {
|
||||
text: Time.amPmStr
|
||||
font.pointSize: Appearance.font.size.large * root.clockScale
|
||||
font.pointSize: Tokens.font.size.large * root.clockScale
|
||||
color: root.safeSecondary
|
||||
}
|
||||
}
|
||||
|
|
@ -120,9 +120,9 @@ Item {
|
|||
StyledRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 4 * root.clockScale
|
||||
Layout.topMargin: Appearance.spacing.larger * root.clockScale
|
||||
Layout.bottomMargin: Appearance.spacing.larger * root.clockScale
|
||||
radius: Appearance.rounding.full
|
||||
Layout.topMargin: Tokens.spacing.larger * root.clockScale
|
||||
Layout.bottomMargin: Tokens.spacing.larger * root.clockScale
|
||||
radius: Tokens.rounding.full
|
||||
color: root.safePrimary
|
||||
opacity: 0.8
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("MMMM").toUpperCase()
|
||||
font.pointSize: Appearance.font.size.large * root.clockScale
|
||||
font.pointSize: Tokens.font.size.large * root.clockScale
|
||||
font.letterSpacing: 4
|
||||
font.weight: Font.Bold
|
||||
color: root.safeSecondary
|
||||
|
|
@ -140,7 +140,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("dd")
|
||||
font.pointSize: Appearance.font.size.extraLarge * root.clockScale
|
||||
font.pointSize: Tokens.font.size.extraLarge * root.clockScale
|
||||
font.letterSpacing: 2
|
||||
font.weight: Font.Medium
|
||||
color: root.safePrimary
|
||||
|
|
@ -148,7 +148,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("dddd")
|
||||
font.pointSize: Appearance.font.size.larger * root.clockScale
|
||||
font.pointSize: Tokens.font.size.larger * root.clockScale
|
||||
font.letterSpacing: 2
|
||||
color: root.safeSecondary
|
||||
}
|
||||
|
|
@ -158,14 +158,14 @@ Item {
|
|||
|
||||
Behavior on clockScale {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import Caelestia.Internal
|
||||
import Caelestia.Services
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -60,14 +60,14 @@ Item {
|
|||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Config.border.thickness
|
||||
anchors.leftMargin: Visibilities.bars.get(root.screen).exclusiveZone + Appearance.spacing.small * Config.background.visualiser.spacing
|
||||
anchors.leftMargin: Visibilities.bars.get(root.screen).exclusiveZone + Tokens.spacing.small * Config.background.visualiser.spacing
|
||||
|
||||
values: Audio.cava.values
|
||||
primaryColor: Qt.alpha(Colours.palette.m3primary, 0.7)
|
||||
secondaryColor: Qt.alpha(Colours.palette.m3inversePrimary, 0.7)
|
||||
rounding: Appearance.rounding.small * Config.background.visualiser.rounding
|
||||
spacing: Appearance.spacing.small * Config.background.visualiser.spacing
|
||||
animationDuration: Appearance.anim.durations.normal
|
||||
rounding: Tokens.rounding.small * Config.background.visualiser.rounding
|
||||
spacing: Tokens.spacing.small * Config.background.visualiser.spacing
|
||||
animationDuration: Tokens.anim.durations.normal
|
||||
|
||||
Behavior on anchors.leftMargin {
|
||||
Anim {}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.filedialog
|
||||
import qs.components.images
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
|
|
@ -43,30 +43,30 @@ Item {
|
|||
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.large
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
MaterialIcon {
|
||||
text: "sentiment_stressed"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.extraLarge * 5
|
||||
font.pointSize: Tokens.font.size.extraLarge * 5
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Wallpaper missing?")
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.extraLarge * 2
|
||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
implicitWidth: selectWallText.implicitWidth + Appearance.padding.large * 2
|
||||
implicitHeight: selectWallText.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: selectWallText.implicitWidth + Tokens.padding.large * 2
|
||||
implicitHeight: selectWallText.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Colours.palette.m3primary
|
||||
|
||||
FileDialog {
|
||||
|
|
@ -94,7 +94,7 @@ Item {
|
|||
|
||||
text: qsTr("Set it now!")
|
||||
color: Colours.palette.m3onPrimary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import "components/workspaces"
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -17,7 +17,7 @@ ColumnLayout {
|
|||
required property DrawerVisibilities visibilities
|
||||
required property BarPopouts.Wrapper popouts
|
||||
required property bool fullscreen
|
||||
readonly property int vPadding: Appearance.padding.large
|
||||
readonly property int vPadding: Tokens.padding.large
|
||||
|
||||
function closeTray(): void {
|
||||
if (!Config.bar.tray.compact)
|
||||
|
|
@ -80,11 +80,11 @@ ColumnLayout {
|
|||
const ch = childAt(width / 2, y) as WrappedLoader;
|
||||
if (ch?.id === "workspaces" && Config.bar.scrollActions.workspaces) {
|
||||
// Workspace scroll
|
||||
const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor);
|
||||
const mon = (GlobalConfig.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor);
|
||||
const specialWs = mon?.lastIpcObject.specialWorkspace.name;
|
||||
if (specialWs?.length > 0)
|
||||
Hypr.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`);
|
||||
else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hypr.activeWsId) > 1)
|
||||
else if (angleDelta.y < 0 || (GlobalConfig.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hypr.activeWsId) > 1)
|
||||
Hypr.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`);
|
||||
} else if (y < screen.height / 2 && Config.bar.scrollActions.volume) {
|
||||
// Volume scroll on top half
|
||||
|
|
@ -96,13 +96,13 @@ ColumnLayout {
|
|||
// Brightness scroll on bottom half
|
||||
const monitor = Brightness.getMonitorForScreen(screen);
|
||||
if (angleDelta.y > 0)
|
||||
monitor.setBrightness(monitor.brightness + Config.services.brightnessIncrement);
|
||||
monitor.setBrightness(monitor.brightness + GlobalConfig.services.brightnessIncrement);
|
||||
else if (angleDelta.y < 0)
|
||||
monitor.setBrightness(monitor.brightness - Config.services.brightnessIncrement);
|
||||
monitor.setBrightness(monitor.brightness - GlobalConfig.services.brightnessIncrement);
|
||||
}
|
||||
}
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.config
|
||||
import qs.utils
|
||||
import qs.modules.bar.popouts as BarPopouts
|
||||
|
||||
|
|
@ -18,8 +18,8 @@ Item {
|
|||
readonly property bool disabled: Strings.testRegexList(Config.bar.excludedScreens, screen.name)
|
||||
|
||||
readonly property int clampedWidth: Math.max(Config.border.minThickness, implicitWidth)
|
||||
readonly property int padding: Math.max(Appearance.padding.smaller, Config.border.thickness)
|
||||
readonly property int contentWidth: Config.bar.sizes.innerWidth + padding * 2
|
||||
readonly property int padding: Math.max(Tokens.padding.smaller, Config.border.thickness)
|
||||
readonly property int contentWidth: Tokens.sizes.bar.innerWidth + padding * 2
|
||||
readonly property int exclusiveZone: !disabled && (Config.bar.persistent || visibilities.bar) ? contentWidth : Config.border.thickness
|
||||
readonly property bool shouldBeVisible: !fullscreen && !disabled && (Config.bar.persistent || visibilities.bar || isHovered)
|
||||
property bool isHovered
|
||||
|
|
@ -57,8 +57,8 @@ Item {
|
|||
Anim {
|
||||
target: root
|
||||
property: "implicitWidth"
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
|
|
@ -68,7 +68,7 @@ Item {
|
|||
Anim {
|
||||
target: root
|
||||
property: "implicitWidth"
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
|
|
@ -86,8 +86,8 @@ Item {
|
|||
id: metrics
|
||||
|
||||
text: root.windowTitle
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Appearance.font.family.mono
|
||||
font.pointSize: root.Tokens.font.size.smaller
|
||||
font.family: root.Tokens.font.family.mono
|
||||
elide: Qt.ElideRight
|
||||
elideWidth: root.maxHeight - icon.height
|
||||
|
||||
|
|
@ -101,8 +101,8 @@ Item {
|
|||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ Item {
|
|||
|
||||
anchors.horizontalCenter: icon.horizontalCenter
|
||||
anchors.top: icon.bottom
|
||||
anchors.topMargin: Appearance.spacing.small
|
||||
anchors.topMargin: Tokens.spacing.small
|
||||
|
||||
font.pointSize: metrics.font.pointSize
|
||||
font.family: metrics.font.family
|
||||
|
|
@ -120,10 +120,10 @@ Item {
|
|||
|
||||
transform: [
|
||||
Translate {
|
||||
x: Config.bar.activeWindow.inverted ? -text.implicitWidth + text.implicitHeight : 0
|
||||
x: root.Config.bar.activeWindow.inverted ? -text.implicitWidth + text.implicitHeight : 0
|
||||
},
|
||||
Rotation {
|
||||
angle: Config.bar.activeWindow.inverted ? 270 : 90
|
||||
angle: root.Config.bar.activeWindow.inverted ? 270 : 90
|
||||
origin.x: text.implicitHeight / 2
|
||||
origin.y: text.implicitHeight / 2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
readonly property color colour: Colours.palette.m3tertiary
|
||||
readonly property int padding: Config.bar.clock.background ? Appearance.padding.normal : Appearance.padding.small
|
||||
readonly property int padding: Config.bar.clock.background ? Tokens.padding.normal : Tokens.padding.small
|
||||
|
||||
implicitWidth: Config.bar.sizes.innerWidth
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth
|
||||
implicitHeight: layout.implicitHeight + root.padding * 2
|
||||
|
||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, Config.bar.clock.background ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Column {
|
||||
id: layout
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
Loader {
|
||||
asynchronous: true
|
||||
|
|
@ -43,8 +43,8 @@ StyledRect {
|
|||
|
||||
horizontalAlignment: StyledText.AlignHCenter
|
||||
text: Time.format("ddd\nd")
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Appearance.font.family.sans
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
font.family: Tokens.font.family.sans
|
||||
color: root.colour
|
||||
}
|
||||
|
||||
|
|
@ -62,9 +62,9 @@ StyledRect {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
horizontalAlignment: StyledText.AlignHCenter
|
||||
text: Time.format(Config.services.useTwelveHourClock ? "hh\nmm\nA" : "hh\nmm")
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Appearance.font.family.mono
|
||||
text: Time.format(GlobalConfig.services.useTwelveHourClock ? "hh\nmm\nA" : "hh\nmm")
|
||||
font.pointSize: Tokens.font.size.smaller
|
||||
font.family: Tokens.font.family.mono
|
||||
color: root.colour
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
implicitWidth: Math.round(Appearance.font.size.large * 1.2)
|
||||
implicitHeight: Math.round(Appearance.font.size.large * 1.2)
|
||||
implicitWidth: Math.round(Tokens.font.size.large * 1.2)
|
||||
implicitHeight: Math.round(Tokens.font.size.large * 1.2)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
@ -30,8 +30,8 @@ Item {
|
|||
id: caelestiaLogo
|
||||
|
||||
Logo {
|
||||
implicitWidth: Math.round(Appearance.font.size.large * 1.6)
|
||||
implicitHeight: Math.round(Appearance.font.size.large * 1.6)
|
||||
implicitWidth: Math.round(Tokens.font.size.large * 1.6)
|
||||
implicitHeight: Math.round(Tokens.font.size.large * 1.6)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ Item {
|
|||
|
||||
ColouredIcon {
|
||||
source: SysInfo.osLogo
|
||||
implicitSize: Math.round(Appearance.font.size.large * 1.2)
|
||||
implicitSize: Math.round(Tokens.font.size.large * 1.2)
|
||||
colour: Colours.palette.m3tertiary
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property DrawerVisibilities visibilities
|
||||
|
||||
implicitWidth: icon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: icon.implicitHeight
|
||||
|
||||
StateLayer {
|
||||
|
|
@ -20,8 +20,8 @@ Item {
|
|||
anchors.fill: undefined
|
||||
anchors.centerIn: parent
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small * 2
|
||||
radius: Appearance.rounding.full
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -33,6 +33,6 @@ Item {
|
|||
text: "power_settings_new"
|
||||
color: Colours.palette.m3error
|
||||
font.bold: true
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.modules.controlcenter
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
implicitWidth: icon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: icon.implicitHeight
|
||||
|
||||
StateLayer {
|
||||
|
|
@ -21,8 +21,8 @@ Item {
|
|||
anchors.fill: undefined
|
||||
anchors.centerIn: parent
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small * 2
|
||||
radius: Appearance.rounding.full
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -34,6 +34,6 @@ Item {
|
|||
text: "settings"
|
||||
color: Colours.palette.m3onSurface
|
||||
font.bold: true
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.modules.controlcenter
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
implicitWidth: icon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: icon.implicitHeight
|
||||
|
||||
StateLayer {
|
||||
|
|
@ -21,8 +21,8 @@ Item {
|
|||
anchors.fill: undefined
|
||||
anchors.centerIn: parent
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small * 2
|
||||
radius: Appearance.rounding.full
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small * 2
|
||||
radius: Tokens.rounding.full
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -34,6 +34,6 @@ Item {
|
|||
text: "settings"
|
||||
color: Colours.palette.m3onSurface
|
||||
font.bold: true
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import QtQuick.Layouts
|
|||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import Quickshell.Services.UPower
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
StyledRect {
|
||||
|
|
@ -17,11 +17,11 @@ StyledRect {
|
|||
readonly property alias items: iconColumn
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
clip: true
|
||||
implicitWidth: Config.bar.sizes.innerWidth
|
||||
implicitHeight: iconColumn.implicitHeight + Appearance.padding.normal * 2 - (Config.bar.status.showLockStatus && !Hypr.capsLock && !Hypr.numLock ? iconColumn.spacing : 0)
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth
|
||||
implicitHeight: iconColumn.implicitHeight + Tokens.padding.normal * 2 - (Config.bar.status.showLockStatus && !Hypr.capsLock && !Hypr.numLock ? iconColumn.spacing : 0)
|
||||
|
||||
ColumnLayout {
|
||||
id: iconColumn
|
||||
|
|
@ -29,9 +29,9 @@ StyledRect {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Appearance.padding.normal
|
||||
anchors.bottomMargin: Tokens.padding.normal
|
||||
|
||||
spacing: Appearance.spacing.smaller / 2
|
||||
spacing: Tokens.spacing.smaller / 2
|
||||
|
||||
// Lock keys status
|
||||
WrappedLoader {
|
||||
|
|
@ -136,7 +136,7 @@ StyledRect {
|
|||
animate: true
|
||||
text: Hypr.kbLayout
|
||||
color: root.colour
|
||||
font.family: Appearance.font.family.mono
|
||||
font.family: Tokens.font.family.mono
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ StyledRect {
|
|||
active: Config.bar.status.showBluetooth
|
||||
|
||||
sourceComponent: ColumnLayout {
|
||||
spacing: Appearance.spacing.smaller / 2
|
||||
spacing: Tokens.spacing.smaller / 2
|
||||
|
||||
// Bluetooth icon
|
||||
MaterialIcon {
|
||||
|
|
@ -211,14 +211,14 @@ StyledRect {
|
|||
Anim {
|
||||
from: 1
|
||||
to: 0
|
||||
duration: Appearance.anim.durations.large
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
duration: Tokens.anim.durations.large
|
||||
easing: Tokens.anim.standardAccel
|
||||
}
|
||||
Anim {
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Appearance.anim.durations.large
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
duration: Tokens.anim.durations.large
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -14,8 +14,8 @@ StyledRect {
|
|||
readonly property alias items: items
|
||||
readonly property alias expandIcon: expandIcon
|
||||
|
||||
readonly property int padding: Config.bar.tray.background ? Appearance.padding.normal : Appearance.padding.small
|
||||
readonly property int spacing: Config.bar.tray.background ? Appearance.spacing.small : 0
|
||||
readonly property int padding: Config.bar.tray.background ? Tokens.padding.normal : Tokens.padding.small
|
||||
readonly property int spacing: Config.bar.tray.background ? Tokens.spacing.small : 0
|
||||
|
||||
property bool expanded
|
||||
|
||||
|
|
@ -28,11 +28,11 @@ StyledRect {
|
|||
clip: true
|
||||
visible: height > 0
|
||||
|
||||
implicitWidth: Config.bar.sizes.innerWidth
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth
|
||||
implicitHeight: nonAnimHeight
|
||||
|
||||
color: Qt.alpha(Colours.tPalette.m3surfaceContainer, (Config.bar.tray.background && items.count > 0) ? Colours.tPalette.m3surfaceContainer.a : 0)
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Column {
|
||||
id: layout
|
||||
|
|
@ -40,7 +40,7 @@ StyledRect {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: root.padding
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: root.expanded || !Config.bar.tray.compact ? 1 : 0
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ StyledRect {
|
|||
properties: "scale"
|
||||
from: 0
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ StyledRect {
|
|||
Anim {
|
||||
properties: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
|
|
@ -68,7 +68,7 @@ StyledRect {
|
|||
id: items
|
||||
|
||||
model: ScriptModel {
|
||||
values: SystemTray.items.values.filter(i => !Config.bar.tray.hiddenIcons.includes(i.id))
|
||||
values: SystemTray.items.values.filter(i => !GlobalConfig.bar.tray.hiddenIcons.includes(i.id))
|
||||
}
|
||||
|
||||
TrayItem {}
|
||||
|
|
@ -91,16 +91,16 @@ StyledRect {
|
|||
|
||||
sourceComponent: Item {
|
||||
implicitWidth: expandIconInner.implicitWidth
|
||||
implicitHeight: expandIconInner.implicitHeight - Appearance.padding.small * 2
|
||||
implicitHeight: expandIconInner.implicitHeight - Tokens.padding.small * 2
|
||||
|
||||
MaterialIcon {
|
||||
id: expandIconInner
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Config.bar.tray.background ? Appearance.padding.small : -Appearance.padding.small
|
||||
anchors.bottomMargin: Config.bar.tray.background ? Tokens.padding.small : -Tokens.padding.small
|
||||
text: "expand_less"
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
rotation: root.expanded ? 180 : 0
|
||||
|
||||
Behavior on rotation {
|
||||
|
|
@ -116,8 +116,8 @@ StyledRect {
|
|||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import Quickshell.Services.SystemTray
|
||||
import Caelestia.Config
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -13,8 +13,8 @@ MouseArea {
|
|||
required property SystemTrayItem modelData
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
implicitWidth: Appearance.font.size.small * 2
|
||||
implicitHeight: Appearance.font.size.small * 2
|
||||
implicitWidth: Tokens.font.size.small * 2
|
||||
implicitHeight: Tokens.font.size.small * 2
|
||||
|
||||
onClicked: event => {
|
||||
if (event.button === Qt.LeftButton)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
|
@ -42,9 +44,9 @@ StyledRect {
|
|||
|
||||
clip: true
|
||||
y: offset + mask.y
|
||||
implicitWidth: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth - Tokens.padding.small * 2
|
||||
implicitHeight: size
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Colours.palette.m3primary
|
||||
|
||||
Colouriser {
|
||||
|
|
@ -61,38 +63,38 @@ StyledRect {
|
|||
}
|
||||
|
||||
Behavior on leading {
|
||||
enabled: Config.bar.workspaces.activeTrail
|
||||
enabled: root.Config.bar.workspaces.activeTrail
|
||||
|
||||
EAnim {}
|
||||
}
|
||||
|
||||
Behavior on trailing {
|
||||
enabled: Config.bar.workspaces.activeTrail
|
||||
enabled: root.Config.bar.workspaces.activeTrail
|
||||
|
||||
EAnim {
|
||||
duration: Appearance.anim.durations.normal * 2
|
||||
duration: Tokens.anim.durations.normal * 2
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on currentSize {
|
||||
enabled: Config.bar.workspaces.activeTrail
|
||||
enabled: root.Config.bar.workspaces.activeTrail
|
||||
|
||||
EAnim {}
|
||||
}
|
||||
|
||||
Behavior on offset {
|
||||
enabled: !Config.bar.workspaces.activeTrail
|
||||
enabled: !root.Config.bar.workspaces.activeTrail
|
||||
|
||||
EAnim {}
|
||||
}
|
||||
|
||||
Behavior on size {
|
||||
enabled: !Config.bar.workspaces.activeTrail
|
||||
enabled: !root.Config.bar.workspaces.activeTrail
|
||||
|
||||
EAnim {}
|
||||
}
|
||||
|
||||
component EAnim: Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -65,18 +65,18 @@ Item {
|
|||
anchors.horizontalCenter: root.horizontalCenter
|
||||
|
||||
y: (start?.y ?? 0) - 1
|
||||
implicitWidth: Config.bar.sizes.innerWidth - Appearance.padding.small * 2 + 2
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth - Tokens.padding.small * 2 + 2
|
||||
implicitHeight: start && end ? end.y + end.size - start.y + 2 : 0
|
||||
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainerHigh, 2)
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
scale: 0
|
||||
Component.onCompleted: scale = 1
|
||||
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
|
|
@ -15,7 +15,7 @@ Item {
|
|||
|
||||
required property ShellScreen screen
|
||||
readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen)
|
||||
readonly property string activeSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? monitor : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace?.name ?? ""
|
||||
readonly property string activeSpecial: (GlobalConfig.bar.workspaces.perMonitorWorkspaces ? monitor : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace?.name ?? ""
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
|
|
@ -31,7 +31,7 @@ Item {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Vertical
|
||||
|
|
@ -60,7 +60,7 @@ Item {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
implicitHeight: parent.height / 2
|
||||
opacity: view.contentY > 0 ? 0 : 1
|
||||
|
||||
|
|
@ -74,9 +74,9 @@ Item {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
implicitHeight: parent.height / 2
|
||||
opacity: view.contentY < view.contentHeight - parent.height + Appearance.padding.small ? 0 : 1
|
||||
opacity: view.contentY < view.contentHeight - parent.height + Tokens.padding.small ? 0 : 1
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {}
|
||||
|
|
@ -88,14 +88,14 @@ Item {
|
|||
id: view
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
interactive: false
|
||||
|
||||
currentIndex: model.values.findIndex(w => w.name === root.activeSpecial)
|
||||
onCurrentIndexChanged: currentIndex = Qt.binding(() => model.values.findIndex(w => w.name === root.activeSpecial))
|
||||
|
||||
model: ScriptModel {
|
||||
values: Hypr.workspaces.values.filter(w => w.name.startsWith("special:") && (!Config.bar.workspaces.perMonitorWorkspaces || w.monitor === root.monitor))
|
||||
values: Hypr.workspaces.values.filter(w => w.name.startsWith("special:") && (!GlobalConfig.bar.workspaces.perMonitorWorkspaces || w.monitor === root.monitor))
|
||||
}
|
||||
|
||||
preferredHighlightBegin: 0
|
||||
|
|
@ -119,7 +119,7 @@ Item {
|
|||
properties: "scale"
|
||||
from: 0
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,12 +127,12 @@ Item {
|
|||
Anim {
|
||||
property: "scale"
|
||||
to: 0.5
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
Anim {
|
||||
property: "opacity"
|
||||
to: 0
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ Item {
|
|||
Anim {
|
||||
properties: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
|
|
@ -151,7 +151,7 @@ Item {
|
|||
Anim {
|
||||
properties: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
|
|
@ -175,7 +175,7 @@ Item {
|
|||
implicitHeight: (view.currentItem as SpecialWsDelegate)?.size ?? 0
|
||||
|
||||
color: Colours.palette.m3tertiary
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Colouriser {
|
||||
source: view
|
||||
|
|
@ -192,13 +192,13 @@ Item {
|
|||
|
||||
Behavior on y {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ Item {
|
|||
drag.target: view.contentItem
|
||||
drag.axis: Drag.YAxis
|
||||
drag.maximumY: 0
|
||||
drag.minimumY: Math.min(0, view.height - view.contentHeight - Appearance.padding.small)
|
||||
drag.minimumY: Math.min(0, view.height - view.contentHeight - Tokens.padding.small)
|
||||
|
||||
onPressed: event => startY = event.y
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ Item {
|
|||
id: ws
|
||||
|
||||
required property HyprlandWorkspace modelData
|
||||
readonly property int size: label.Layout.preferredHeight + (hasWindows ? windows.implicitHeight + Appearance.padding.small : 0)
|
||||
readonly property int size: label.Layout.preferredHeight + (hasWindows ? windows.implicitHeight + Tokens.padding.small : 0)
|
||||
property int wsId
|
||||
property string icon
|
||||
property bool hasWindows
|
||||
|
|
@ -263,7 +263,7 @@ Item {
|
|||
|
||||
function onLastIpcObjectChanged(): void {
|
||||
if (ws.modelData)
|
||||
ws.hasWindows = Config.bar.workspaces.showWindowsOnSpecialWorkspaces && ws.modelData.lastIpcObject.windows > 0;
|
||||
ws.hasWindows = root.Config.bar.workspaces.showWindowsOnSpecialWorkspaces && ws.modelData.lastIpcObject.windows > 0;
|
||||
}
|
||||
|
||||
target: ws.modelData
|
||||
|
|
@ -272,10 +272,10 @@ Item {
|
|||
Connections {
|
||||
function onShowWindowsOnSpecialWorkspacesChanged(): void {
|
||||
if (ws.modelData)
|
||||
ws.hasWindows = Config.bar.workspaces.showWindowsOnSpecialWorkspaces && ws.modelData.lastIpcObject.windows > 0;
|
||||
ws.hasWindows = root.Config.bar.workspaces.showWindowsOnSpecialWorkspaces && ws.modelData.lastIpcObject.windows > 0;
|
||||
}
|
||||
|
||||
target: Config.bar.workspaces
|
||||
target: root.Config.bar.workspaces
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
@ -284,7 +284,7 @@ Item {
|
|||
asynchronous: true
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.preferredHeight: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
|
||||
Layout.preferredHeight: Tokens.sizes.bar.innerWidth - Tokens.padding.small * 2
|
||||
|
||||
sourceComponent: ws.icon.length === 1 ? letterComp : iconComp
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ Item {
|
|||
properties: "scale"
|
||||
from: 0
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -336,7 +336,7 @@ Item {
|
|||
Anim {
|
||||
properties: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
|
|
@ -347,7 +347,7 @@ Item {
|
|||
model: ScriptModel {
|
||||
values: {
|
||||
const windows = Hypr.toplevels.values.filter(c => c.workspace?.id === ws.wsId);
|
||||
const maxIcons = Config.bar.workspaces.maxWindowIcons;
|
||||
const maxIcons = root.Config.bar.workspaces.maxWindowIcons;
|
||||
return maxIcons > 0 ? windows.slice(0, maxIcons) : windows;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -18,7 +18,7 @@ ColumnLayout {
|
|||
|
||||
readonly property bool isWorkspace: true // Flag for finding workspace children
|
||||
// Unanimated prop for others to use as reference
|
||||
readonly property int size: implicitHeight + (hasWindows ? Appearance.padding.small : 0)
|
||||
readonly property int size: implicitHeight + (hasWindows ? Tokens.padding.small : 0)
|
||||
|
||||
readonly property int ws: groupOffset + index + 1
|
||||
readonly property bool isOccupied: occupied[ws] ?? false
|
||||
|
|
@ -33,7 +33,7 @@ ColumnLayout {
|
|||
id: indicator
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.preferredHeight: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
|
||||
Layout.preferredHeight: Tokens.sizes.bar.innerWidth - Tokens.padding.small * 2
|
||||
|
||||
animate: true
|
||||
text: {
|
||||
|
|
@ -61,7 +61,7 @@ ColumnLayout {
|
|||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillHeight: true
|
||||
Layout.topMargin: -Config.bar.sizes.innerWidth / 10
|
||||
Layout.topMargin: -Tokens.sizes.bar.innerWidth / 10
|
||||
|
||||
visible: active
|
||||
active: root.hasWindows
|
||||
|
|
@ -74,7 +74,7 @@ ColumnLayout {
|
|||
properties: "scale"
|
||||
from: 0
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ ColumnLayout {
|
|||
Anim {
|
||||
properties: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
easing: Tokens.anim.standardDecel
|
||||
}
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
|
|
@ -94,7 +94,7 @@ ColumnLayout {
|
|||
values: {
|
||||
const ws = root.ws;
|
||||
const windows = Hypr.toplevels.values.filter(c => c.workspace?.id === ws);
|
||||
const maxIcons = Config.bar.workspaces.maxWindowIcons;
|
||||
const maxIcons = root.Config.bar.workspaces.maxWindowIcons;
|
||||
return maxIcons > 0 ? windows.slice(0, maxIcons) : windows;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import QtQuick
|
|||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledClippingRect {
|
||||
id: root
|
||||
|
|
@ -14,8 +14,8 @@ StyledClippingRect {
|
|||
required property ShellScreen screen
|
||||
required property bool fullscreen
|
||||
|
||||
readonly property bool onSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace?.name !== ""
|
||||
readonly property int activeWsId: Config.bar.workspaces.perMonitorWorkspaces ? (Hypr.monitorFor(screen).activeWorkspace?.id ?? 1) : Hypr.activeWsId
|
||||
readonly property bool onSpecial: (GlobalConfig.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace?.name !== ""
|
||||
readonly property int activeWsId: GlobalConfig.bar.workspaces.perMonitorWorkspaces ? (Hypr.monitorFor(screen).activeWorkspace?.id ?? 1) : Hypr.activeWsId
|
||||
|
||||
readonly property var occupied: {
|
||||
const occ = {};
|
||||
|
|
@ -27,11 +27,11 @@ StyledClippingRect {
|
|||
|
||||
property real blur: onSpecial ? 1 : 0
|
||||
|
||||
implicitWidth: Config.bar.sizes.innerWidth
|
||||
implicitHeight: layout.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: Tokens.sizes.bar.innerWidth
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
|
@ -51,7 +51,7 @@ StyledClippingRect {
|
|||
active: Config.bar.workspaces.occupiedBg
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
|
||||
sourceComponent: OccupiedBg {
|
||||
workspaces: workspaces
|
||||
|
|
@ -64,7 +64,7 @@ StyledClippingRect {
|
|||
id: layout
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Math.floor(Appearance.spacing.small / 2)
|
||||
spacing: Math.floor(Tokens.spacing.small / 2)
|
||||
|
||||
Repeater {
|
||||
id: workspaces
|
||||
|
|
@ -118,7 +118,7 @@ StyledClippingRect {
|
|||
asynchronous: true
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
|
||||
active: opacity > 0
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ StyledClippingRect {
|
|||
|
||||
Behavior on blur {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Widgets
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
Item {
|
||||
|
|
@ -12,21 +12,21 @@ Item {
|
|||
|
||||
required property PopoutState popouts
|
||||
|
||||
implicitWidth: Hypr.activeToplevel ? child.implicitWidth : -Appearance.padding.large * 2
|
||||
implicitWidth: Hypr.activeToplevel ? child.implicitWidth : -Tokens.padding.large * 2
|
||||
implicitHeight: child.implicitHeight
|
||||
|
||||
Column {
|
||||
id: child
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
RowLayout {
|
||||
id: detailsRow
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
IconImage {
|
||||
id: icon
|
||||
|
|
@ -46,7 +46,7 @@ Item {
|
|||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: Hypr.activeToplevel?.title ?? ""
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
|
|
@ -59,8 +59,8 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: expandIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: expandIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: expandIcon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: expandIcon.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ Item {
|
|||
root.popouts.detachRequested("winfo");
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -80,14 +80,14 @@ Item {
|
|||
|
||||
text: "chevron_right"
|
||||
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: "transparent"
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
ScreencopyView {
|
||||
id: preview
|
||||
|
|
@ -95,8 +95,8 @@ Item {
|
|||
captureSource: Hypr.activeToplevel?.wayland ?? null // qmllint disable unresolved-type
|
||||
live: visible
|
||||
|
||||
constraintSize.width: Config.bar.sizes.windowPreviewSize
|
||||
constraintSize.height: Config.bar.sizes.windowPreviewSize
|
||||
constraintSize.width: Tokens.sizes.bar.windowPreviewSize
|
||||
constraintSize.height: Tokens.sizes.bar.windowPreviewSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Pipewire
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property PopoutState popouts
|
||||
|
||||
implicitWidth: layout.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: layout.implicitHeight + Appearance.padding.normal * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.normal * 2
|
||||
|
||||
ButtonGroup {
|
||||
id: sinks
|
||||
|
|
@ -30,7 +30,7 @@ Item {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Output device")
|
||||
|
|
@ -53,7 +53,7 @@ Item {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.smaller
|
||||
Layout.topMargin: Tokens.spacing.smaller
|
||||
text: qsTr("Input device")
|
||||
font.weight: 500
|
||||
}
|
||||
|
|
@ -72,15 +72,15 @@ Item {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.smaller
|
||||
Layout.bottomMargin: -Appearance.spacing.small / 2
|
||||
Layout.topMargin: Tokens.spacing.smaller
|
||||
Layout.bottomMargin: -Tokens.spacing.small / 2
|
||||
text: qsTr("Volume (%1)").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`)
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
CustomMouseArea {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: Appearance.padding.normal * 3
|
||||
implicitHeight: Tokens.padding.normal * 3
|
||||
|
||||
onWheel: event => {
|
||||
if (event.angleDelta.y > 0)
|
||||
|
|
@ -105,10 +105,10 @@ Item {
|
|||
|
||||
IconTextButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
inactiveColour: Colours.palette.m3primaryContainer
|
||||
inactiveOnColour: Colours.palette.m3onPrimaryContainer
|
||||
verticalPadding: Appearance.padding.small
|
||||
verticalPadding: Tokens.padding.small
|
||||
text: qsTr("Open settings")
|
||||
icon: "settings"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import Quickshell.Services.UPower
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Column {
|
||||
id: root
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
width: Config.bar.sizes.batteryWidth
|
||||
spacing: Tokens.spacing.normal
|
||||
width: Tokens.sizes.bar.batteryWidth
|
||||
|
||||
StyledText {
|
||||
text: UPower.displayDevice.isLaptopBattery ? qsTr("Remaining: %1%").arg(Math.round(UPower.displayDevice.percentage * 100)) : qsTr("No battery detected")
|
||||
|
|
@ -45,11 +45,11 @@ Column {
|
|||
height: active ? ((item as Item)?.implicitHeight ?? 0) : 0
|
||||
|
||||
sourceComponent: StyledRect {
|
||||
implicitWidth: child.implicitWidth + Appearance.padding.normal * 2
|
||||
implicitHeight: child.implicitHeight + Appearance.padding.smaller * 2
|
||||
implicitWidth: child.implicitWidth + Tokens.padding.normal * 2
|
||||
implicitHeight: child.implicitHeight + Tokens.padding.smaller * 2
|
||||
|
||||
color: Colours.palette.m3error
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
|
||||
Column {
|
||||
id: child
|
||||
|
|
@ -58,7 +58,7 @@ Column {
|
|||
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -72,7 +72,7 @@ Column {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr("Performance Degraded")
|
||||
color: Colours.palette.m3onError
|
||||
font.family: Appearance.font.family.mono
|
||||
font.family: Tokens.font.family.mono
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
|
|
@ -109,17 +109,17 @@ Column {
|
|||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Appearance.padding.normal * 2 + Appearance.spacing.large * 2
|
||||
implicitHeight: Math.max(saver.implicitHeight, balance.implicitHeight, perf.implicitHeight) + Appearance.padding.small * 2
|
||||
implicitWidth: saver.implicitHeight + balance.implicitHeight + perf.implicitHeight + Tokens.padding.normal * 2 + Tokens.spacing.large * 2
|
||||
implicitHeight: Math.max(saver.implicitHeight, balance.implicitHeight, perf.implicitHeight) + Tokens.padding.small * 2
|
||||
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
StyledRect {
|
||||
id: indicator
|
||||
|
||||
color: Colours.palette.m3primary
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
state: profiles.current
|
||||
|
||||
states: [
|
||||
|
|
@ -148,9 +148,8 @@ Column {
|
|||
|
||||
transitions: Transition {
|
||||
AnchorAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
duration: Tokens.anim.durations.normal
|
||||
easing: Tokens.anim.emphasized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +159,7 @@ Column {
|
|||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Appearance.padding.small
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
|
||||
profile: PowerProfile.PowerSaver
|
||||
icon: "energy_savings_leaf"
|
||||
|
|
@ -180,7 +179,7 @@ Column {
|
|||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Appearance.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
|
||||
profile: PowerProfile.Performance
|
||||
icon: "rocket_launch"
|
||||
|
|
@ -201,15 +200,15 @@ Column {
|
|||
required property string icon
|
||||
required property int profile
|
||||
|
||||
implicitWidth: icon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitWidth: icon.implicitHeight + Tokens.padding.small * 2
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
PowerProfiles.profile = parent.profile;
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: profiles.current === parent.icon ? Colours.palette.m3onPrimary : Colours.palette.m3onSurface
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +218,7 @@ Column {
|
|||
anchors.centerIn: parent
|
||||
|
||||
text: parent.icon
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
color: profiles.current === text ? Colours.palette.m3onPrimary : Colours.palette.m3onSurface
|
||||
fill: profiles.current === text ? 1 : 0
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -16,11 +16,11 @@ ColumnLayout {
|
|||
required property PopoutState popouts
|
||||
|
||||
width: 300
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.padding.normal
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Tokens.padding.normal
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("Bluetooth")
|
||||
font.weight: 500
|
||||
}
|
||||
|
|
@ -46,8 +46,8 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.small
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Tokens.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: {
|
||||
const devices = Bluetooth.devices.values; // qmllint disable unresolved-type
|
||||
let available = qsTr("%1 device%2 available").arg(devices.length).arg(devices.length === 1 ? "" : "s");
|
||||
|
|
@ -57,7 +57,7 @@ ColumnLayout {
|
|||
return available;
|
||||
}
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
Repeater {
|
||||
|
|
@ -72,8 +72,8 @@ ColumnLayout {
|
|||
readonly property bool loading: modelData.state === BluetoothDeviceState.Connecting || modelData.state === BluetoothDeviceState.Disconnecting // qmllint disable unresolved-type
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
spacing: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: 0
|
||||
scale: 0.7
|
||||
|
|
@ -96,8 +96,8 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.leftMargin: Appearance.spacing.small / 2
|
||||
Layout.rightMargin: Appearance.spacing.small / 2
|
||||
Layout.leftMargin: Tokens.spacing.small / 2
|
||||
Layout.rightMargin: Tokens.spacing.small / 2
|
||||
Layout.fillWidth: true
|
||||
text: device.modelData.name
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -113,9 +113,9 @@ ColumnLayout {
|
|||
id: connectBtn
|
||||
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: connectIcon.implicitHeight + Appearance.padding.small
|
||||
implicitHeight: connectIcon.implicitHeight + Tokens.padding.small
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3primary, device.modelData.state === BluetoothDeviceState.Connected ? 1 : 0) // qmllint disable unresolved-type
|
||||
|
||||
CircularIndicator {
|
||||
|
|
@ -161,7 +161,7 @@ ColumnLayout {
|
|||
device.modelData.forget();
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -175,10 +175,10 @@ ColumnLayout {
|
|||
|
||||
IconTextButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
inactiveColour: Colours.palette.m3primaryContainer
|
||||
inactiveOnColour: Colours.palette.m3onPrimaryContainer
|
||||
verticalPadding: Appearance.padding.small
|
||||
verticalPadding: Tokens.padding.small
|
||||
text: qsTr("Open settings")
|
||||
icon: "settings"
|
||||
|
||||
|
|
@ -191,8 +191,8 @@ ColumnLayout {
|
|||
property alias toggle: toggle
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
spacing: Appearance.spacing.normal
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.config
|
||||
import qs.modules.bar.popouts // Need to import this module so the Wrapper type is the same as others
|
||||
|
||||
Item {
|
||||
|
|
@ -35,15 +35,15 @@ Item {
|
|||
|
||||
Behavior on offsetScale {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on x {
|
||||
Anim {
|
||||
duration: content.animLength
|
||||
easing.bezierCurve: content.animCurve
|
||||
easing: content.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ Item {
|
|||
|
||||
Anim {
|
||||
duration: content.animLength
|
||||
easing.bezierCurve: content.animCurve
|
||||
easing: content.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import "./kblayout"
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -14,14 +14,14 @@ Item {
|
|||
readonly property Popout currentPopout: content.children.find(c => c.shouldBeActive) ?? null
|
||||
readonly property Item current: currentPopout?.item ?? null
|
||||
|
||||
implicitWidth: (currentPopout?.implicitWidth ?? 0) + Appearance.padding.large * 2
|
||||
implicitHeight: (currentPopout?.implicitHeight ?? 0) + Appearance.padding.large * 2
|
||||
implicitWidth: (currentPopout?.implicitWidth ?? 0) + Tokens.padding.large * 2
|
||||
implicitHeight: (currentPopout?.implicitHeight ?? 0) + Tokens.padding.large * 2
|
||||
|
||||
Item {
|
||||
id: content
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.large
|
||||
|
||||
Popout {
|
||||
name: "activewindow"
|
||||
|
|
@ -128,7 +128,7 @@ Item {
|
|||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
values: SystemTray.items.values.filter(i => !Config.bar.tray.hiddenIcons.includes(i.id))
|
||||
values: SystemTray.items.values.filter(i => !GlobalConfig.bar.tray.hiddenIcons.includes(i.id))
|
||||
}
|
||||
|
||||
Popout {
|
||||
|
|
@ -194,7 +194,7 @@ Item {
|
|||
SequentialAnimation {
|
||||
Anim {
|
||||
properties: "opacity,scale"
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
PropertyAction {
|
||||
target: popout
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Capslock: %1").arg(Hypr.capsLock ? "Enabled" : "Disabled")
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -19,15 +19,15 @@ ColumnLayout {
|
|||
property var passwordNetwork: null
|
||||
property bool showPasswordDialog: false
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
width: Config.bar.sizes.networkWidth
|
||||
spacing: Tokens.spacing.small
|
||||
width: Tokens.sizes.bar.networkWidth
|
||||
|
||||
// Wireless section
|
||||
StyledText {
|
||||
visible: root.view === "wireless"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.topMargin: visible ? Appearance.padding.normal : 0
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: visible ? Tokens.padding.normal : 0
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("Wireless")
|
||||
font.weight: 500
|
||||
}
|
||||
|
|
@ -43,11 +43,11 @@ ColumnLayout {
|
|||
StyledText {
|
||||
visible: root.view === "wireless"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.topMargin: visible ? Appearance.spacing.small : 0
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: visible ? Tokens.spacing.small : 0
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("%1 networks available").arg(Nmcli.networks.length) // qmllint disable missing-property
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
Repeater {
|
||||
|
|
@ -70,8 +70,8 @@ ColumnLayout {
|
|||
visible: root.view === "wireless"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
spacing: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: 0
|
||||
scale: 0.7
|
||||
|
|
@ -97,12 +97,12 @@ ColumnLayout {
|
|||
MaterialIcon {
|
||||
visible: networkItem.modelData.isSecure
|
||||
text: "lock"
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.leftMargin: Appearance.spacing.small / 2
|
||||
Layout.rightMargin: Appearance.spacing.small / 2
|
||||
Layout.leftMargin: Tokens.spacing.small / 2
|
||||
Layout.rightMargin: Tokens.spacing.small / 2
|
||||
Layout.fillWidth: true
|
||||
text: networkItem.modelData.ssid
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -112,9 +112,9 @@ ColumnLayout {
|
|||
|
||||
StyledRect {
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: wirelessConnectIcon.implicitHeight + Appearance.padding.small
|
||||
implicitHeight: wirelessConnectIcon.implicitHeight + Tokens.padding.small
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3primary, networkItem.modelData.active ? 1 : 0)
|
||||
|
||||
CircularIndicator {
|
||||
|
|
@ -165,11 +165,11 @@ ColumnLayout {
|
|||
StyledRect {
|
||||
visible: root.view === "wireless"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.topMargin: visible ? Appearance.spacing.small : 0
|
||||
Layout.topMargin: visible ? Tokens.spacing.small : 0
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: rescanBtn.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: rescanBtn.implicitHeight + Tokens.padding.small * 2
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Colours.palette.m3primaryContainer
|
||||
|
||||
StateLayer {
|
||||
|
|
@ -185,7 +185,7 @@ ColumnLayout {
|
|||
id: rescanBtn
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
opacity: Nmcli.scanning ? 0 : 1
|
||||
|
||||
MaterialIcon {
|
||||
|
|
@ -210,9 +210,9 @@ ColumnLayout {
|
|||
|
||||
CircularIndicator {
|
||||
anchors.centerIn: parent
|
||||
strokeWidth: Appearance.padding.small / 2
|
||||
strokeWidth: Tokens.padding.small / 2
|
||||
bgColour: "transparent"
|
||||
implicitSize: parent.implicitHeight - Appearance.padding.smaller * 2
|
||||
implicitSize: parent.implicitHeight - Tokens.padding.smaller * 2
|
||||
running: Nmcli.scanning
|
||||
}
|
||||
}
|
||||
|
|
@ -221,8 +221,8 @@ ColumnLayout {
|
|||
StyledText {
|
||||
visible: root.view === "ethernet"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.topMargin: visible ? Appearance.padding.normal : 0
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: visible ? Tokens.padding.normal : 0
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("Ethernet")
|
||||
font.weight: 500
|
||||
}
|
||||
|
|
@ -230,11 +230,11 @@ ColumnLayout {
|
|||
StyledText {
|
||||
visible: root.view === "ethernet"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.topMargin: visible ? Appearance.spacing.small : 0
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: visible ? Tokens.spacing.small : 0
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("%1 devices available").arg(Nmcli.ethernetDevices.length)
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
Repeater {
|
||||
|
|
@ -256,8 +256,8 @@ ColumnLayout {
|
|||
visible: root.view === "ethernet"
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
spacing: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: 0
|
||||
scale: 0.7
|
||||
|
|
@ -281,8 +281,8 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.leftMargin: Appearance.spacing.small / 2
|
||||
Layout.rightMargin: Appearance.spacing.small / 2
|
||||
Layout.leftMargin: Tokens.spacing.small / 2
|
||||
Layout.rightMargin: Tokens.spacing.small / 2
|
||||
Layout.fillWidth: true
|
||||
text: ethernetItem.modelData.interface || qsTr("Unknown")
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -292,9 +292,9 @@ ColumnLayout {
|
|||
|
||||
StyledRect {
|
||||
implicitWidth: implicitHeight
|
||||
implicitHeight: connectIcon.implicitHeight + Appearance.padding.small
|
||||
implicitHeight: connectIcon.implicitHeight + Tokens.padding.small
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3primary, ethernetItem.modelData.connected ? 1 : 0)
|
||||
|
||||
CircularIndicator {
|
||||
|
|
@ -374,8 +374,8 @@ ColumnLayout {
|
|||
property alias toggle: toggle
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
spacing: Appearance.spacing.normal
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StackView {
|
||||
id: root
|
||||
|
|
@ -45,8 +45,8 @@ StackView {
|
|||
property bool isSubMenu
|
||||
property bool shown
|
||||
|
||||
padding: Appearance.padding.smaller
|
||||
spacing: Appearance.spacing.small
|
||||
padding: Tokens.padding.smaller
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: shown ? 1 : 0
|
||||
scale: shown ? 1 : 0.8
|
||||
|
|
@ -78,10 +78,10 @@ StackView {
|
|||
|
||||
required property QsMenuEntry modelData
|
||||
|
||||
implicitWidth: Config.bar.sizes.trayMenuWidth
|
||||
implicitWidth: Tokens.sizes.bar.trayMenuWidth
|
||||
implicitHeight: modelData.isSeparator ? 1 : children.implicitHeight
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: modelData.isSeparator ? Colours.palette.m3outlineVariant : "transparent"
|
||||
|
||||
Loader {
|
||||
|
|
@ -110,9 +110,9 @@ StackView {
|
|||
}
|
||||
}
|
||||
|
||||
anchors.margins: -Appearance.padding.small / 2
|
||||
anchors.leftMargin: -Appearance.padding.smaller
|
||||
anchors.rightMargin: -Appearance.padding.smaller
|
||||
anchors.margins: -Tokens.padding.small / 2
|
||||
anchors.leftMargin: -Tokens.padding.smaller
|
||||
anchors.rightMargin: -Tokens.padding.smaller
|
||||
|
||||
radius: item.radius
|
||||
disabled: !item.modelData.enabled
|
||||
|
|
@ -138,7 +138,7 @@ StackView {
|
|||
id: label
|
||||
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: icon.active ? Appearance.spacing.smaller : 0
|
||||
anchors.leftMargin: icon.active ? Tokens.spacing.smaller : 0
|
||||
|
||||
text: labelMetrics.elidedText
|
||||
color: item.modelData.enabled ? Colours.palette.m3onSurface : Colours.palette.m3outline
|
||||
|
|
@ -152,7 +152,7 @@ StackView {
|
|||
font.family: label.font.family
|
||||
|
||||
elide: Text.ElideRight
|
||||
elideWidth: Config.bar.sizes.trayMenuWidth - (icon.active ? icon.implicitWidth + label.anchors.leftMargin : 0) - (expand.active ? expand.implicitWidth + Appearance.spacing.normal : 0)
|
||||
elideWidth: root.Tokens.sizes.bar.trayMenuWidth - (icon.active ? icon.implicitWidth + label.anchors.leftMargin : 0) - (expand.active ? expand.implicitWidth + root.Tokens.spacing.normal : 0)
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
@ -180,7 +180,7 @@ StackView {
|
|||
|
||||
sourceComponent: Item {
|
||||
implicitWidth: back.implicitWidth
|
||||
implicitHeight: back.implicitHeight + Appearance.spacing.small / 2
|
||||
implicitHeight: back.implicitHeight + Tokens.spacing.small / 2
|
||||
|
||||
Item {
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
@ -189,11 +189,11 @@ StackView {
|
|||
|
||||
StyledRect {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -Appearance.padding.small / 2
|
||||
anchors.leftMargin: -Appearance.padding.smaller
|
||||
anchors.rightMargin: -Appearance.padding.smaller * 2
|
||||
anchors.margins: -Tokens.padding.small / 2
|
||||
anchors.leftMargin: -Tokens.padding.smaller
|
||||
anchors.rightMargin: -Tokens.padding.smaller * 2
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Colours.palette.m3secondaryContainer
|
||||
|
||||
StateLayer {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.utils
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -69,9 +69,9 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
implicitWidth: 400
|
||||
implicitHeight: content.implicitHeight + Appearance.padding.large * 2
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.large * 2
|
||||
visible: shouldBeVisible || isClosing
|
||||
enabled: shouldBeVisible && !isClosing
|
||||
focus: enabled
|
||||
|
|
@ -128,8 +128,8 @@ ColumnLayout {
|
|||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 400
|
||||
implicitHeight: content.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
implicitHeight: content.implicitHeight + Tokens.padding.large * 2
|
||||
radius: Tokens.rounding.normal
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
visible: root.shouldBeVisible || root.isClosing
|
||||
opacity: root.shouldBeVisible && !root.isClosing ? 1 : 0
|
||||
|
|
@ -170,20 +170,20 @@ ColumnLayout {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
anchors.margins: Tokens.padding.large
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "lock"
|
||||
font.pointSize: Appearance.font.size.extraLarge * 2
|
||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Enter password")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ ColumnLayout {
|
|||
return qsTr("Network: Unknown");
|
||||
}
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
@ -237,7 +237,7 @@ ColumnLayout {
|
|||
id: statusText
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: Appearance.spacing.small
|
||||
Layout.topMargin: Tokens.spacing.small
|
||||
visible: connectButton.connecting || connectButton.hasError
|
||||
text: {
|
||||
if (connectButton.hasError) {
|
||||
|
|
@ -249,10 +249,10 @@ ColumnLayout {
|
|||
return "";
|
||||
}
|
||||
color: connectButton.hasError ? Colours.palette.m3error : Colours.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
font.weight: 400
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.maximumWidth: parent.width - Appearance.padding.large * 2
|
||||
Layout.maximumWidth: parent.width - Tokens.padding.large * 2
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
|
|
@ -261,9 +261,9 @@ ColumnLayout {
|
|||
property string passwordBuffer: ""
|
||||
|
||||
objectName: "passwordContainer"
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: Math.max(48, charList.implicitHeight + Appearance.padding.normal * 2)
|
||||
implicitHeight: Math.max(48, charList.implicitHeight + Tokens.padding.normal * 2)
|
||||
focus: true
|
||||
activeFocusOnTab: true
|
||||
|
||||
|
|
@ -336,7 +336,7 @@ ColumnLayout {
|
|||
|
||||
StyledRect {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
color: passwordContainer.activeFocus ? Qt.lighter(Colours.tPalette.m3surfaceContainer, 1.05) : Colours.tPalette.m3surfaceContainer
|
||||
border.width: passwordContainer.activeFocus || connectButton.hasError ? 4 : (root.shouldBeVisible ? 1 : 0)
|
||||
border.color: {
|
||||
|
|
@ -369,7 +369,7 @@ ColumnLayout {
|
|||
|
||||
hoverEnabled: false
|
||||
cursorShape: Qt.IBeamCursor
|
||||
radius: Appearance.rounding.normal
|
||||
radius: Tokens.rounding.normal
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
@ -378,8 +378,8 @@ ColumnLayout {
|
|||
anchors.centerIn: parent
|
||||
text: qsTr("Password")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.family: Appearance.font.family.mono
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
font.family: Tokens.font.family.mono
|
||||
opacity: passwordContainer.passwordBuffer ? 0 : 1
|
||||
|
||||
Behavior on opacity {
|
||||
|
|
@ -394,10 +394,10 @@ ColumnLayout {
|
|||
|
||||
anchors.centerIn: parent
|
||||
implicitWidth: fullWidth
|
||||
implicitHeight: Appearance.font.size.normal
|
||||
implicitHeight: Tokens.font.size.normal
|
||||
|
||||
orientation: Qt.Horizontal
|
||||
spacing: Appearance.spacing.small / 2
|
||||
spacing: Tokens.spacing.small / 2
|
||||
interactive: false
|
||||
|
||||
model: ScriptModel {
|
||||
|
|
@ -411,7 +411,7 @@ ColumnLayout {
|
|||
implicitHeight: charList.implicitHeight
|
||||
|
||||
color: Colours.palette.m3onSurface
|
||||
radius: Appearance.rounding.small / 2
|
||||
radius: Tokens.rounding.small / 2
|
||||
|
||||
opacity: 0
|
||||
scale: 0
|
||||
|
|
@ -454,8 +454,8 @@ ColumnLayout {
|
|||
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveFastSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
|
||||
duration: Tokens.anim.durations.expressiveFastSpatial
|
||||
easing: Tokens.anim.expressiveFastSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -467,15 +467,15 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.topMargin: Tokens.spacing.normal
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
TextButton {
|
||||
id: cancelButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: Appearance.font.size.normal + Appearance.padding.normal * 2
|
||||
Layout.minimumHeight: Tokens.font.size.normal + Tokens.padding.normal * 2
|
||||
inactiveColour: Colours.palette.m3secondaryContainer
|
||||
inactiveOnColour: Colours.palette.m3onSecondaryContainer
|
||||
text: qsTr("Cancel")
|
||||
|
|
@ -490,7 +490,7 @@ ColumnLayout {
|
|||
property bool hasError: false
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: Appearance.font.size.normal + Appearance.padding.normal * 2
|
||||
Layout.minimumHeight: Tokens.font.size.normal + Tokens.padding.normal * 2
|
||||
inactiveColour: Colours.palette.m3primary
|
||||
inactiveOnColour: Colours.palette.m3onPrimary
|
||||
text: qsTr("Connect")
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import QtQuick
|
|||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.modules.controlcenter
|
||||
import qs.modules.windowinfo
|
||||
|
||||
|
|
@ -32,13 +32,16 @@ Item {
|
|||
property string detachedMode
|
||||
property string queuedMode
|
||||
|
||||
property int animLength: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
property list<real> animCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
// Dummy object so Tokens attached prop resolves to global config
|
||||
// Anim configs are not per-monitor
|
||||
readonly property QtObject dummy: QtObject {}
|
||||
property int animLength: dummy.Tokens.anim.durations.expressiveDefaultSpatial
|
||||
property easingCurve animCurve: dummy.Tokens.anim.expressiveDefaultSpatial
|
||||
|
||||
function setAnims(detach: bool): void {
|
||||
const type = `expressive${detach ? "Slow" : "Default"}Spatial`;
|
||||
animLength = Appearance.anim.durations[type];
|
||||
animCurve = Appearance.anim.curves[type];
|
||||
animLength = dummy.Tokens.anim.durations[type];
|
||||
animCurve = dummy.Tokens.anim[type];
|
||||
}
|
||||
|
||||
function detach(mode: string): void {
|
||||
|
|
@ -140,7 +143,7 @@ Item {
|
|||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: root.animLength
|
||||
easing.bezierCurve: root.animCurve
|
||||
easing: root.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +152,7 @@ Item {
|
|||
|
||||
Anim {
|
||||
duration: root.animLength
|
||||
easing.bezierCurve: root.animCurve
|
||||
easing: root.animCurve
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
|
@ -14,8 +14,8 @@ ColumnLayout {
|
|||
kb.refresh();
|
||||
}
|
||||
|
||||
spacing: Appearance.spacing.small
|
||||
width: Config.bar.sizes.kbLayoutWidth
|
||||
spacing: Tokens.spacing.small
|
||||
width: Tokens.sizes.bar.kbLayoutWidth
|
||||
|
||||
Component.onCompleted: kb.start()
|
||||
|
||||
|
|
@ -24,8 +24,8 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.padding.normal
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Tokens.padding.normal
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
text: qsTr("Keyboard Layouts")
|
||||
font.weight: 500
|
||||
}
|
||||
|
|
@ -36,14 +36,14 @@ ColumnLayout {
|
|||
model: kb.visibleModel
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
Layout.topMargin: Tokens.spacing.small
|
||||
|
||||
clip: true
|
||||
interactive: true
|
||||
implicitHeight: Math.min(contentHeight, 320)
|
||||
visible: kb.visibleModel.count > 0
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
add: Transition {
|
||||
NumberAnimation {
|
||||
|
|
@ -88,7 +88,7 @@ ColumnLayout {
|
|||
readonly property bool isDisabled: layoutIndex > 3
|
||||
|
||||
width: list.width
|
||||
height: Math.max(36, rowText.implicitHeight + Appearance.padding.small * 2)
|
||||
height: Math.max(36, rowText.implicitHeight + Tokens.padding.small * 2)
|
||||
ToolTip.visible: isDisabled && layer.containsMouse
|
||||
ToolTip.text: "XKB limitation: maximum 4 layouts allowed"
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ ColumnLayout {
|
|||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
implicitHeight: parent.height - 4
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
enabled: !kbDelegate.isDisabled
|
||||
}
|
||||
|
||||
|
|
@ -114,8 +114,8 @@ ColumnLayout {
|
|||
anchors.verticalCenter: layer.verticalCenter
|
||||
anchors.left: layer.left
|
||||
anchors.right: layer.right
|
||||
anchors.leftMargin: Appearance.padding.small
|
||||
anchors.rightMargin: Appearance.padding.small
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
text: kbDelegate.label
|
||||
elide: Text.ElideRight
|
||||
opacity: kbDelegate.isDisabled ? 0.4 : 1.0
|
||||
|
|
@ -126,8 +126,8 @@ ColumnLayout {
|
|||
Rectangle {
|
||||
visible: kb.activeLabel.length > 0
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
Layout.topMargin: Tokens.spacing.small
|
||||
|
||||
implicitHeight: 1
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
|
|
@ -139,9 +139,9 @@ ColumnLayout {
|
|||
|
||||
visible: kb.activeLabel.length > 0
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: Appearance.padding.small
|
||||
Layout.topMargin: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.small
|
||||
Layout.rightMargin: Tokens.padding.small
|
||||
Layout.topMargin: Tokens.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
opacity: 1
|
||||
scale: 1
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Caelestia
|
||||
import qs.config
|
||||
import Caelestia.Config
|
||||
|
||||
// TODO: handle this better later
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ Item {
|
|||
arr = arr.filter(i => i.layoutIndex !== activeIndex);
|
||||
arr.forEach(i => _visibleModel.append(i));
|
||||
|
||||
if (!Config.utilities.toasts.kbLimit)
|
||||
if (!GlobalConfig.utilities.toasts.kbLimit)
|
||||
return;
|
||||
|
||||
if (_layoutsModel.count > 4) {
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.controls
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property ShellScreen screen
|
||||
readonly property int rounding: floating ? 0 : Appearance.rounding.normal
|
||||
readonly property int rounding: floating ? 0 : Tokens.rounding.normal
|
||||
|
||||
property alias floating: session.floating
|
||||
property alias active: session.active
|
||||
|
|
@ -27,8 +27,8 @@ Item {
|
|||
|
||||
signal close
|
||||
|
||||
implicitWidth: implicitHeight * Config.controlCenter.sizes.ratio
|
||||
implicitHeight: screen.height * Config.controlCenter.sizes.heightMult
|
||||
implicitWidth: implicitHeight * Tokens.sizes.controlCenter.ratio
|
||||
implicitHeight: screen.height * Tokens.sizes.controlCenter.heightMult
|
||||
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.modules.controlcenter
|
||||
|
||||
Item {
|
||||
|
|
@ -15,23 +15,23 @@ Item {
|
|||
required property Session session
|
||||
required property bool initialOpeningComplete
|
||||
|
||||
implicitWidth: layout.implicitWidth + Appearance.padding.larger * 4
|
||||
implicitHeight: layout.implicitHeight + Appearance.padding.large * 2
|
||||
implicitWidth: layout.implicitWidth + Tokens.padding.larger * 4
|
||||
implicitHeight: layout.implicitHeight + Tokens.padding.large * 2
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.padding.larger * 2
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.leftMargin: Tokens.padding.larger * 2
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
states: State {
|
||||
name: "expanded"
|
||||
when: root.session.navExpanded
|
||||
|
||||
PropertyChanges {
|
||||
layout.spacing: Appearance.spacing.small
|
||||
layout.spacing: root.Tokens.spacing.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ Item {
|
|||
}
|
||||
|
||||
Loader {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
Layout.topMargin: Tokens.spacing.large
|
||||
asynchronous: true
|
||||
active: !root.session.floating
|
||||
visible: active
|
||||
|
|
@ -51,10 +51,10 @@ Item {
|
|||
readonly property int nonAnimWidth: normalWinIcon.implicitWidth + (root.session.navExpanded ? normalWinLabel.anchors.leftMargin + normalWinLabel.implicitWidth : 0) + normalWinIcon.anchors.leftMargin * 2
|
||||
|
||||
implicitWidth: nonAnimWidth
|
||||
implicitHeight: root.session.navExpanded ? normalWinIcon.implicitHeight + Appearance.padding.normal * 2 : nonAnimWidth
|
||||
implicitHeight: root.session.navExpanded ? normalWinIcon.implicitHeight + Tokens.padding.normal * 2 : nonAnimWidth
|
||||
|
||||
color: Colours.palette.m3primaryContainer
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
StateLayer {
|
||||
id: normalWinState
|
||||
|
|
@ -75,11 +75,11 @@ Item {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.padding.large
|
||||
anchors.leftMargin: Tokens.padding.large
|
||||
|
||||
text: "select_window"
|
||||
color: Colours.palette.m3onPrimaryContainer
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
fill: 1
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ Item {
|
|||
|
||||
anchors.left: normalWinIcon.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.spacing.normal
|
||||
anchors.leftMargin: Tokens.spacing.normal
|
||||
|
||||
text: qsTr("Float window")
|
||||
color: Colours.palette.m3onPrimaryContainer
|
||||
|
|
@ -96,22 +96,22 @@ Item {
|
|||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ Item {
|
|||
NavItem {
|
||||
required property int index
|
||||
|
||||
Layout.topMargin: index === 0 ? Appearance.spacing.large * 2 : 0
|
||||
Layout.topMargin: index === 0 ? Tokens.spacing.large * 2 : 0
|
||||
icon: PaneRegistry.getByIndex(index).icon
|
||||
label: PaneRegistry.getByIndex(index).label
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ Item {
|
|||
expandedLabel.opacity: 1
|
||||
smallLabel.opacity: 0
|
||||
background.implicitWidth: icon.implicitWidth + icon.anchors.leftMargin * 2 + expandedLabel.anchors.leftMargin + expandedLabel.implicitWidth
|
||||
background.implicitHeight: icon.implicitHeight + Appearance.padding.normal * 2
|
||||
background.implicitHeight: icon.implicitHeight + root.Tokens.padding.normal * 2
|
||||
item.implicitHeight: background.implicitHeight
|
||||
}
|
||||
}
|
||||
|
|
@ -156,24 +156,24 @@ Item {
|
|||
transitions: Transition {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
duration: Appearance.anim.durations.small
|
||||
duration: Tokens.anim.durations.small
|
||||
}
|
||||
|
||||
Anim {
|
||||
properties: "implicitWidth,implicitHeight"
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: Tokens.anim.durations.expressiveDefaultSpatial
|
||||
easing: Tokens.anim.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
id: background
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
color: Qt.alpha(Colours.palette.m3secondaryContainer, item.active ? 1 : 0)
|
||||
|
||||
implicitWidth: icon.implicitWidth + icon.anchors.leftMargin * 2
|
||||
implicitHeight: icon.implicitHeight + Appearance.padding.small
|
||||
implicitHeight: icon.implicitHeight + Tokens.padding.small
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
|
|
@ -192,11 +192,11 @@ Item {
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.padding.large
|
||||
anchors.leftMargin: Tokens.padding.large
|
||||
|
||||
text: item.icon
|
||||
color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
fill: item.active ? 1 : 0
|
||||
|
||||
Behavior on fill {
|
||||
|
|
@ -209,7 +209,7 @@ Item {
|
|||
|
||||
anchors.left: icon.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Appearance.spacing.normal
|
||||
anchors.leftMargin: Tokens.spacing.normal
|
||||
|
||||
opacity: 0
|
||||
text: item.label
|
||||
|
|
@ -222,10 +222,10 @@ Item {
|
|||
|
||||
anchors.horizontalCenter: icon.horizontalCenter
|
||||
anchors.top: icon.bottom
|
||||
anchors.topMargin: Appearance.spacing.small / 2
|
||||
anchors.topMargin: Tokens.spacing.small / 2
|
||||
|
||||
text: item.label
|
||||
font.pointSize: Appearance.font.size.small
|
||||
font.pointSize: Tokens.font.size.small
|
||||
font.capitalization: Font.Capitalize
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import "dashboard"
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import qs.modules.controlcenter
|
||||
|
||||
ClippingRectangle {
|
||||
|
|
@ -58,7 +58,7 @@ ClippingRectangle {
|
|||
Timer {
|
||||
id: animationDelayTimer
|
||||
|
||||
interval: Appearance.anim.durations.normal
|
||||
interval: Tokens.anim.durations.normal
|
||||
onTriggered: {
|
||||
layout.animationComplete = true;
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ ClippingRectangle {
|
|||
Timer {
|
||||
id: initialOpeningTimer
|
||||
|
||||
interval: Appearance.anim.durations.large
|
||||
interval: Tokens.anim.durations.large
|
||||
running: true
|
||||
onTriggered: {
|
||||
layout.initialOpeningComplete = true;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue