forked from Shinonome/dots-hyprland
config: move quote settings to clock widget subsection
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user