Fix all errors and warnings on login, lock, and logout screens

There were three principal sources of errors and warnings:
1. Un-ported `onFooChanged` statements
2. `config.fontSize` being unconditionally referenced from components
   without access to it (it comes from the SDDM config)
3. Accessing units from the context property rather than the singleton

All are fixed now. Tested with:
1. `sddm-greeter --test-mode --theme ~/kde/usr/share/sddm/themes/breeze/`
2. `~/kde/usr/lib64/libexec/kscreenlocker_greet --testing --theme ~/kde/src/plasma-workspace/lookandfeel`
3. `/kde/usr/lib64/libexec/ksmserver-logout-greeter --fakearg`

No regressions found.

BUG: 425349
FIXED-IN: 5.20
wilder-portage-prov
Nate Graham 6 years ago
parent 70a71393e5
commit bcaf3886d9
  1. 2
      components/workspace/BatteryIcon.qml
  2. 4
      lookandfeel/contents/components/ActionButton.qml
  3. 8
      lookandfeel/contents/components/Battery.qml
  4. 4
      lookandfeel/contents/components/KeyboardLayoutButton.qml
  5. 5
      lookandfeel/contents/components/SessionManagementScreen.qml
  6. 5
      lookandfeel/contents/components/UserDelegate.qml
  7. 3
      lookandfeel/contents/components/UserList.qml
  8. 2
      lookandfeel/contents/lockscreen/LockScreen.qml
  9. 10
      lookandfeel/contents/lockscreen/LockScreenUi.qml
  10. 2
      lookandfeel/contents/lockscreen/MainBlock.qml
  11. 1
      lookandfeel/contents/logout/Logout.qml
  12. 1
      sddm-theme/KeyboardButton.qml
  13. 2
      sddm-theme/Login.qml
  14. 22
      sddm-theme/Main.qml
  15. 2
      sddm-theme/SessionButton.qml

