mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
ControlCenter: toggle to hide/show volume sliders + getting ready for more modularity soon
This commit is contained in:
@@ -7,9 +7,7 @@ import qs.Widgets
|
||||
NQuickSetting {
|
||||
property ShellScreen screen
|
||||
|
||||
text: I18n.tr("quickSettings.bluetooth.label.enabled")
|
||||
icon: BluetoothService.enabled ? "bluetooth" : "bluetooth-off"
|
||||
tooltipText: I18n.tr("quickSettings.bluetooth.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this)
|
||||
}
|
||||
|
||||
@@ -7,11 +7,8 @@ import qs.Widgets
|
||||
NQuickSetting {
|
||||
property ShellScreen screen
|
||||
|
||||
text: I18n.tr("quickSettings.keepAwake.label.enabled")
|
||||
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
|
||||
hot: IdleInhibitorService.isInhibited
|
||||
tooltipText: I18n.tr("quickSettings.keepAwake.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
|
||||
onClicked: IdleInhibitorService.manualToggle()
|
||||
}
|
||||
|
||||
@@ -8,10 +8,8 @@ NQuickSetting {
|
||||
property ShellScreen screen
|
||||
|
||||
enabled: ProgramCheckerService.wlsunsetAvailable
|
||||
text: I18n.tr("quickSettings.nightLight.label.enabled")
|
||||
icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off"
|
||||
hot: !Settings.data.nightLight.enabled || Settings.data.nightLight.forced
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
tooltipText: I18n.tr("quickSettings.nightLight.tooltip.action")
|
||||
|
||||
onClicked: {
|
||||
|
||||
@@ -7,12 +7,9 @@ import qs.Widgets
|
||||
NQuickSetting {
|
||||
property ShellScreen screen
|
||||
|
||||
text: Settings.data.notifications.doNotDisturb ? I18n.tr("quickSettings.notifications.label.disabled") : I18n.tr("quickSettings.notifications.label.enabled")
|
||||
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
|
||||
hot: Settings.data.notifications.doNotDisturb
|
||||
tooltipText: I18n.tr("quickSettings.notifications.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
|
||||
onClicked: PanelService.getPanel("notificationHistoryPanel")?.toggle(this)
|
||||
onRightClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||
}
|
||||
|
||||
@@ -12,12 +12,9 @@ NQuickSetting {
|
||||
readonly property bool hasPP: PowerProfileService.available
|
||||
|
||||
enabled: hasPP
|
||||
text: hasPP ? PowerProfileService.getName() : I18n.tr("quickSettings.powerProfile.label.unavailable")
|
||||
icon: PowerProfileService.getIcon()
|
||||
hot: !PowerProfileService.isDefault()
|
||||
tooltipText: I18n.tr("quickSettings.powerProfile.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
|
||||
onClicked: {
|
||||
PowerProfileService.cycleProfile()
|
||||
}
|
||||
|
||||
@@ -9,10 +9,8 @@ NQuickSetting {
|
||||
|
||||
enabled: ProgramCheckerService.gpuScreenRecorderAvailable
|
||||
icon: "camera-video"
|
||||
text: ScreenRecorderService.isRecording ? I18n.tr("quickSettings.screenRecorder.label.recording") : I18n.tr("quickSettings.screenRecorder.label.stopped")
|
||||
hot: ScreenRecorderService.isRecording
|
||||
tooltipText: I18n.tr("quickSettings.screenRecorder.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
|
||||
// Force hover state when recording to get hover colors
|
||||
property bool originalHovered: hovered
|
||||
|
||||
@@ -9,10 +9,7 @@ NQuickSetting {
|
||||
|
||||
enabled: Settings.data.wallpaper.enabled
|
||||
icon: "wallpaper-selector"
|
||||
text: I18n.tr("quickSettings.wallpaperSelector.label")
|
||||
tooltipText: I18n.tr("quickSettings.wallpaperSelector.tooltip.action")
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
|
||||
onClicked: PanelService.getPanel("wallpaperPanel")?.toggle(this)
|
||||
onRightClicked: WallpaperService.setRandomWallpaper()
|
||||
}
|
||||
|
||||
@@ -28,21 +28,6 @@ NQuickSetting {
|
||||
}
|
||||
}
|
||||
|
||||
text: {
|
||||
if (NetworkService.ethernetConnected) {
|
||||
return I18n.tr("quickSettings.wifi.label.ethernet")
|
||||
}
|
||||
let connected = false
|
||||
for (const net in NetworkService.networks) {
|
||||
if (NetworkService.networks[net].connected) {
|
||||
connected = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return connected ? I18n.tr("quickSettings.wifi.label.wifi") : I18n.tr("quickSettings.wifi.label.disconnected")
|
||||
}
|
||||
|
||||
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
|
||||
tooltipText: I18n.tr("quickSettings.wifi.tooltip.action")
|
||||
onClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user