diff --git a/lookandfeel/contents/osd/Osd.qml b/lookandfeel/contents/osd/Osd.qml index b83427939..606eff4e6 100644 --- a/lookandfeel/contents/osd/Osd.qml +++ b/lookandfeel/contents/osd/Osd.qml @@ -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 diff --git a/shell/osd.cpp b/shell/osd.cpp index 4653ba839..b5d40ab35 100644 --- a/shell/osd.cpp +++ b/shell/osd.cpp @@ -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); }