diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-28 19:21:44 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-28 19:21:44 +1100 |
| commit | 9d7f0c48cebec02aaf2ca780b89a763ce91f8624 (patch) | |
| tree | 2345921b670f730268203020e754465503707ed3 /modules/controlcenter/appearance/sections | |
| parent | controlcenter: remove qt5compat dep (diff) | |
| download | caelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.tar.gz caelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.tar.bz2 caelestia-shell-9d7f0c48cebec02aaf2ca780b89a763ce91f8624.zip | |
internal: format
Diffstat (limited to 'modules/controlcenter/appearance/sections')
9 files changed, 149 insertions, 91 deletions
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(); } } } } - |