centralize panel content-change grace period into HoverPanel.keepOpen()

This commit is contained in:
Damocles 2026-04-16 18:37:53 +02:00
parent 084ef1da75
commit 46f14d5d36
6 changed files with 36 additions and 19 deletions

View file

@ -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);
}
}
}