volume panel: flash on hotkey changes as osd replacement
This commit is contained in:
parent
de44b66fef
commit
5d7e3fb090
1 changed files with 16 additions and 1 deletions
|
|
@ -31,8 +31,23 @@ M.BarSection {
|
|||
|
||||
property bool _expanded: false
|
||||
property bool _panelHovered: false
|
||||
property bool _osdActive: false
|
||||
readonly property bool _anyHover: root._hovered || _panelHovered
|
||||
readonly property bool _showPanel: _anyHover || _expanded
|
||||
readonly property bool _showPanel: _anyHover || _expanded || _osdActive
|
||||
|
||||
onVolumeChanged: _flashPanel()
|
||||
onMutedChanged: _flashPanel()
|
||||
|
||||
function _flashPanel() {
|
||||
_osdActive = true;
|
||||
_osdTimer.restart();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: _osdTimer
|
||||
interval: 1500
|
||||
onTriggered: root._osdActive = false
|
||||
}
|
||||
|
||||
on_AnyHoverChanged: {
|
||||
if (_anyHover)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue