Compare commits

...

3 commits

Author SHA1 Message Date
2Epik4u
957c3434b7 Merge branch 'Plasma/6.7' into 'Plasma/6.7'
Fix aero style highlighted text

See merge request aeroshell/atp/aerothemeplasma!75
2026-08-20 21:25:33 +00:00
wackyideas
0d166f8ba2 lockscreen: fix status messages not showing [skip ci]
This fixes the bug where status messages won't show up. It also allows
for multiple messages to be displayed in order, with error messages
having higher priority.
2026-08-20 16:24:14 +02:00
2Epik4u
84a8eb8b50 Fix aero style highlighted text 2026-08-18 23:49:54 -04:00
2 changed files with 27 additions and 12 deletions

View file

@ -56,7 +56,7 @@ ForegroundInactive=143,199,255
ForegroundLink=0,0,255
ForegroundNegative=176,55,69
ForegroundNeutral=246,116,0
ForegroundNormal=255,255,255
ForegroundNormal=0,0,0
ForegroundPositive=23,104,57
ForegroundVisited=128,0,128

View file

@ -29,8 +29,8 @@ Item {
signal switchUserClicked()
property string notification
property string notificationIcon
property list<string> notification: []
property list<string> notificationIcon: []
property alias switchUserVisible: switchUser.visible
property bool capsLockOn: false
@ -48,12 +48,17 @@ Item {
}
function showMessage(message: string, icon: string) {
if(icon == "dialog-error") {
root.notificationIcon = [icon, ...root.notificationIcon];
root.notification = [message, ...root.notification];
} else {
root.notificationIcon.push(icon);
root.notification.push(message);
}
if(!statusPage.visible) {
pageView.replaceCurrentItem(statusPage);
k.forceActiveFocus();
}
root.notification = message;
root.notificationIcon = icon;
}
component CorrectedLabel: Text {
@ -104,10 +109,10 @@ Item {
showMessage(i18nd("kscreenlocker_greet", "The user name or password is incorrect."), "dialog-error");
}
function onBusyChanged() {
if(!authenticator.busy) {
/*if(!authenticator.busy && !statusPage.visible) {
root.notification = "";
root.notificationIcon = "";
}
}*/
}
function onInfoMessageChanged() {
showMessage(authenticator.infoMessage, "dialog-information");
@ -421,7 +426,9 @@ Item {
id: statusPage
visible: pageView.currentItem == statusPage
onVisibleChanged: k.forceActiveFocus();
onVisibleChanged: {
k.forceActiveFocus();
}
ColumnLayout {
anchors.centerIn: parent
@ -430,17 +437,19 @@ Item {
spacing: 40
RowLayout {
id: statusLabel
Layout.fillWidth: true
Kirigami.Icon {
implicitHeight: 32
implicitWidth: 32
source: root.notificationIcon
source: root.notificationIcon.length > 0 ? root.notificationIcon[0] : ""
}
CorrectedLabel {
Layout.alignment: Qt.AlignVCenter
color: "white"
text: root.notification
text: root.notification.length > 0 ? root.notification[0] : ""
}
}
@ -449,10 +458,16 @@ Item {
signal accepted()
onAccepted: {
root.notification.shift();
root.notificationIcon.shift();
if(root.notification.length == 0) {
pageView.replaceCurrentItem(mainPage);
root.resetFocus(true);
}
}
Layout.alignment: Qt.AlignHCenter
implicitWidth: 93