Do not show OSD for invalid values of percentage like -1 or 200
REVIEW: 115712
This commit is contained in:
parent
664fd4167c
commit
334e818af0
@ -98,7 +98,8 @@ void Osd::virtualDesktopChanged(const QString ¤tVirtualDesktopName)
|
||||
|
||||
void Osd::showProgress(const QString &icon, const int percent, const QString &additionalText)
|
||||
{
|
||||
m_osdObject->rootObject()->setProperty("osdValue", percent);
|
||||
int value = qBound(0, percent, 100);
|
||||
m_osdObject->rootObject()->setProperty("osdValue", value);
|
||||
m_osdObject->rootObject()->setProperty("osdAdditionalText", additionalText);
|
||||
m_osdObject->rootObject()->setProperty("showingProgress", true);
|
||||
m_osdObject->rootObject()->setProperty("icon", icon);
|
||||
|
Loading…
x
Reference in New Issue
Block a user