refactor: unified BarModule base component, click-to-open panels, remove pinning
This commit is contained in:
parent
034f0b6d85
commit
26476dc930
33 changed files with 273 additions and 517 deletions
|
|
@ -3,17 +3,15 @@ import Quickshell
|
|||
import "." as M
|
||||
import "../services" as S
|
||||
|
||||
M.BarIcon {
|
||||
M.BarModule {
|
||||
id: root
|
||||
color: S.IdleInhibitService.active ? S.Theme.base09 : root.accentColor
|
||||
tooltip: {
|
||||
const parts = ["Idle inhibition: " + (S.IdleInhibitService.active ? "active" : "inactive")];
|
||||
if (S.IdleInhibitService.inhibitors)
|
||||
parts.push(S.IdleInhibitService.inhibitors);
|
||||
return parts.join("\n");
|
||||
}
|
||||
|
||||
icon: S.IdleInhibitService.active ? "\uF06E" : "\uF070"
|
||||
onTapped: S.IdleInhibitService.toggle()
|
||||
|
||||
Timer {
|
||||
interval: 5000
|
||||
|
|
@ -23,9 +21,9 @@ M.BarIcon {
|
|||
onTriggered: S.IdleInhibitService.refreshInhibitors()
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: S.IdleInhibitService.toggle()
|
||||
M.BarIcon {
|
||||
color: S.IdleInhibitService.active ? S.Theme.base09 : root.accentColor
|
||||
icon: S.IdleInhibitService.active ? "\uF06E" : "\uF070"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue