feat: power toggle bar widget
This commit is contained in:
parent
5f1f3dce4a
commit
1f9c54438a
2 changed files with 25 additions and 0 deletions
21
Modules/Bar/Widgets/PowerToggle.qml
Normal file
21
Modules/Bar/Widgets/PowerToggle.qml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
NIconButton {
|
||||
id: root
|
||||
|
||||
property ShellScreen screen
|
||||
property real scaling: ScalingService.scale(screen)
|
||||
|
||||
icon: "power_settings_new"
|
||||
tooltipText: "Power Settings"
|
||||
colorBg: Color.mSurfaceVariant
|
||||
colorFg: Color.mError
|
||||
colorBorder: Color.transparent
|
||||
colorBorderHover: Color.transparent
|
||||
onClicked: PanelService.getPanel("powerPanel")?.toggle(screen)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue