mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-03 02:51:46 +00:00
feat: power toggle bar widget
This commit is contained in:
@@ -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)
|
||||
}
|
||||
@@ -24,6 +24,7 @@ Singleton {
|
||||
"NightLight": nightLightComponent,
|
||||
"NotificationHistory": notificationHistoryComponent,
|
||||
"PowerProfile": powerProfileComponent,
|
||||
"PowerToggle": powerToggleComponent,
|
||||
"ScreenRecorderIndicator": screenRecorderIndicatorComponent,
|
||||
"SidePanelToggle": sidePanelToggleComponent,
|
||||
"SystemMonitor": systemMonitorComponent,
|
||||
@@ -87,6 +88,9 @@ Singleton {
|
||||
property Component powerProfileComponent: Component {
|
||||
PowerProfile {}
|
||||
}
|
||||
property Component powerToggleComponent: Component {
|
||||
PowerToggle {}
|
||||
}
|
||||
property Component screenRecorderIndicatorComponent: Component {
|
||||
ScreenRecorderIndicator {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user