Commit 06793f21 authored by Krešimir Čohar's avatar Krešimir Čohar

[sddm-theme/lock screen] Fix "unable to assign [undefined]" error

Summary:
This patch fixes the "Unable to assign [undefined] to QColor" and "Unable to assign [undefined] to int" errors that occur in UserDelegate.qml (188:9, 187:9) and Clock.qml (53:13, 52:13, 60:13, 59:13), visible in sddm-greeter's output.

It does so by resetting the label style to Normal (instead of undefined). Once Text.Normal is set, the outline color is set as transparent (but that doesn't matter since there's no outline to begin with).

Test Plan: Works the same, looks the same, no error in output.

Reviewers: #vdg, #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19577
parent 7ae05005
......@@ -44,20 +44,20 @@ Item {
spread: 0.3
color: "black" // matches Breeze window decoration and desktopcontainment
}
ColumnLayout {
id: clock
Label {
text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
style: softwareRendering ? Text.Outline : undefined
styleColor: softwareRendering ? ColorScope.backgroundColor : undefined
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 48
Layout.alignment: Qt.AlignHCenter
}
Label {
text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate)
style: softwareRendering ? Text.Outline : undefined
styleColor: softwareRendering ? ColorScope.backgroundColor : undefined
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 24
Layout.alignment: Qt.AlignHCenter
}
......
......@@ -183,8 +183,8 @@ Item {
height: implicitHeight // work around stupid bug in Plasma Components that sets the height
width: constrainText ? parent.width : implicitWidth
text: wrapper.name
style: softwareRendering ? Text.Outline : undefined
styleColor: softwareRendering ? ColorScope.backgroundColor : undefined
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
//make an indication that this has active focus, this only happens when reached with keyboard navigation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment