summaryrefslogtreecommitdiff
path: root/modules/controlcenter/appearance
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-28 19:21:44 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-28 19:21:44 +1100
commit9d7f0c48cebec02aaf2ca780b89a763ce91f8624 (patch)
tree2345921b670f730268203020e754465503707ed3 /modules/controlcenter/appearance
parentcontrolcenter: remove qt5compat dep (diff)
downloadcaelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.tar.gz
caelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.tar.bz2
caelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.zip
internal: format
Diffstat (limited to 'modules/controlcenter/appearance')
-rw-r--r--modules/controlcenter/appearance/AppearancePane.qml158
-rw-r--r--modules/controlcenter/appearance/sections/AnimationsSection.qml12
-rw-r--r--modules/controlcenter/appearance/sections/BackgroundSection.qml125
-rw-r--r--modules/controlcenter/appearance/sections/BorderSection.qml23
-rw-r--r--modules/controlcenter/appearance/sections/ColorSchemeSection.qml1
-rw-r--r--modules/controlcenter/appearance/sections/ColorVariantSection.qml1
-rw-r--r--modules/controlcenter/appearance/sections/FontsSection.qml12
-rw-r--r--modules/controlcenter/appearance/sections/ScalesSection.qml34
-rw-r--r--modules/controlcenter/appearance/sections/ThemeModeSection.qml1
-rw-r--r--modules/controlcenter/appearance/sections/TransparencySection.qml31
10 files changed, 223 insertions, 175 deletions
diff --git a/modules/controlcenter/appearance/AppearancePane.qml b/modules/controlcenter/appearance/AppearancePane.qml
index 218433b..4251167 100644
--- a/modules/controlcenter/appearance/AppearancePane.qml
+++ b/modules/controlcenter/appearance/AppearancePane.qml
@@ -73,15 +73,15 @@ Item {
Config.background.desktopClock.enabled = root.desktopClockEnabled;
Config.background.enabled = root.backgroundEnabled;
- Config.background.desktopClock.scale = root.desktopClockScale
- Config.background.desktopClock.position = root.desktopClockPosition
- Config.background.desktopClock.shadow.enabled = root.desktopClockShadowEnabled
- Config.background.desktopClock.shadow.opacity = root.desktopClockShadowOpacity
- Config.background.desktopClock.shadow.blur = root.desktopClockShadowBlur
- Config.background.desktopClock.background.enabled = root.desktopClockBackgroundEnabled
- Config.background.desktopClock.background.opacity = root.desktopClockBackgroundOpacity
- Config.background.desktopClock.background.blur = root.desktopClockBackgroundBlur
- Config.background.desktopClock.invertColors = root.desktopClockInvertColors
+ Config.background.desktopClock.scale = root.desktopClockScale;
+ Config.background.desktopClock.position = root.desktopClockPosition;
+ Config.background.desktopClock.shadow.enabled = root.desktopClockShadowEnabled;
+ Config.background.desktopClock.shadow.opacity = root.desktopClockShadowOpacity;
+ Config.background.desktopClock.shadow.blur = root.desktopClockShadowBlur;
+ Config.background.desktopClock.background.enabled = root.desktopClockBackgroundEnabled;
+ Config.background.desktopClock.background.opacity = root.desktopClockBackgroundOpacity;
+ Config.background.desktopClock.background.blur = root.desktopClockBackgroundBlur;
+ Config.background.desktopClock.invertColors = root.desktopClockInvertColors;
Config.background.visualiser.enabled = root.visualiserEnabled;
Config.background.visualiser.autoHide = root.visualiserAutoHide;
@@ -116,11 +116,11 @@ Item {
Loader {
id: wallpaperLoader
-
+
Layout.fillWidth: true
Layout.fillHeight: true
Layout.bottomMargin: -Appearance.padding.large * 2
-
+
active: {
const isActive = root.session.activeIndex === 3;
const isAdjacent = Math.abs(root.session.activeIndex - 3) === 1;
@@ -129,13 +129,13 @@ Item {
const shouldActivate = loader && loader.item !== null && (isActive || isAdjacent);
return shouldActivate;
}
-
+
onStatusChanged: {
if (status === Loader.Error) {
console.error("[AppearancePane] Wallpaper loader error!");
}
}
-
+
sourceComponent: WallpaperGrid {
session: root.session
}
@@ -155,7 +155,6 @@ Item {
flickableDirection: Flickable.VerticalFlick
contentHeight: sidebarLayout.height
-
StyledScrollBar.vertical: StyledScrollBar {
flickable: sidebarFlickable
}
@@ -165,96 +164,87 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
spacing: Appearance.spacing.small
-
+
readonly property var rootPane: sidebarFlickable.rootPane
- readonly property bool allSectionsExpanded:
- themeModeSection.expanded &&
- colorVariantSection.expanded &&
- colorSchemeSection.expanded &&
- animationsSection.expanded &&
- fontsSection.expanded &&
- scalesSection.expanded &&
- transparencySection.expanded &&
- borderSection.expanded &&
- backgroundSection.expanded
+ readonly property bool allSectionsExpanded: themeModeSection.expanded && colorVariantSection.expanded && colorSchemeSection.expanded && animationsSection.expanded && fontsSection.expanded && scalesSection.expanded && transparencySection.expanded && borderSection.expanded && backgroundSection.expanded
- RowLayout {
- spacing: Appearance.spacing.smaller
+ RowLayout {
+ spacing: Appearance.spacing.smaller
- StyledText {
- text: qsTr("Appearance")
- font.pointSize: Appearance.font.size.large
- font.weight: 500
- }
+ StyledText {
+ text: qsTr("Appearance")
+ font.pointSize: Appearance.font.size.large
+ font.weight: 500
+ }
- Item {
- Layout.fillWidth: true
- }
+ Item {
+ Layout.fillWidth: true
+ }
- IconButton {
- icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
- type: IconButton.Text
- label.animate: true
- onClicked: {
- const shouldExpand = !sidebarLayout.allSectionsExpanded;
- themeModeSection.expanded = shouldExpand;
- colorVariantSection.expanded = shouldExpand;
- colorSchemeSection.expanded = shouldExpand;
- animationsSection.expanded = shouldExpand;
- fontsSection.expanded = shouldExpand;
- scalesSection.expanded = shouldExpand;
- transparencySection.expanded = shouldExpand;
- borderSection.expanded = shouldExpand;
- backgroundSection.expanded = shouldExpand;
+ IconButton {
+ icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
+ type: IconButton.Text
+ label.animate: true
+ onClicked: {
+ const shouldExpand = !sidebarLayout.allSectionsExpanded;
+ themeModeSection.expanded = shouldExpand;
+ colorVariantSection.expanded = shouldExpand;
+ colorSchemeSection.expanded = shouldExpand;
+ animationsSection.expanded = shouldExpand;
+ fontsSection.expanded = shouldExpand;
+ scalesSection.expanded = shouldExpand;
+ transparencySection.expanded = shouldExpand;
+ borderSection.expanded = shouldExpand;
+ backgroundSection.expanded = shouldExpand;
+ }
}
}
- }
- ThemeModeSection {
- id: themeModeSection
- }
+ ThemeModeSection {
+ id: themeModeSection
+ }
- ColorVariantSection {
- id: colorVariantSection
- }
+ ColorVariantSection {
+ id: colorVariantSection
+ }
- ColorSchemeSection {
- id: colorSchemeSection
- }
+ ColorSchemeSection {
+ id: colorSchemeSection
+ }
- AnimationsSection {
- id: animationsSection
- rootPane: sidebarFlickable.rootPane
- }
+ AnimationsSection {
+ id: animationsSection
+ rootPane: sidebarFlickable.rootPane
+ }
- FontsSection {
- id: fontsSection
- rootPane: sidebarFlickable.rootPane
- }
+ FontsSection {
+ id: fontsSection
+ rootPane: sidebarFlickable.rootPane
+ }
- ScalesSection {
- id: scalesSection
- rootPane: sidebarFlickable.rootPane
- }
+ ScalesSection {
+ id: scalesSection
+ rootPane: sidebarFlickable.rootPane
+ }
- TransparencySection {
- id: transparencySection
- rootPane: sidebarFlickable.rootPane
- }
+ TransparencySection {
+ id: transparencySection
+ rootPane: sidebarFlickable.rootPane
+ }
- BorderSection {
- id: borderSection
- rootPane: sidebarFlickable.rootPane
- }
+ BorderSection {
+ id: borderSection
+ rootPane: sidebarFlickable.rootPane
+ }
- BackgroundSection {
- id: backgroundSection
- rootPane: sidebarFlickable.rootPane
+ BackgroundSection {
+ id: backgroundSection
+ rootPane: sidebarFlickable.rootPane
+ }
}
}
}
- }
rightContent: appearanceRightContentComponent
}
diff --git a/modules/controlcenter/appearance/sections/AnimationsSection.qml b/modules/controlcenter/appearance/sections/AnimationsSection.qml
index 03fc2b1..0cba5ce 100644
--- a/modules/controlcenter/appearance/sections/AnimationsSection.qml
+++ b/modules/controlcenter/appearance/sections/AnimationsSection.qml
@@ -23,20 +23,22 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Animation duration scale")
value: rootPane.animDurationsScale
from: 0.1
to: 5.0
decimals: 1
suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 5.0 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.1
+ top: 5.0
+ }
+
+ onValueModified: newValue => {
rootPane.animDurationsScale = newValue;
rootPane.saveConfig();
}
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/BackgroundSection.qml b/modules/controlcenter/appearance/sections/BackgroundSection.qml
index d5c16d4..2f75c9e 100644
--- a/modules/controlcenter/appearance/sections/BackgroundSection.qml
+++ b/modules/controlcenter/appearance/sections/BackgroundSection.qml
@@ -45,7 +45,7 @@ CollapsibleSection {
SectionContainer {
id: posContainer
-
+
contentSpacing: Appearance.spacing.small
z: 1
@@ -67,16 +67,29 @@ CollapsibleSection {
SplitButtonRow {
label: qsTr("Vertical Position")
enabled: rootPane.desktopClockEnabled
-
+
menuItems: [
- MenuItem { text: qsTr("Top"); icon: "vertical_align_top"; property string val: "top" },
- MenuItem { text: qsTr("Middle"); icon: "vertical_align_center"; property string val: "middle" },
- MenuItem { text: qsTr("Bottom"); icon: "vertical_align_bottom"; property string val: "bottom" }
+ MenuItem {
+ text: qsTr("Top")
+ icon: "vertical_align_top"
+ property string val: "top"
+ },
+ MenuItem {
+ text: qsTr("Middle")
+ icon: "vertical_align_center"
+ property string val: "middle"
+ },
+ MenuItem {
+ text: qsTr("Bottom")
+ icon: "vertical_align_bottom"
+ property string val: "bottom"
+ }
]
Component.onCompleted: {
- for(let i=0; i < menuItems.length; i++) {
- if(menuItems[i].val === posContainer.currentV) active = menuItems[i];
+ for (let i = 0; i < menuItems.length; i++) {
+ if (menuItems[i].val === posContainer.currentV)
+ active = menuItems[i];
}
}
@@ -88,16 +101,29 @@ CollapsibleSection {
label: qsTr("Horizontal Position")
enabled: rootPane.desktopClockEnabled
expandedZ: 99
-
+
menuItems: [
- MenuItem { text: qsTr("Left"); icon: "align_horizontal_left"; property string val: "left" },
- MenuItem { text: qsTr("Center"); icon: "align_horizontal_center"; property string val: "center" },
- MenuItem { text: qsTr("Right"); icon: "align_horizontal_right"; property string val: "right" }
+ MenuItem {
+ text: qsTr("Left")
+ icon: "align_horizontal_left"
+ property string val: "left"
+ },
+ MenuItem {
+ text: qsTr("Center")
+ icon: "align_horizontal_center"
+ property string val: "center"
+ },
+ MenuItem {
+ text: qsTr("Right")
+ icon: "align_horizontal_right"
+ property string val: "right"
+ }
]
Component.onCompleted: {
- for(let i=0; i < menuItems.length; i++) {
- if(menuItems[i].val === posContainer.currentH) active = menuItems[i];
+ for (let i = 0; i < menuItems.length; i++) {
+ if (menuItems[i].val === posContainer.currentH)
+ active = menuItems[i];
}
}
@@ -137,17 +163,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Opacity")
value: rootPane.desktopClockShadowOpacity * 100
from: 0
to: 100
suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 100
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.desktopClockShadowOpacity = newValue / 100;
rootPane.saveConfig();
}
@@ -159,17 +188,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Blur")
value: rootPane.desktopClockShadowBlur * 100
from: 0
to: 100
suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 100
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.desktopClockShadowBlur = newValue / 100;
rootPane.saveConfig();
}
@@ -209,17 +241,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Opacity")
value: rootPane.desktopClockBackgroundOpacity * 100
from: 0
to: 100
suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 100
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.desktopClockBackgroundOpacity = newValue / 100;
rootPane.saveConfig();
}
@@ -227,7 +262,6 @@ CollapsibleSection {
}
}
-
StyledText {
Layout.topMargin: Appearance.spacing.normal
text: qsTr("Visualiser")
@@ -258,17 +292,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Visualiser rounding")
value: rootPane.visualiserRounding
from: 0
to: 10
stepSize: 1
- validator: IntValidator { bottom: 0; top: 10 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 10
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.visualiserRounding = Math.round(newValue);
rootPane.saveConfig();
}
@@ -280,18 +317,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Visualiser spacing")
value: rootPane.visualiserSpacing
from: 0
to: 2
- validator: DoubleValidator { bottom: 0; top: 2 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0
+ top: 2
+ }
+
+ onValueModified: newValue => {
rootPane.visualiserSpacing = newValue;
rootPane.saveConfig();
}
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/BorderSection.qml b/modules/controlcenter/appearance/sections/BorderSection.qml
index dae26c3..9532d70 100644
--- a/modules/controlcenter/appearance/sections/BorderSection.qml
+++ b/modules/controlcenter/appearance/sections/BorderSection.qml
@@ -23,16 +23,19 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Border rounding")
value: rootPane.borderRounding
from: 0.1
to: 100
decimals: 1
suffix: "px"
- validator: DoubleValidator { bottom: 0.1; top: 100 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.1
+ top: 100
+ }
+
+ onValueModified: newValue => {
rootPane.borderRounding = newValue;
rootPane.saveConfig();
}
@@ -44,20 +47,22 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Border thickness")
value: rootPane.borderThickness
from: 0.1
to: 100
decimals: 1
suffix: "px"
- validator: DoubleValidator { bottom: 0.1; top: 100 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.1
+ top: 100
+ }
+
+ onValueModified: newValue => {
rootPane.borderThickness = newValue;
rootPane.saveConfig();
}
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/ColorSchemeSection.qml b/modules/controlcenter/appearance/sections/ColorSchemeSection.qml
index 691d908..95cb4b7 100644
--- a/modules/controlcenter/appearance/sections/ColorSchemeSection.qml
+++ b/modules/controlcenter/appearance/sections/ColorSchemeSection.qml
@@ -143,4 +143,3 @@ CollapsibleSection {
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/ColorVariantSection.qml b/modules/controlcenter/appearance/sections/ColorVariantSection.qml
index 98c3d7c..3aa17dd 100644
--- a/modules/controlcenter/appearance/sections/ColorVariantSection.qml
+++ b/modules/controlcenter/appearance/sections/ColorVariantSection.qml
@@ -89,4 +89,3 @@ CollapsibleSection {
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/FontsSection.qml b/modules/controlcenter/appearance/sections/FontsSection.qml
index ef807b1..3988863 100644
--- a/modules/controlcenter/appearance/sections/FontsSection.qml
+++ b/modules/controlcenter/appearance/sections/FontsSection.qml
@@ -261,20 +261,22 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Font size scale")
value: rootPane.fontSizeScale
from: 0.7
to: 1.5
decimals: 2
suffix: "×"
- validator: DoubleValidator { bottom: 0.7; top: 1.5 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.7
+ top: 1.5
+ }
+
+ onValueModified: newValue => {
rootPane.fontSizeScale = newValue;
rootPane.saveConfig();
}
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/ScalesSection.qml b/modules/controlcenter/appearance/sections/ScalesSection.qml
index f74923b..b0e6e38 100644
--- a/modules/controlcenter/appearance/sections/ScalesSection.qml
+++ b/modules/controlcenter/appearance/sections/ScalesSection.qml
@@ -23,16 +23,19 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Padding scale")
value: rootPane.paddingScale
from: 0.5
to: 2.0
decimals: 1
suffix: "×"
- validator: DoubleValidator { bottom: 0.5; top: 2.0 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.5
+ top: 2.0
+ }
+
+ onValueModified: newValue => {
rootPane.paddingScale = newValue;
rootPane.saveConfig();
}
@@ -44,16 +47,19 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Rounding scale")
value: rootPane.roundingScale
from: 0.1
to: 5.0
decimals: 1
suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 5.0 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.1
+ top: 5.0
+ }
+
+ onValueModified: newValue => {
rootPane.roundingScale = newValue;
rootPane.saveConfig();
}
@@ -65,20 +71,22 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Spacing scale")
value: rootPane.spacingScale
from: 0.1
to: 2.0
decimals: 1
suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 2.0 }
-
- onValueModified: (newValue) => {
+ validator: DoubleValidator {
+ bottom: 0.1
+ top: 2.0
+ }
+
+ onValueModified: newValue => {
rootPane.spacingScale = newValue;
rootPane.saveConfig();
}
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/ThemeModeSection.qml b/modules/controlcenter/appearance/sections/ThemeModeSection.qml
index c136437..04eed91 100644
--- a/modules/controlcenter/appearance/sections/ThemeModeSection.qml
+++ b/modules/controlcenter/appearance/sections/ThemeModeSection.qml
@@ -21,4 +21,3 @@ CollapsibleSection {
}
}
}
-
diff --git a/modules/controlcenter/appearance/sections/TransparencySection.qml b/modules/controlcenter/appearance/sections/TransparencySection.qml
index c9dbfb8..9a48629 100644
--- a/modules/controlcenter/appearance/sections/TransparencySection.qml
+++ b/modules/controlcenter/appearance/sections/TransparencySection.qml
@@ -32,17 +32,20 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Transparency base")
value: rootPane.transparencyBase * 100
from: 0
to: 100
suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 100
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.transparencyBase = newValue / 100;
rootPane.saveConfig();
}
@@ -54,21 +57,23 @@ CollapsibleSection {
SliderInput {
Layout.fillWidth: true
-
+
label: qsTr("Transparency layers")
value: rootPane.transparencyLayers * 100
from: 0
to: 100
suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
+ validator: IntValidator {
+ bottom: 0
+ top: 100
+ }
+ formatValueFunction: val => Math.round(val).toString()
+ parseValueFunction: text => parseInt(text)
+
+ onValueModified: newValue => {
rootPane.transparencyLayers = newValue / 100;
rootPane.saveConfig();
}
}
}
}
-