Merge branch 'main' of github.com:noctalia-dev/noctalia-shell
This commit is contained in:
commit
b157d855a8
8 changed files with 423 additions and 33 deletions
|
|
@ -46,6 +46,7 @@ Popup {
|
|||
"Brightness": "WidgetSettings/BrightnessSettings.qml",
|
||||
"Clock": "WidgetSettings/ClockSettings.qml",
|
||||
"CustomButton": "WidgetSettings/CustomButtonSettings.qml",
|
||||
"KeyboardLayout": "WidgetSettings/KeyboardLayoutSettings.qml",
|
||||
"MediaMini": "WidgetSettings/MediaMiniSettings.qml",
|
||||
"Microphone": "WidgetSettings/MicrophoneSettings.qml",
|
||||
"NotificationHistory": "WidgetSettings/NotificationHistorySettings.qml",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
property var widgetMetadata: null
|
||||
|
||||
// Local state
|
||||
property bool valueForceOpen: widgetData.forceOpen !== undefined ? widgetData.forceOpen : widgetMetadata.forceOpen
|
||||
|
||||
function saveSettings() {
|
||||
var settings = Object.assign({}, widgetData || {})
|
||||
settings.forceOpen = valueForceOpen
|
||||
return settings
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Force open"
|
||||
description: "Keep the keyboard layout widget always expanded."
|
||||
checked: valueForceOpen
|
||||
onToggled: checked => valueForceOpen = checked
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue