Add Recording indicator to bar
This commit is contained in:
parent
d345e3fbc0
commit
fc493db906
4 changed files with 34 additions and 11 deletions
|
|
@ -2,6 +2,7 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Services.UPower
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
|
|
@ -10,6 +11,10 @@ NBox {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 1
|
||||
implicitHeight: powerRow.implicitHeight + Style.marginMedium * 2 * scaling
|
||||
|
||||
// PowerProfiles service
|
||||
property var powerProfiles: PowerProfiles
|
||||
|
||||
RowLayout {
|
||||
id: powerRow
|
||||
anchors.fill: parent
|
||||
|
|
@ -21,23 +26,33 @@ NBox {
|
|||
// Performance
|
||||
NIconButton {
|
||||
icon: "speed"
|
||||
enabled: powerProfiles.hasPerformanceProfile
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
showFilled: powerProfiles.profile === PowerProfile.Performance
|
||||
showBorder: powerProfiles.profile !== PowerProfile.Performance
|
||||
onClicked: {
|
||||
|
||||
/* TODO: hook to power profile */ }
|
||||
if (powerProfiles.hasPerformanceProfile) {
|
||||
powerProfiles.profile = PowerProfile.Performance
|
||||
}
|
||||
}
|
||||
}
|
||||
// Balanced
|
||||
NIconButton {
|
||||
icon: "balance"
|
||||
showFilled: powerProfiles.profile === PowerProfile.Balanced
|
||||
showBorder: powerProfiles.profile !== PowerProfile.Balanced
|
||||
onClicked: {
|
||||
|
||||
/* TODO: hook to power profile */ }
|
||||
powerProfiles.profile = PowerProfile.Balanced
|
||||
}
|
||||
}
|
||||
// Eco
|
||||
NIconButton {
|
||||
icon: "eco"
|
||||
showFilled: powerProfiles.profile === PowerProfile.PowerSaver
|
||||
showBorder: powerProfiles.profile !== PowerProfile.PowerSaver
|
||||
onClicked: {
|
||||
|
||||
/* TODO: hook to power profile */ }
|
||||
powerProfiles.profile = PowerProfile.PowerSaver
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue