Commit e2c9a044 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

At least show an awkward overlay for numlock

At least until we have a proper icon

CCBUG: 391134
parent 2c8da5a4
......@@ -22,7 +22,6 @@ import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
id: root
......@@ -46,6 +45,13 @@ Item {
return "emblem-locked";
}
function overlays(identifier) {
switch(identifier) {
case "Num Lock": return ["accessories-calculator"]
default: return []
}
}
readonly property bool isLocked: keystateSource.data[plasmoid.configuration.key].Locked
readonly property string message: isLocked ? i18n("%1 is locked", translate(plasmoid.configuration.key)) : i18n("%1 is unlocked", translate(plasmoid.configuration.key))
......@@ -72,6 +78,7 @@ Item {
anchors.fill: parent
source: plasmoid.icon
active: parent.containsMouse || root.isLocked
overlays: root.overlays(plasmoid.configuration.key)
}
}
}
Supports Markdown
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