diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 47962f514..69e249c9a 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -24,6 +24,7 @@ Variants { readonly property real clockSizePadding: 20 readonly property real screenSizePadding: 50 readonly property string clockStyle: Config.options.background.clock.style + readonly property bool showQuote: Config.options.background.showQuote && Config.options.background.quote !== "" model: Quickshell.screens PanelWindow { @@ -339,6 +340,14 @@ Variants { active: visible sourceComponent: CookieClock {} } + + Loader { + id: cookieQuoteLoader + visible: root.showQuote + active: visible + anchors.horizontalCenter: parent.horizontalCenter + sourceComponent: CookieQuote {} + } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml new file mode 100644 index 000000000..c3d83e511 --- /dev/null +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieQuote.qml @@ -0,0 +1,62 @@ +import qs +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick +import QtQuick.Layouts +import Qt5Compat.GraphicalEffects + + +Item { + id: root + + readonly property string quoteText: Config.options.background.quote + + implicitWidth: quoteBox.implicitWidth + implicitHeight: quoteBox.implicitHeight + + anchors.bottom: parent.bottom + anchors.bottomMargin: -24 + + DropShadow { + source: quoteBox + anchors.fill: quoteBox + horizontalOffset: 0 + verticalOffset: 2 + radius: 12 + samples: radius * 2 + 1 + color: root.colShadow + transparentBorder: true + } + + Rectangle { + id: quoteBox + + implicitWidth: quoteStyledText.width + quoteIcon.width + 16 // for spacing on both sides + implicitHeight: quoteStyledText.height + 8 + radius: Appearance.rounding.small + color: Appearance.colors.colSecondaryContainer + RowLayout { + anchors.centerIn: parent + spacing: 4 + MaterialSymbol { + id: quoteIcon + iconSize: Appearance.font.pixelSize.huge + text: "comic_bubble" + color: Appearance.colors.colOnSecondaryContainer + } + StyledText { + id: quoteStyledText + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + text: Config.options.background.quote + font { + family: Appearance.font.family.main + pixelSize: Appearance.font.pixelSize.large + weight: Font.Normal + italic: true + } + } + } + } +} \ No newline at end of file