centralize panel content-change grace period into HoverPanel.keepOpen()
This commit is contained in:
parent
084ef1da75
commit
46f14d5d36
6 changed files with 36 additions and 19 deletions
|
|
@ -75,13 +75,7 @@ M.BarSection {
|
|||
required property var bar
|
||||
|
||||
property bool _pinned: false
|
||||
property bool _switching: false
|
||||
Timer {
|
||||
id: _sessionSwitchTimer
|
||||
interval: 400
|
||||
onTriggered: root._switching = false
|
||||
}
|
||||
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered || _switching
|
||||
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
|
||||
readonly property bool _showPanel: _anyHover || _pinned
|
||||
|
||||
on_AnyHoverChanged: {
|
||||
|
|
@ -414,8 +408,7 @@ M.BarSection {
|
|||
TapHandler {
|
||||
onTapped: {
|
||||
root._playerIdx = index;
|
||||
root._switching = true;
|
||||
_sessionSwitchTimer.restart();
|
||||
hoverPanel.keepOpen(400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue