[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
wilder-5.19
Krešimir Čohar 7 years ago
parent 7ae050057e
commit 06793f21d1
  1. 10
      lookandfeel/contents/components/Clock.qml
  2. 4
      lookandfeel/contents/components/UserDelegate.qml

@ -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

Loading…
Cancel
Save