extract PinnableSection base component from 12 bar modules

This commit is contained in:
Damocles 2026-04-23 00:48:07 +02:00
parent deb3fc0a12
commit aa0f7bb5ef
14 changed files with 55 additions and 229 deletions

View file

@ -4,10 +4,10 @@ import "." as M
import "../services" as S
import "../applets" as C
M.BarSection {
M.PinnableSection {
id: root
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
tooltip: ""
_panelHovered: hoverPanel.panelHovered
readonly property int _warm: S.Modules.temperature.warm || 80
readonly property int _hot: S.Modules.temperature.hot || 90
@ -30,23 +30,6 @@ M.BarSection {
}
}
property bool _pinned: false
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
readonly property bool _showPanel: _anyHover || _pinned
on_AnyHoverChanged: {
if (_anyHover)
_unpinTimer.stop();
else if (_pinned)
_unpinTimer.start();
}
Timer {
id: _unpinTimer
interval: 500
onTriggered: root._pinned = false
}
M.BarIcon {
icon: "\uF2C9"
color: root._stateColor