mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-28 00:31:52 +00:00
QuickSettings: 3 columns + added Do not disturb
This commit is contained in:
@@ -98,14 +98,14 @@ NBox {
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginM * scaling
|
||||
Layout.bottomMargin: Style.marginM * scaling
|
||||
Layout.topMargin: Style.marginS * scaling
|
||||
Layout.bottomMargin: Style.marginS * scaling
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
Layout.fillWidth: true
|
||||
columns: 2
|
||||
columns: 3
|
||||
columnSpacing: Style.marginL * scaling
|
||||
rowSpacing: Style.marginM * scaling
|
||||
|
||||
@@ -113,7 +113,6 @@ NBox {
|
||||
model: Settings.data.controlCenter.widgets.quickSettings
|
||||
delegate: ControlCenterWidgetLoader {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: (grid.width - grid.columnSpacing) / 2
|
||||
widgetId: (modelData.id !== undefined ? modelData.id : "")
|
||||
widgetProps: {
|
||||
"screen": root.modelData || null,
|
||||
|
||||
@@ -38,7 +38,7 @@ NPanel {
|
||||
// Top Card: profile + utilities
|
||||
TopCard {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.max(280 * scaling)
|
||||
Layout.preferredHeight: Math.max(230 * scaling)
|
||||
}
|
||||
|
||||
// Media + stats column
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
NButton {
|
||||
property ShellScreen screen
|
||||
property real scaling: 1.0
|
||||
|
||||
outlined: true
|
||||
text: "Do not Disturb"
|
||||
fontSize: Style.fontSizeS * scaling
|
||||
fontWeight: Style.fontWeightRegular
|
||||
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
|
||||
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||
}
|
||||
@@ -12,7 +12,8 @@ NButton {
|
||||
enabled: ProgramCheckerService.gpuScreenRecorderAvailable
|
||||
outlined: true
|
||||
icon: "camera-video"
|
||||
text: "Screen Recorder"
|
||||
text: "Screen Rec."
|
||||
fontSize: Style.fontSizeS * scaling
|
||||
fontWeight: Style.fontWeightRegular
|
||||
onClicked: {
|
||||
ScreenRecorderService.toggleRecording()
|
||||
|
||||
@@ -11,6 +11,7 @@ Singleton {
|
||||
// Widget registry object mapping widget names to components
|
||||
property var widgets: ({
|
||||
"Bluetooth": bluetoothComponent,
|
||||
"DoNotDisturb": doNotDisturbComponent,
|
||||
"KeepAwake": keepAwakeComponent,
|
||||
"NightLight": nightLightComponent,
|
||||
"PowerProfile": powerProfileComponent,
|
||||
@@ -25,6 +26,9 @@ Singleton {
|
||||
property Component bluetoothComponent: Component {
|
||||
Bluetooth {}
|
||||
}
|
||||
property Component doNotDisturbComponent: Component {
|
||||
DoNotDisturb {}
|
||||
}
|
||||
property Component keepAwakeComponent: Component {
|
||||
KeepAwake {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user