mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-06 14:26:32 +00:00
33 lines
789 B
QML
33 lines
789 B
QML
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 valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
|
|
|
|
function saveSettings() {
|
|
var settings = Object.assign({}, widgetData || {})
|
|
settings.showIcon = valueShowIcon
|
|
return settings
|
|
}
|
|
|
|
NToggle {
|
|
id: showIcon
|
|
Layout.fillWidth: true
|
|
label: I18n.tr("bar.widget-settings.active-window.show-app-icon")
|
|
checked: root.valueShowIcon
|
|
onToggled: checked => root.valueShowIcon = checked
|
|
}
|
|
}
|