From 64f6081b149de14a75b84073678a306f44e84a98 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:23:20 +0100 Subject: [PATCH] config: move quote settings to clock widget subsection --- .../ii/modules/background/widgets/clock/ClockWidget.qml | 6 +++--- .../ii/modules/background/widgets/clock/CookieQuote.qml | 4 ++-- dots/.config/quickshell/ii/modules/common/Config.qml | 6 ++++-- .../quickshell/ii/modules/settings/BackgroundConfig.qml | 8 ++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/background/widgets/clock/ClockWidget.qml b/dots/.config/quickshell/ii/modules/background/widgets/clock/ClockWidget.qml index 2c3852f4e..3fcd00d46 100644 --- a/dots/.config/quickshell/ii/modules/background/widgets/clock/ClockWidget.qml +++ b/dots/.config/quickshell/ii/modules/background/widgets/clock/ClockWidget.qml @@ -49,7 +49,7 @@ AbstractBackgroundWidget { } FadeLoader { anchors.horizontalCenter: parent.horizontalCenter - shown: Config.options.background.showQuote && Config.options.background.quote !== "" + shown: Config.options.background.widgets.clock.quote.enable && Config.options.background.widgets.clock.quote.text !== "" sourceComponent: CookieQuote {} } } @@ -73,7 +73,7 @@ AbstractBackgroundWidget { } StyledText { // Somehow gets fucked up if made a ClockText??? - visible: Config.options.background.showQuote && Config.options.background.quote.length > 0 + visible: Config.options.background.widgets.clock.quote.enable && Config.options.background.widgets.clock.quote.text.length > 0 Layout.fillWidth: true horizontalAlignment: root.textHorizontalAlignment font { @@ -83,7 +83,7 @@ AbstractBackgroundWidget { color: root.colText style: Text.Raised styleColor: Appearance.colors.colShadow - text: Config.options.background.quote + text: Config.options.background.widgets.clock.quote.text } } } diff --git a/dots/.config/quickshell/ii/modules/background/widgets/clock/CookieQuote.qml b/dots/.config/quickshell/ii/modules/background/widgets/clock/CookieQuote.qml index 45b726fa3..19567aeb4 100644 --- a/dots/.config/quickshell/ii/modules/background/widgets/clock/CookieQuote.qml +++ b/dots/.config/quickshell/ii/modules/background/widgets/clock/CookieQuote.qml @@ -7,7 +7,7 @@ import Qt5Compat.GraphicalEffects Item { id: root - readonly property string quoteText: Config.options.background.quote + readonly property string quoteText: Config.options.background.widgets.clock.quote.text implicitWidth: quoteBox.implicitWidth implicitHeight: quoteBox.implicitHeight @@ -47,7 +47,7 @@ Item { StyledText { id: quoteStyledText horizontalAlignment: Text.AlignLeft - text: Config.options.background.quote + text: Config.options.background.widgets.clock.quote.text color: Appearance.colors.colOnSecondaryContainer font { family: Appearance.font.family.reading diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index c457f674d..455bc2345 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -169,6 +169,10 @@ Singleton { property JsonObject digital: JsonObject { property bool animateChange: true } + property JsonObject quote: JsonObject { + property bool enable: false + property string text: "" + } } property JsonObject weather: JsonObject { property bool enable: false @@ -179,8 +183,6 @@ Singleton { } property string wallpaperPath: "" property string thumbnailPath: "" - property string quote: "" - property bool showQuote: false property bool hideWhenFullscreen: true property JsonObject parallax: JsonObject { property bool vertical: false diff --git a/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml b/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml index d1a3bf920..3b388583f 100644 --- a/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml @@ -406,18 +406,18 @@ ContentPage { ConfigSwitch { buttonIcon: "check" text: Translation.tr("Enable") - checked: Config.options.background.showQuote + checked: Config.options.background.widgets.clock.quote.enable onCheckedChanged: { - Config.options.background.showQuote = checked; + Config.options.background.widgets.clock.quote.enable = checked; } } MaterialTextArea { Layout.fillWidth: true placeholderText: Translation.tr("Quote") - text: Config.options.background.quote + text: Config.options.background.widgets.clock.quote.text wrapMode: TextEdit.Wrap onTextChanged: { - Config.options.background.quote = text; + Config.options.background.widgets.clock.quote.text = text; } } }