Handle resetting OSD values in the shell so you don't need to take care of this in every l'n'f package

wilder-5.14
Kai Uwe Broulik 11 years ago
parent 96c83af962
commit b148ba3c68
  1. 8
      lookandfeel/contents/osd/Osd.qml
  2. 4
      shell/osd.cpp

@ -37,14 +37,6 @@ PlasmaCore.Dialog {
// false for displaying the value as normal text
property bool showingProgress: false
onVisibleChanged: {
// this is needed to prevent fading from "old" values when the OSD shows up
if (!visible) {
root.icon = "";
root.osdValue = 0;
}
}
mainItem: Item {
height: units.gridUnit * 15
width: height

@ -130,4 +130,8 @@ void Osd::showOsd()
void Osd::hideOsd()
{
m_osdObject->rootObject()->setProperty("visible", false);
// this is needed to prevent fading from "old" values when the OSD shows up
m_osdObject->rootObject()->setProperty("icon", "");
m_osdObject->rootObject()->setProperty("osdValue", 0);
}

Loading…
Cancel
Save