@ -39,7 +39,7 @@ Item {
PlasmaCore.SvgItem {
id: batterySvg
anchors.centerIn: parent
width: units.roundToIconSize(Math.min(parent.width, parent.height))
width: PlasmaCore.Units.roundToIconSize(Math.min(parent.width, parent.height))
height: width
svg: svg
elementId: "Battery"

@ -30,7 +30,7 @@ Item {
property alias labelRendering: label.renderType
property alias circleOpacity: iconCircle.opacity
property alias circleVisiblity: iconCircle.visible
property int fontSize: config.fontSize
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 1
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
signal clicked
@ -96,7 +96,7 @@ Item {
PlasmaComponents3.Label {
id: label
font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
font.pointSize: root.fontSize
anchors {
top: icon.bottom
topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing

@ -24,7 +24,11 @@ import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.workspace.components 2.0 as PW
Row {
spacing: units.smallSpacing
id: row
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize
spacing: PlasmaCore.Units.smallSpacing
visible: pmSource.data["Battery"]["Has Cumulative"]
PlasmaCore.DataSource {
@ -45,7 +49,7 @@ Row {
PlasmaComponents3.Label {
id: batteryLabel
font.pointSize: config.fontSize
font.pointSize: row.fontSize
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1%", battery.percent)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Battery at %1%", battery.percent)
}

@ -25,14 +25,10 @@ import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.workspace.keyboardlayout 1.0
PlasmaComponents3.ToolButton {
property int fontSize: config.fontSize
id: kbLayoutButton
icon.name: "input-keyboard"
text: layout.currentLayoutDisplayName
font.pointSize: Math.max(fontSize,theme.defaultFont.pointSize)
Accessible.name: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to change keyboard layout", "Switch layout")

@ -61,7 +61,7 @@ Item {
property alias userList: userListView
property int fontSize: config.fontSize
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
default property alias _children: innerLayout.children
@ -73,6 +73,7 @@ Item {
left: parent.left
right: parent.right
}
fontSize: root.fontSize
}
//goal is to show the prompts, in ~16 grid units high, then the action buttons
@ -87,7 +88,7 @@ Item {
anchors.bottom: parent.bottom
PlasmaComponents3.Label {
id: notificationsLabel
font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
font.pointSize: root.fontSize
Layout.maximumWidth: units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true

@ -31,14 +31,13 @@ Item {
property bool isCurrent: true
readonly property var m: model
property string name
property string userName
property string avatarPath
property string iconSource
property bool constrainText: true
property alias nameFontSize: usernameDelegate.font.pointSize
property int fontSize: config.fontSize
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
signal clicked()
property real faceSize: units.gridUnit * 7
@ -161,7 +160,7 @@ Item {
PlasmaComponents3.Label {
id: usernameDelegate
font.pointSize: Math.max(fontSize + 2,theme.defaultFont.pointSize + 2)
font.pointSize: wrapper.fontSize
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter

@ -18,12 +18,14 @@
*/
import QtQuick 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
ListView {
id: view
readonly property string selectedUser: currentItem ? currentItem.userName : ""
readonly property int userItemWidth: units.gridUnit * 8
readonly property int userItemHeight: units.gridUnit * 8
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2
implicitHeight: userItemHeight
@ -47,6 +49,7 @@ ListView {
delegate: UserDelegate {
avatarPath: model.icon || ""
iconSource: model.iconName || "user-identity"
fontSize: view.fontSize
name: {
var displayName = model.realName || model.name

@ -52,7 +52,7 @@ Item {
Connections {
id:loaderConnection
target: org_kde_plasma_screenlocker_greeter_view
onFrameSwapped: {
function onFrameSwapped() {
mainLoader.source = "LockScreenUi.qml";
loaderConnection.target = null;
}

@ -40,19 +40,19 @@ PlasmaCore.ColorScope {
Connections {
target: authenticator
onFailed: {
function onFailed() {
root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed");
}
onGraceLockedChanged: {
function onGraceLockedChanged() {
if (!authenticator.graceLocked) {
root.notification = "";
root.clearPassword();
}
}
onMessage: {
function onMessage() {
root.notification = msg;
}
onError: {
function onError() {
root.notification = err;
}
}
@ -63,7 +63,7 @@ PlasmaCore.ColorScope {
Connections {
target: sessionManagement
onAboutToSuspend: {
function onAboutToSuspend() {
root.clearPassword();
}
}

@ -87,7 +87,7 @@ SessionManagementScreen {
Connections {
target: root
onClearPassword: {
function onClearPassword() {
passwordBox.forceActiveFocus()
passwordBox.text = "";
}

@ -119,7 +119,6 @@ PlasmaCore.ColorScope {
UserDelegate {
width: units.gridUnit * 7
height: width
nameFontSize: theme.defaultFont.pointSize + 2
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.verticalCenter

@ -12,7 +12,6 @@ PlasmaComponents.ToolButton {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName)
implicitWidth: minimumWidth
font.pointSize: config.fontSize
visible: menu.items.length > 1

@ -19,7 +19,7 @@ SessionManagementScreen {
property int visibleBoundary: mapFromItem(loginButton, 0, 0).y
onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing
property int fontSize: config.fontSize
property int fontSize: parseInt(config.fontSize)
signal loginRequest(string username, string password)

@ -29,6 +29,11 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
import "components"
// TODO: Once SDDM 0.19 is released and we are setting the font size using the
// SDDM KCM's syncing feature, remove the `config.fontSize` overrides here and
// the fontSize properties in various components, because the theme's default
// font size will be correctly propagated to the login screen
PlasmaCore.ColorScope {
id: root
@ -203,6 +208,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-suspend"
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel","Suspend to RAM","Sleep")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.suspend()
enabled: sddm.canSuspend
visible: !inputPanel.keyboardActive
@ -210,6 +216,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-reboot"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Restart")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.reboot()
enabled: sddm.canReboot
visible: !inputPanel.keyboardActive
@ -217,6 +224,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-shutdown"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Shut Down")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.powerOff()
enabled: sddm.canPowerOff
visible: !inputPanel.keyboardActive
@ -224,6 +232,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-user-prompt"
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "For switching to a username and password prompt", "Other...")
fontSize: parseInt(config.fontSize) + 1
onClicked: mainStack.push(userPromptComponent)
enabled: true
visible: !userListComponent.showUsernamePrompt && !inputPanel.keyboardActive
@ -361,6 +370,7 @@ PlasmaCore.ColorScope {
showUsernamePrompt: true
notificationMessage: root.notificationMessage
loginScreenUiVisible: loginScreenRoot.uiVisible
fontSize: parseInt(config.fontSize) + 2
// using a model rather than a QObject list to avoid QTBUG-75900
userListModel: ListModel {
@ -383,6 +393,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-suspend"
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel","Suspend to RAM","Sleep")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.suspend()
enabled: sddm.canSuspend
visible: !inputPanel.keyboardActive
@ -390,6 +401,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-reboot"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Restart")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.reboot()
enabled: sddm.canReboot
visible: !inputPanel.keyboardActive
@ -397,6 +409,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-shutdown"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Shut Down")
fontSize: parseInt(config.fontSize) + 1
onClicked: sddm.powerOff()
enabled: sddm.canPowerOff
visible: !inputPanel.keyboardActive
@ -404,6 +417,7 @@ PlasmaCore.ColorScope {
ActionButton {
iconSource: "system-user-list"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","List Users")
fontSize: parseInt(config.fontSize) + 1
onClicked: mainStack.pop()
visible: !inputPanel.keyboardActive
}
@ -460,7 +474,7 @@ PlasmaCore.ColorScope {
bottom: parent.bottom
left: parent.left
right: parent.right
margins: units.smallSpacing
margins: PlasmaCore.Units.smallSpacing
}
Behavior on opacity {
@ -478,17 +492,21 @@ PlasmaCore.ColorScope {
}
KeyboardButton {
font.pointSize: config.fontSize
}
SessionButton {
id: sessionButton
font.pointSize: config.fontSize
}
Item {
Layout.fillWidth: true
}
Battery { }
Battery {
fontSize: config.fontSize
}
}
}

@ -34,8 +34,6 @@ PlasmaComponents.ToolButton {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "")
font.pointSize: config.fontSize
Component.onCompleted: {
currentIndex = sessionModel.lastIndex
}

Loading…
Cancel
Save