Compare commits
No commits in common. "453aa33a9d0cf1d5b284285dbbe994ed748f2e23" and "9257941fe0faf1d2962d3ccd00117546ccc40205" have entirely different histories.
453aa33a9d
...
9257941fe0
4 changed files with 13 additions and 28 deletions
|
|
@ -12,17 +12,13 @@ M.BarSection {
|
|||
|
||||
property int percent: 0
|
||||
property bool _osdActive: false
|
||||
property bool _percentInit: false
|
||||
property bool _ready: false
|
||||
readonly property bool _showPanel: root._hovered || hoverPanel.panelHovered || _osdActive
|
||||
|
||||
onPercentChanged: {
|
||||
if (!_percentInit) {
|
||||
_percentInit = true;
|
||||
return;
|
||||
}
|
||||
if (percent > 0)
|
||||
_flashPanel();
|
||||
}
|
||||
Component.onCompleted: _ready = true
|
||||
|
||||
onPercentChanged: if (_ready && percent > 0)
|
||||
_flashPanel()
|
||||
|
||||
function _flashPanel() {
|
||||
_osdActive = true;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ M.BarSection {
|
|||
}
|
||||
}
|
||||
M.BarLabel {
|
||||
label: M.SystemStats.cpuUsage.toString().padStart(2) + "%@" + M.SystemStats.cpuFreqGhz.toFixed(2)
|
||||
label: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2)
|
||||
minText: "99%@9.99"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
TapHandler {
|
||||
|
|
|
|||
|
|
@ -39,25 +39,16 @@ M.BarSection {
|
|||
}
|
||||
|
||||
property bool _osdActive: false
|
||||
property bool _volumeInit: false
|
||||
property bool _mutedInit: false
|
||||
property bool _ready: false
|
||||
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
|
||||
readonly property bool _showPanel: _anyHover || _osdActive
|
||||
|
||||
onVolumeChanged: {
|
||||
if (!_volumeInit) {
|
||||
_volumeInit = true;
|
||||
return;
|
||||
}
|
||||
_flashPanel();
|
||||
}
|
||||
onMutedChanged: {
|
||||
if (!_mutedInit) {
|
||||
_mutedInit = true;
|
||||
return;
|
||||
}
|
||||
_flashPanel();
|
||||
}
|
||||
Component.onCompleted: _ready = true
|
||||
|
||||
onVolumeChanged: if (_ready)
|
||||
_flashPanel()
|
||||
onMutedChanged: if (_ready)
|
||||
_flashPanel()
|
||||
|
||||
function _flashPanel() {
|
||||
_osdActive = true;
|
||||
|
|
|
|||
|
|
@ -90,8 +90,6 @@ in
|
|||
"cpu"
|
||||
"memory"
|
||||
"idleInhibitor"
|
||||
"privacy"
|
||||
"screenCorners"
|
||||
"power"
|
||||
"backgroundOverlay"
|
||||
"overviewBackdrop"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue