Merge pull request #1990 from tmarti2/and-yet-another-default-settings-pass

A (hopefully final) pass on default settings
This commit is contained in:
Lemmy
2026-03-01 14:40:19 -05:00
committed by GitHub
42 changed files with 293 additions and 160 deletions
+8 -8
View File
@@ -125,10 +125,7 @@
"visualizerType": "linear",
"textColor": "none",
"compactMode": false,
"panelShowAlbumArt": true,
"panelShowVisualizer": true,
"compactShowAlbumArt": true,
"compactShowVisualizer": false
"panelShowAlbumArt": true
},
"Microphone": {
"displayMode": "onhover",
@@ -254,28 +251,31 @@
"desktop": {
"Clock": {
"showBackground": true,
"roundedCorners": true,
"clockStyle": "digital",
"clockColor": "none",
"useCustomFont": false,
"customFont": "",
"format": "HH:mm\\nd MMMM yyyy"
},
"MediaPlayer": {
"showBackground": true,
"roundedCorners": true,
"visualizerType": "linear",
"hideMode": "visible",
"showButtons": true,
"showAlbumArt": true,
"showVisualizer": true,
"roundedCorners": true
"showVisualizer": true
},
"Weather": {
"showBackground": true
"showBackground": true,
"roundedCorners": true
},
"SystemStat": {
"showBackground": true,
"roundedCorners": true,
"statType": "CPU",
"diskPath": "/",
"roundedCorners": true,
"layout": "bottom"
}
}
+11 -11
View File
@@ -39,17 +39,17 @@ Item {
readonly property real barFontSize: Style.getBarFontSizeForScreen(screenName)
// Widget settings
readonly property string hideMode: (widgetSettings.hideMode !== undefined) ? widgetSettings.hideMode : "hidden"
readonly property bool hideWhenIdle: (widgetSettings.hideWhenIdle !== undefined) ? widgetSettings.hideWhenIdle : (widgetMetadata.hideWhenIdle !== undefined ? widgetMetadata.hideWhenIdle : false)
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
readonly property bool showArtistFirst: (widgetSettings.showArtistFirst !== undefined) ? widgetSettings.showArtistFirst : widgetMetadata.showArtistFirst
readonly property bool showVisualizer: (widgetSettings.showVisualizer !== undefined) ? widgetSettings.showVisualizer : widgetMetadata.showVisualizer
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType !== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
readonly property string scrollingMode: (widgetSettings.scrollingMode !== undefined) ? widgetSettings.scrollingMode : widgetMetadata.scrollingMode
readonly property bool showProgressRing: (widgetSettings.showProgressRing !== undefined) ? widgetSettings.showProgressRing : widgetMetadata.showProgressRing
readonly property bool useFixedWidth: (widgetSettings.useFixedWidth !== undefined) ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
readonly property real maxWidth: (widgetSettings.maxWidth !== undefined) ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
readonly property string textColorKey: (widgetSettings.textColor !== undefined) ? widgetSettings.textColor : widgetMetadata.textColor
readonly property string hideMode: widgetSettings.hideMode !== undefined ? widgetSettings.hideMode : widgetMetadata.hideMode
readonly property bool hideWhenIdle: widgetSettings.hideWhenIdle !== undefined ? widgetSettings.hideWhenIdle : widgetMetadata.hideWhenIdle
readonly property bool showAlbumArt: widgetSettings.showAlbumArt !== undefined ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
readonly property bool showArtistFirst: widgetSettings.showArtistFirst !== undefined ? widgetSettings.showArtistFirst : widgetMetadata.showArtistFirst
readonly property bool showVisualizer: widgetSettings.showVisualizer !== undefined ? widgetSettings.showVisualizer : widgetMetadata.showVisualizer
readonly property string visualizerType: widgetSettings.visualizerType !== undefined ? widgetSettings.visualizerType : widgetMetadata.visualizerType
readonly property string scrollingMode: widgetSettings.scrollingMode !== undefined ? widgetSettings.scrollingMode : widgetMetadata.scrollingMode
readonly property bool showProgressRing: widgetSettings.showProgressRing !== undefined ? widgetSettings.showProgressRing : widgetMetadata.showProgressRing
readonly property bool useFixedWidth: widgetSettings.useFixedWidth !== undefined ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
readonly property real maxWidth: widgetSettings.maxWidth !== undefined ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
readonly property string textColorKey: widgetSettings.textColor !== undefined ? widgetSettings.textColor : widgetMetadata.textColor
readonly property color textColor: Color.resolveColorKey(textColorKey)
// Dimensions
@@ -21,8 +21,9 @@ Item {
readonly property bool isDragging: internal.isDragging
readonly property bool isScaling: internal.isScaling
property bool showBackground: (widgetData && widgetData.showBackground !== undefined) ? widgetData.showBackground : true
property bool roundedCorners: (widgetData && widgetData.roundedCorners !== undefined) ? widgetData.roundedCorners : true
// All Desktop widgets have these settings, but fallback just in case
property bool showBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : (widgetMetadata?.showBackground ?? true)
property bool roundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata?.roundedCorners ?? true)
property real widgetScale: 1.0
property real minScale: 0.5
@@ -14,12 +14,12 @@ DraggableDesktopWidget {
readonly property color clockTextColor: Color.resolveColorKey(clockColor)
readonly property real fontSize: Math.round(Style.fontSizeXXXL * 2.5 * widgetScale)
readonly property real widgetOpacity: (widgetData && widgetData.opacity !== undefined) ? widgetData.opacity : 1.0
readonly property string clockStyle: (widgetData && widgetData.clockStyle !== undefined) ? widgetData.clockStyle : (widgetMetadata.clockStyle !== undefined ? widgetMetadata.clockStyle : "digital")
readonly property string clockColor: (widgetData && widgetData.clockColor !== undefined) ? widgetData.clockColor : (widgetMetadata.clockColor !== undefined ? widgetMetadata.clockColor : "none")
readonly property bool useCustomFont: (widgetData && widgetData.useCustomFont !== undefined) ? widgetData.useCustomFont : (widgetMetadata.useCustomFont !== undefined ? widgetMetadata.useCustomFont : false)
readonly property string customFont: (widgetData && widgetData.customFont !== undefined) ? widgetData.customFont : ""
readonly property string format: (widgetData && widgetData.format !== undefined) ? widgetData.format : (widgetMetadata.format !== undefined ? widgetMetadata.format : "HH:mm\\nd MMMM yyyy")
readonly property real widgetOpacity: widgetData.opacity !== undefined ? widgetData.opacity : 1.0
readonly property string clockStyle: widgetData.clockStyle !== undefined ? widgetData.clockStyle : widgetMetadata.clockStyle
readonly property string clockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
readonly property bool useCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
readonly property string customFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.customFont
readonly property string format: widgetData.format !== undefined ? widgetData.format : widgetMetadata.format
readonly property real contentPadding: Math.round((clockStyle === "minimal" ? Style.marginL : Style.marginXL) * widgetScale)
implicitWidth: contentLoader.item ? Math.round((contentLoader.item.implicitWidth || contentLoader.item.width || 0) + contentPadding * 2) : 0
@@ -17,7 +17,7 @@ ColumnLayout {
// Local state
property bool valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
@@ -65,6 +65,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NColorChoice {
@@ -74,6 +75,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -85,6 +87,7 @@ ColumnLayout {
root.valueShowIcon = checked;
saveSettings();
}
defaultValue: widgetMetadata.showIcon
}
NToggle {
@@ -97,6 +100,7 @@ ColumnLayout {
saveSettings();
}
visible: root.valueShowIcon
defaultValue: widgetMetadata.colorizeIcons
}
NTextInput {
@@ -107,6 +111,7 @@ ColumnLayout {
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.maxWidth)
}
NToggle {
@@ -118,6 +123,7 @@ ColumnLayout {
valueUseFixedWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.useFixedWidth
}
NComboBox {
@@ -138,6 +144,7 @@ ColumnLayout {
}
]
currentKey: valueScrollingMode
defaultValue: widgetMetadata.scrollingMode
onSelected: key => {
valueScrollingMode = key;
saveSettings();
@@ -35,6 +35,7 @@ ColumnLayout {
text: widgetData.width || widgetMetadata.width
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.width)
}
NColorChoice {
@@ -46,6 +47,7 @@ ColumnLayout {
root.valueColorName = key;
saveSettings();
}
defaultValue: widgetMetadata.colorName
}
NToggle {
@@ -56,5 +58,6 @@ ColumnLayout {
valueHideWhenIdle = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenIdle
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
// Local state
property string valueDisplayMode: widgetData.displayMode !== undefined ? widgetData.displayMode : widgetMetadata.displayMode
property string valueDeviceNativePath: widgetData.deviceNativePath !== undefined ? widgetData.deviceNativePath : "__default__"
property string valueDeviceNativePath: widgetData.deviceNativePath !== undefined ? widgetData.deviceNativePath : widgetMetadata.deviceNativePath
property bool valueShowPowerProfiles: widgetData.showPowerProfiles !== undefined ? widgetData.showPowerProfiles : widgetMetadata.showPowerProfiles
property bool valueShowNoctaliaPerformance: widgetData.showNoctaliaPerformance !== undefined ? widgetData.showNoctaliaPerformance : widgetMetadata.showNoctaliaPerformance
property bool valueHideIfNotDetected: widgetData.hideIfNotDetected !== undefined ? widgetData.hideIfNotDetected : widgetMetadata.hideIfNotDetected
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDeviceNativePath = key;
saveSettings();
}
defaultValue: widgetMetadata.deviceNativePath
}
NComboBox {
@@ -84,6 +85,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NToggle {
@@ -94,6 +96,7 @@ ColumnLayout {
valueHideIfNotDetected = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideIfNotDetected
}
NToggle {
@@ -104,6 +107,7 @@ ColumnLayout {
valueHideIfIdle = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideIfIdle
}
NDivider {
@@ -118,6 +122,7 @@ ColumnLayout {
valueShowPowerProfiles = checked;
saveSettings();
}
defaultValue: widgetMetadata.showPowerProfiles
}
NToggle {
@@ -128,5 +133,6 @@ ColumnLayout {
valueShowNoctaliaPerformance = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNoctaliaPerformance
}
}
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -67,5 +69,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -56,6 +56,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -65,6 +66,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -73,6 +75,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -20,10 +20,10 @@ ColumnLayout {
// Local state
property string valueClockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
property bool valueUseCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : (widgetMetadata.customFont !== undefined ? widgetMetadata.customFont : "")
property string valueFormatHorizontal: widgetData.formatHorizontal !== undefined ? widgetData.formatHorizontal : (widgetMetadata.formatHorizontal !== undefined ? widgetMetadata.formatHorizontal : "")
property string valueFormatVertical: widgetData.formatVertical !== undefined ? widgetData.formatVertical : (widgetMetadata.formatVertical !== undefined ? widgetMetadata.formatVertical : "")
property string valueTooltipFormat: widgetData.tooltipFormat !== undefined ? widgetData.tooltipFormat : (widgetMetadata.tooltipFormat !== undefined ? widgetMetadata.tooltipFormat : "")
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.customFont
property string valueFormatHorizontal: widgetData.formatHorizontal !== undefined ? widgetData.formatHorizontal : widgetMetadata.formatHorizontal
property string valueFormatVertical: widgetData.formatVertical !== undefined ? widgetData.formatVertical : widgetMetadata.formatVertical
property string valueTooltipFormat: widgetData.tooltipFormat !== undefined ? widgetData.tooltipFormat : widgetMetadata.tooltipFormat
readonly property color textColor: Color.resolveColorKey(valueClockColor)
@@ -77,6 +77,7 @@ ColumnLayout {
valueClockColor = key;
saveSettings();
}
defaultValue: widgetMetadata.clockColor
}
NToggle {
@@ -88,6 +89,7 @@ ColumnLayout {
valueUseCustomFont = checked;
saveSettings();
}
defaultValue: widgetMetadata.useCustomFont
}
NSearchableComboBox {
@@ -105,6 +107,7 @@ ColumnLayout {
valueCustomFont = key;
saveSettings();
}
defaultValue: Settings.data.ui.fontDefault
}
NDivider {
@@ -148,6 +151,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.formatHorizontal
}
Item {
@@ -173,6 +177,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.formatVertical
}
NTextInput {
@@ -193,6 +198,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.tooltipFormat
}
}
@@ -42,6 +42,7 @@ ColumnLayout {
valueUseDistroLogo = checked;
saveSettings();
}
defaultValue: widgetMetadata.useDistroLogo
}
NToggle {
@@ -52,6 +53,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -63,6 +65,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
RowLayout {
@@ -24,12 +24,12 @@ ColumnLayout {
property int valueMaxTextLengthVertical: widgetData?.maxTextLength?.vertical ?? widgetMetadata?.maxTextLength?.vertical
property string valueHideMode: (widgetData.hideMode !== undefined) ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueShowIcon: (widgetData.showIcon !== undefined) ? widgetData.showIcon : widgetMetadata.showIcon
property bool valueShowExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : (widgetMetadata.showExecTooltip !== undefined ? widgetMetadata.showExecTooltip : true)
property bool valueShowTextTooltip: widgetData.showTextTooltip !== undefined ? widgetData.showTextTooltip : (widgetMetadata.showTextTooltip !== undefined ? widgetMetadata.showTextTooltip : true)
property bool valueEnableColorization: widgetData.enableColorization || false
property string valueColorizeSystemIcon: widgetData.colorizeSystemIcon !== undefined ? widgetData.colorizeSystemIcon : widgetMetadata.colorizeSystemIcon || "none"
property string valueIpcIdentifier: widgetData.ipcIdentifier !== undefined ? widgetData.ipcIdentifier : widgetMetadata.ipcIdentifier || ""
property string valueGeneralTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText || ""
property bool valueShowExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : widgetMetadata.showExecTooltip
property bool valueShowTextTooltip: widgetData.showTextTooltip !== undefined ? widgetData.showTextTooltip : widgetMetadata.showTextTooltip
property bool valueEnableColorization: widgetData.enableColorization !== undefined ? widgetData.enableColorization : widgetMetadata.enableColorization
property string valueColorizeSystemIcon: widgetData.colorizeSystemIcon !== undefined ? widgetData.colorizeSystemIcon : widgetMetadata.colorizeSystemIcon
property string valueIpcIdentifier: widgetData.ipcIdentifier !== undefined ? widgetData.ipcIdentifier : widgetMetadata.ipcIdentifier
property string valueGeneralTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -107,6 +107,7 @@ ColumnLayout {
saveSettings();
}
visible: textCommandInput.text !== ""
defaultValue: widgetMetadata.showIcon
}
NToggle {
@@ -117,6 +118,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -128,6 +130,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
NTextInput {
@@ -138,6 +141,7 @@ ColumnLayout {
text: valueGeneralTooltipText
onTextChanged: valueGeneralTooltipText = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.generalTooltipText
}
NToggle {
@@ -149,6 +153,7 @@ ColumnLayout {
valueShowExecTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showExecTooltip
}
NToggle {
@@ -160,6 +165,7 @@ ColumnLayout {
valueShowTextTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showTextTooltip
}
NTextInput {
@@ -170,6 +176,7 @@ ColumnLayout {
text: valueIpcIdentifier
onTextChanged: valueIpcIdentifier = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.ipcIdentifier
}
RowLayout {
@@ -183,6 +190,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.leftClickExec || widgetMetadata.leftClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.leftClickExec
}
NToggle {
@@ -197,6 +205,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.leftClickUpdateText
}
}
@@ -211,6 +220,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.rightClickExec || widgetMetadata.rightClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.rightClickExec
}
NToggle {
@@ -225,6 +235,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.rightClickUpdateText
}
}
@@ -239,6 +250,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData.middleClickExec || widgetMetadata.middleClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickExec
}
NToggle {
@@ -253,6 +265,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.middleClickUpdateText
}
}
@@ -268,6 +281,7 @@ ColumnLayout {
internalChecked = checked;
saveSettings();
}
defaultValue: widgetMetadata.wheelMode === "separate"
}
ColumnLayout {
@@ -286,6 +300,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelExec || widgetMetadata?.wheelExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelExec
}
NToggle {
@@ -300,6 +315,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelUpdateText
}
}
@@ -319,6 +335,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelUpExec || widgetMetadata?.wheelUpExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelUpExec
}
NToggle {
@@ -333,6 +350,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelUpUpdateText
}
}
@@ -347,6 +365,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelDownExec || widgetMetadata?.wheelDownExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelDownExec
}
NToggle {
@@ -361,6 +380,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelDownUpdateText
}
}
}
@@ -384,6 +404,7 @@ ColumnLayout {
valueMaxTextLengthHorizontal = value;
saveSettings();
}
defaultValue: widgetMetadata.maxTextLength.horizontal
}
NSpinBox {
@@ -396,6 +417,7 @@ ColumnLayout {
valueMaxTextLengthVertical = value;
saveSettings();
}
defaultValue: widgetMetadata.maxTextLength.vertical
}
NToggle {
@@ -407,6 +429,7 @@ ColumnLayout {
valueTextStream = checked;
saveSettings();
}
defaultValue: widgetMetadata.textStream
}
NToggle {
@@ -418,6 +441,7 @@ ColumnLayout {
valueParseJson = checked;
saveSettings();
}
defaultValue: widgetMetadata.parseJson
}
NTextInput {
@@ -428,6 +452,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.command-example")
text: widgetData?.textCommand || widgetMetadata.textCommand
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.textCommand
}
NTextInput {
@@ -439,6 +464,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-text-to-collapse")
text: widgetData?.textCollapse || widgetMetadata.textCollapse
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.textCollapse
}
NTextInput {
@@ -450,6 +476,7 @@ ColumnLayout {
placeholderText: String(widgetMetadata.textIntervalMs)
text: widgetData && widgetData.textIntervalMs !== undefined ? String(widgetData.textIntervalMs) : ""
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.textIntervalMs)
}
NComboBox {
@@ -476,5 +503,6 @@ ColumnLayout {
saveSettings();
}
visible: textCommandInput.text !== "" && valueTextStream == true
defaultValue: widgetMetadata.hideMode
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -31,6 +31,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -39,5 +40,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -54,6 +54,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NToggle {
@@ -64,6 +65,7 @@ ColumnLayout {
valueShowIcon = checked;
saveSettings();
}
defaultValue: widgetMetadata.showIcon
}
NColorChoice {
@@ -73,6 +75,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -81,5 +84,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -42,6 +42,7 @@ ColumnLayout {
valueUseDistroLogo = checked;
saveSettings();
}
defaultValue: widgetMetadata.useDistroLogo
}
NToggle {
@@ -52,6 +53,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -63,6 +65,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
RowLayout {
@@ -49,6 +49,7 @@ ColumnLayout {
valueShowCapsLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCapsLock
}
NIcon {
@@ -86,6 +87,7 @@ ColumnLayout {
valueShowNumLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNumLock
}
NIcon {
@@ -123,6 +125,7 @@ ColumnLayout {
valueShowScrollLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showScrollLock
}
NIcon {
@@ -162,5 +165,6 @@ ColumnLayout {
valueHideWhenOff = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenOff
}
}
@@ -16,20 +16,20 @@ ColumnLayout {
signal settingsChanged(var settings)
// Local state
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
// Deprecated: hideWhenIdle now folded into hideMode = "idle"
property bool valueHideWhenIdle: (widgetData && widgetData.hideWhenIdle !== undefined) ? widgetData.hideWhenIdle : (widgetMetadata && widgetMetadata.hideWhenIdle !== undefined ? widgetMetadata.hideWhenIdle : false)
property bool valueShowAlbumArt: (widgetData && widgetData.showAlbumArt !== undefined) ? widgetData.showAlbumArt : (widgetMetadata && widgetMetadata.showAlbumArt !== undefined ? widgetMetadata.showAlbumArt : false)
property bool valuePanelShowAlbumArt: (widgetData && widgetData.panelShowAlbumArt !== undefined) ? widgetData.panelShowAlbumArt : (widgetMetadata && widgetMetadata.panelShowAlbumArt !== undefined ? widgetMetadata.panelShowAlbumArt : true)
property bool valueShowArtistFirst: (widgetData && widgetData.showArtistFirst !== undefined) ? widgetData.showArtistFirst : (widgetMetadata && widgetMetadata.showArtistFirst !== undefined ? widgetMetadata.showArtistFirst : true)
property bool valueShowVisualizer: (widgetData && widgetData.showVisualizer !== undefined) ? widgetData.showVisualizer : (widgetMetadata && widgetMetadata.showVisualizer !== undefined ? widgetMetadata.showVisualizer : false)
property string valueVisualizerType: (widgetData && widgetData.visualizerType) || (widgetMetadata && widgetMetadata.visualizerType) || "linear"
property string valueScrollingMode: (widgetData && widgetData.scrollingMode) || (widgetMetadata && widgetMetadata.scrollingMode) || "hover"
property int valueMaxWidth: (widgetData && widgetData.maxWidth !== undefined) ? widgetData.maxWidth : (widgetMetadata && widgetMetadata.maxWidth !== undefined ? widgetMetadata.maxWidth : 145)
property bool valueUseFixedWidth: (widgetData && widgetData.useFixedWidth !== undefined) ? widgetData.useFixedWidth : (widgetMetadata && widgetMetadata.useFixedWidth !== undefined ? widgetMetadata.useFixedWidth : false)
property bool valueShowProgressRing: (widgetData && widgetData.showProgressRing !== undefined) ? widgetData.showProgressRing : (widgetMetadata && widgetMetadata.showProgressRing !== undefined ? widgetMetadata.showProgressRing : true)
property bool valueHideWhenIdle: widgetData.hideWhenIdle !== undefined ? widgetData.hideWhenIdle : widgetMetadata.hideWhenIdle
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : widgetMetadata.showAlbumArt
property bool valuePanelShowAlbumArt: widgetData.panelShowAlbumArt !== undefined ? widgetData.panelShowAlbumArt : widgetMetadata.panelShowAlbumArt
property bool valueShowArtistFirst: widgetData.showArtistFirst !== undefined ? widgetData.showArtistFirst : widgetMetadata.showArtistFirst
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
property string valueVisualizerType: widgetData.visualizerType !== undefined ? widgetData.visualizerType : widgetMetadata.visualizerType
property string valueScrollingMode: widgetData.scrollingMode !== undefined ? widgetData.scrollingMode : widgetMetadata.scrollingMode
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
property bool valueShowProgressRing: widgetData.showProgressRing !== undefined ? widgetData.showProgressRing : widgetMetadata.showProgressRing
property bool valueCompactMode: widgetData.compactMode !== undefined ? widgetData.compactMode : widgetMetadata.compactMode
property string valueTextColor: (widgetData && widgetData.textColor !== undefined) ? widgetData.textColor : (widgetMetadata && widgetMetadata.textColor !== undefined ? widgetMetadata.textColor : "none")
property string valueTextColor: widgetData.textColor !== undefined ? widgetData.textColor : widgetMetadata.textColor
Component.onCompleted: {
if (widgetData && widgetData.hideMode !== undefined) {
@@ -82,6 +82,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NToggle {
@@ -92,6 +93,7 @@ ColumnLayout {
valueShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.showAlbumArt
}
NToggle {
@@ -102,6 +104,7 @@ ColumnLayout {
valueShowArtistFirst = checked;
saveSettings();
}
defaultValue: widgetMetadata.showArtistFirst
}
NToggle {
@@ -112,6 +115,7 @@ ColumnLayout {
valueShowVisualizer = checked;
saveSettings();
}
defaultValue: widgetMetadata.showVisualizer
}
NComboBox {
@@ -138,6 +142,7 @@ ColumnLayout {
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.visualizerType
}
NTextInput {
@@ -148,6 +153,7 @@ ColumnLayout {
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.maxWidth)
}
NToggle {
@@ -158,6 +164,7 @@ ColumnLayout {
valueUseFixedWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.useFixedWidth
}
NToggle {
@@ -168,6 +175,7 @@ ColumnLayout {
valueShowProgressRing = checked;
saveSettings();
}
defaultValue: widgetMetadata.showProgressRing
}
NColorChoice {
@@ -176,6 +184,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NComboBox {
@@ -201,6 +210,7 @@ ColumnLayout {
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.scrollingMode
}
NDivider {
@@ -222,6 +232,7 @@ ColumnLayout {
valuePanelShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.panelShowAlbumArt
}
NToggle {
@@ -232,5 +243,6 @@ ColumnLayout {
valueCompactMode = checked;
saveSettings();
}
defaultValue: widgetMetadata.compactMode
}
}
@@ -53,6 +53,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -62,6 +63,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -70,6 +72,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
// Middle click command
@@ -80,5 +83,6 @@ ColumnLayout {
text: valueMiddleClickCommand
onTextChanged: valueMiddleClickCommand = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickCommand
}
}
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -67,5 +69,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -40,6 +40,7 @@ ColumnLayout {
valueShowUnreadBadge = checked;
saveSettings();
}
defaultValue: widgetMetadata.showUnreadBadge
}
NColorChoice {
@@ -49,6 +50,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -60,6 +62,7 @@ ColumnLayout {
saveSettings();
}
visible: valueShowUnreadBadge
defaultValue: widgetMetadata.unreadBadgeColor
}
NToggle {
@@ -70,7 +73,8 @@ ColumnLayout {
valueHideWhenZero = checked;
saveSettings();
}
visible: !valueHideWhenZeroUnread
enabled: !valueHideWhenZeroUnread
defaultValue: widgetMetadata.hideWhenZero
}
NToggle {
@@ -81,5 +85,6 @@ ColumnLayout {
valueHideWhenZeroUnread = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenZeroUnread
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
signal settingsChanged(var settings)
// Local state
property string valueIconColor: widgetData.iconColor !== undefined ? widgetData.iconColor : (widgetData.colorName !== undefined ? widgetData.colorName : widgetMetadata.iconColor)
property string valueIconColor: widgetData.iconColor !== undefined ? widgetData.iconColor : widgetMetadata.iconColor
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -33,5 +33,6 @@ ColumnLayout {
root.valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -30,5 +30,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
valueDefault: widgetMetadata.iconColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
text: widgetData.width || widgetMetadata.width
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.width)
}
}
@@ -72,6 +72,7 @@ ColumnLayout {
valueCompactMode = checked;
saveSettings();
}
defaultValue: widgetMetadata.compactMode
}
NColorChoice {
@@ -81,6 +82,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -90,6 +92,7 @@ ColumnLayout {
saveSettings();
}
visible: !valueCompactMode
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -102,6 +105,7 @@ ColumnLayout {
saveSettings();
}
visible: !valueCompactMode
defaultValue: widgetMetadata.useMonospaceFont
}
NToggle {
@@ -115,6 +119,7 @@ ColumnLayout {
}
visible: !valueCompactMode
enabled: !isVerticalBar && valueUseMonospaceFont
defaultValue: widgetMetadata.usePadding
}
NDivider {
@@ -131,6 +136,7 @@ ColumnLayout {
valueShowCpuUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuUsage
}
NToggle {
@@ -143,6 +149,7 @@ ColumnLayout {
valueShowCpuFreq = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuFreq
}
NToggle {
@@ -155,6 +162,7 @@ ColumnLayout {
valueShowCpuTemp = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuTemp
}
NToggle {
@@ -167,6 +175,7 @@ ColumnLayout {
valueShowLoadAverage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showLoadAverage
}
NToggle {
@@ -180,6 +189,7 @@ ColumnLayout {
saveSettings();
}
visible: SystemStatService.gpuAvailable
defaultValue: widgetMetadata.showGpuTemp
}
NToggle {
@@ -192,6 +202,7 @@ ColumnLayout {
valueShowMemoryUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showMemoryUsage
}
NToggle {
@@ -205,6 +216,7 @@ ColumnLayout {
saveSettings();
}
visible: valueShowMemoryUsage
defaultValue: widgetMetadata.showMemoryAsPercent
}
NToggle {
@@ -217,6 +229,7 @@ ColumnLayout {
valueShowSwapUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showSwapUsage
}
NToggle {
@@ -229,6 +242,7 @@ ColumnLayout {
valueShowNetworkStats = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNetworkStats
}
NDivider {
@@ -245,6 +259,7 @@ ColumnLayout {
valueShowDiskUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskUsage
}
NToggle {
@@ -257,6 +272,7 @@ ColumnLayout {
valueShowDiskUsageAsPercent = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskUsageAsPercent
}
NToggle {
@@ -269,6 +285,7 @@ ColumnLayout {
valueShowDiskAvailable = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskAvailable
}
NComboBox {
@@ -288,5 +305,6 @@ ColumnLayout {
valueDiskPath = key;
saveSettings();
}
defaultValue: widgetMetadata.diskPath
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
readonly property bool isVerticalBar: Settings.data.bar.position === "left" || Settings.data.bar.position === "right"
// Local state
property string valueHideMode: "hidden"
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueOnlyActiveWorkspaces: widgetData.onlyActiveWorkspaces !== undefined ? widgetData.onlyActiveWorkspaces : widgetMetadata.onlyActiveWorkspaces
property bool valueOnlySameOutput: widgetData.onlySameOutput !== undefined ? widgetData.onlySameOutput : widgetMetadata.onlySameOutput
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
@@ -75,6 +75,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NToggle {
@@ -86,6 +87,7 @@ ColumnLayout {
root.valueOnlySameOutput = checked;
saveSettings();
}
defaultValue: widgetMetadata.onlySameOutput
}
NToggle {
@@ -97,6 +99,7 @@ ColumnLayout {
root.valueOnlyActiveWorkspaces = checked;
saveSettings();
}
defaultValue: widgetMetadata.onlyActiveWorkspaces
}
NToggle {
@@ -108,6 +111,7 @@ ColumnLayout {
root.valueColorizeIcons = checked;
saveSettings();
}
defaultValue: widgetMetadata.colorizeIcons
}
NToggle {
@@ -119,6 +123,7 @@ ColumnLayout {
root.valueShowPinnedApps = checked;
saveSettings();
}
defaultValue: widgetMetadata.showPinnedApps
}
NValueSlider {
@@ -128,7 +133,9 @@ ColumnLayout {
from: 0.5
to: 1
stepSize: 0.01
showReset: true
value: root.valueIconScale
defaultValue: widgetMetadata.iconScale
onMoved: value => {
root.valueIconScale = value;
saveSettings();
@@ -146,6 +153,7 @@ ColumnLayout {
saveSettings();
}
enabled: !isVerticalBar
defaultValue: widgetMetadata.showTitle
}
NTextInput {
@@ -157,6 +165,7 @@ ColumnLayout {
text: widgetData.titleWidth || widgetMetadata.titleWidth
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.titleWidth)
}
NToggle {
@@ -169,6 +178,7 @@ ColumnLayout {
root.valueSmartWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.smartWidth
}
NValueSlider {
@@ -179,7 +189,9 @@ ColumnLayout {
from: 10
to: 100
stepSize: 5
showReset: true
value: root.valueMaxTaskbarWidth
defaultValue: widgetMetadata.maxTaskbarWidth
onMoved: value => {
root.valueMaxTaskbarWidth = Math.round(value);
saveSettings();
@@ -48,6 +48,7 @@ ColumnLayout {
root.valueDrawerEnabled = checked;
saveSettings();
}
defaultValue: widgetMetadata.drawerEnabled
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
saveSettings();
}
visible: root.valueDrawerEnabled
defaultValue: widgetMetadata.chevronColor
}
NToggle {
@@ -70,6 +72,7 @@ ColumnLayout {
root.valueColorizeIcons = checked;
saveSettings();
}
defaultValue: widgetMetadata.colorizeIcons
}
NToggle {
@@ -81,6 +84,7 @@ ColumnLayout {
root.valueHidePassive = checked;
saveSettings();
}
defaultValue: widgetMetadata.hidePassive
}
ColumnLayout {
@@ -53,6 +53,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -62,6 +63,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -70,6 +72,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
// Middle click command
@@ -80,5 +83,6 @@ ColumnLayout {
text: valueMiddleClickCommand
onTextChanged: valueMiddleClickCommand = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickCommand
}
}
@@ -197,7 +197,9 @@ ColumnLayout {
from: 0
to: 1
stepSize: 0.01
showReset: true
value: valueUnfocusedIconsOpacity
defaultValue: widgetMetadata.unfocusedIconsOpacity
onMoved: value => {
valueUnfocusedIconsOpacity = value;
saveSettings();
@@ -212,7 +214,9 @@ ColumnLayout {
from: 0
to: 1
stepSize: 0.01
showReset: true
value: valueGroupedBorderOpacity
defaultValue: widgetMetadata.groupedBorderOpacity
onMoved: value => {
valueGroupedBorderOpacity = value;
saveSettings();
@@ -227,7 +231,9 @@ ColumnLayout {
from: 0.5
to: 1
stepSize: 0.01
showReset: true
value: valueIconScale
defaultValue: widgetMetadata.iconScale
onMoved: value => {
valueIconScale = value;
saveSettings();
@@ -20,15 +20,15 @@ ColumnLayout {
QtObject {
id: _settings
property string icon: (widgetData && widgetData.icon !== undefined) ? widgetData.icon : (widgetMetadata && widgetMetadata.icon ? widgetMetadata.icon : "")
property string onClicked: (widgetData && widgetData.onClicked !== undefined) ? widgetData.onClicked : (widgetMetadata && widgetMetadata.onClicked ? widgetMetadata.onClicked : "")
property string onRightClicked: (widgetData && widgetData.onRightClicked !== undefined) ? widgetData.onRightClicked : (widgetMetadata && widgetMetadata.onRightClicked ? widgetMetadata.onRightClicked : "")
property string onMiddleClicked: (widgetData && widgetData.onMiddleClicked !== undefined) ? widgetData.onMiddleClicked : (widgetMetadata && widgetMetadata.onMiddleClicked ? widgetMetadata.onMiddleClicked : "")
property string icon: widgetData.icon !== undefined ? widgetData.icon : widgetMetadata.icon
property string onClicked: widgetData.onClicked !== undefined ? widgetData.onClicked : widgetMetadata.onClicked
property string onRightClicked: widgetData.onRightClicked !== undefined ? widgetData.onRightClicked : widgetMetadata.onRightClicked
property string onMiddleClicked: widgetData.onMiddleClicked !== undefined ? widgetData.onMiddleClicked : widgetMetadata.onMiddleClicked
property ListModel _stateChecksListModel: ListModel {}
property string stateChecksJson: "[]"
property string generalTooltipText: (widgetData && widgetData.generalTooltipText !== undefined) ? widgetData.generalTooltipText : (widgetMetadata && widgetMetadata.generalTooltipText ? widgetMetadata.generalTooltipText : "")
property bool enableOnStateLogic: (widgetData && widgetData.enableOnStateLogic !== undefined) ? widgetData.enableOnStateLogic : (widgetMetadata && widgetMetadata.enableOnStateLogic !== undefined ? widgetMetadata.enableOnStateLogic : false)
property bool showExecTooltip: (widgetData && widgetData.showExecTooltip !== undefined) ? widgetData.showExecTooltip : (widgetMetadata && widgetMetadata.showExecTooltip !== undefined ? widgetMetadata.showExecTooltip : true)
property string generalTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText
property bool enableOnStateLogic: widgetData.enableOnStateLogic !== undefined ? widgetData.enableOnStateLogic : widgetMetadata.enableOnStateLogic
property bool showExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : widgetMetadata.showExecTooltip
function populateStateChecks() {
try {
@@ -143,6 +143,7 @@ ColumnLayout {
_settings.generalTooltipText = text;
saveSettings();
}
defaultValue: widgetMetadata.generalTooltipText
}
NToggle {
@@ -154,6 +155,7 @@ ColumnLayout {
_settings.showExecTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showExecTooltip
}
NTextInput {
@@ -166,6 +168,7 @@ ColumnLayout {
_settings.onClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onClicked
}
NTextInput {
@@ -178,6 +181,7 @@ ColumnLayout {
_settings.onRightClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onRightClicked
}
NTextInput {
@@ -190,6 +194,7 @@ ColumnLayout {
_settings.onMiddleClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onMiddleClicked
}
NDivider {}
@@ -204,6 +209,7 @@ ColumnLayout {
_settings.enableOnStateLogic = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableOnStateLogic
}
ColumnLayout {
@@ -16,11 +16,11 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : true
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
property string valueClockStyle: widgetData.clockStyle !== undefined ? widgetData.clockStyle : widgetMetadata.clockStyle
property string valueClockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
property bool valueUseCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : ""
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.custonFont
property string valueFormat: widgetData.format !== undefined ? widgetData.format : widgetMetadata.format
// Track the currently focused input field
@@ -97,39 +97,18 @@ ColumnLayout {
valueClockStyle = key;
saveSettings();
}
defaultValue: widgetMetadata.clockStyle
}
NComboBox {
NColorChoice {
label: I18n.tr("common.select-color")
description: I18n.tr("common.select-color-description")
model: [
{
"name": I18n.tr("common.none"),
"key": "none"
},
{
"key": "primary",
"name": I18n.tr("common.primary")
},
{
"key": "secondary",
"name": I18n.tr("common.secondary")
},
{
"key": "tertiary",
"name": I18n.tr("common.tertiary")
},
{
"key": "error",
"name": I18n.tr("common.error")
}
]
currentKey: valueClockColor
onSelected: key => {
valueClockColor = key;
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.clockColor
}
NToggle {
@@ -141,6 +120,7 @@ ColumnLayout {
valueUseCustomFont = checked;
saveSettings();
}
defaultValue: widgetMetadata.useCustomFont
}
NSearchableComboBox {
@@ -158,6 +138,8 @@ ColumnLayout {
valueCustomFont = key;
saveSettings();
}
enabled: valueClockStyle === "minimal"
defaultValue: Settings.data.ui.fontDefault
}
NDivider {
@@ -203,6 +185,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.format
}
}
@@ -290,6 +273,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -302,5 +286,6 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
}
@@ -14,12 +14,12 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property string valueVisualizerType: (widgetData.visualizerType && widgetData.visualizerType !== "") ? widgetData.visualizerType : (widgetMetadata.visualizerType || "linear")
property string valueVisualizerType: widgetData.visualizerType ? widgetData.visualizerType : widgetMetadata.visualizerType
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueShowButtons: widgetData.showButtons !== undefined ? widgetData.showButtons : (widgetMetadata.showButtons !== undefined ? widgetMetadata.showButtons : true)
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : (widgetMetadata.showAlbumArt !== undefined ? widgetMetadata.showAlbumArt : true)
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : (widgetMetadata.showVisualizer !== undefined ? widgetMetadata.showVisualizer : true)
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata.roundedCorners !== undefined ? widgetMetadata.roundedCorners : true)
property bool valueShowButtons: widgetData.showButtons !== undefined ? widgetData.showButtons : widgetMetadata.showButtons
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : widgetMetadata.showAlbumArt
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -42,6 +42,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -53,6 +54,7 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
NToggle {
@@ -64,6 +66,7 @@ ColumnLayout {
valueShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.showAlbumArt
}
NToggle {
@@ -75,6 +78,7 @@ ColumnLayout {
valueShowVisualizer = checked;
saveSettings();
}
defaultValue: widgetMetadata.showVisualizer
}
NToggle {
@@ -86,6 +90,7 @@ ColumnLayout {
valueShowButtons = checked;
saveSettings();
}
defaultValue: widgetMetadata.showButtons
}
NComboBox {
@@ -112,6 +117,7 @@ ColumnLayout {
valueVisualizerType = key;
saveSettings();
}
defaultValue: widgetMetadata.visualizerType
}
NComboBox {
@@ -137,5 +143,6 @@ ColumnLayout {
valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
}
@@ -18,8 +18,8 @@ ColumnLayout {
property string valueStatType: widgetData.statType !== undefined ? widgetData.statType : widgetMetadata.statType
property string valueDiskPath: widgetData.diskPath !== undefined ? widgetData.diskPath : widgetMetadata.diskPath
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata.roundedCorners !== undefined ? widgetMetadata.roundedCorners : true)
property string valueLayout: widgetData.layout !== undefined ? widgetData.layout : (widgetMetadata.layout !== undefined ? widgetMetadata.layout : "side")
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
property string valueLayout: widgetData.layout !== undefined ? widgetData.layout : widgetMetadata.layout
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -67,6 +67,7 @@ ColumnLayout {
valueStatType = key;
saveSettings();
}
defaultValue: widgetMetadata.statType
}
NComboBox {
@@ -86,6 +87,7 @@ ColumnLayout {
valueDiskPath = key;
saveSettings();
}
defaultValue: widgetMetadata.diskPath
}
NDivider {
@@ -101,6 +103,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -113,6 +116,7 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
NDivider {
@@ -139,5 +143,6 @@ ColumnLayout {
valueLayout = key;
saveSettings();
}
defaultValue: widgetMetadata.layout
}
}
@@ -14,10 +14,12 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
settings.showBackground = valueShowBackground;
settings.roundedCorners = valueRoundedCorners;
settingsChanged(settings);
}
@@ -30,5 +32,19 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
Layout.fillWidth: true
visible: valueShowBackground
label: I18n.tr("panels.desktop-widgets.clock-rounded-corners-label")
description: I18n.tr("panels.desktop-widgets.clock-rounded-corners-description")
checked: valueRoundedCorners
onToggled: checked => {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
}
@@ -169,36 +169,18 @@ ColumnLayout {
Layout.fillWidth: true
visible: !Settings.data.general.animationDisabled
RowLayout {
spacing: Style.marginL
NValueSlider {
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.user-interface.animation-speed-label")
description: I18n.tr("panels.user-interface.animation-speed-description")
from: 0
to: 2.0
stepSize: 0.01
value: Settings.data.general.animationSpeed
defaultValue: Settings.getDefaultValue("general.animationSpeed")
onMoved: value => Settings.data.general.animationSpeed = Math.max(value, 0.05)
text: Math.round(Settings.data.general.animationSpeed * 100) + "%"
}
Item {
Layout.preferredWidth: 30 * Style.uiScaleRatio
Layout.preferredHeight: 30 * Style.uiScaleRatio
NIconButton {
icon: "restore"
baseSize: Style.baseWidgetSize * 0.8
tooltipText: I18n.tr("panels.user-interface.animation-speed-reset")
onClicked: Settings.data.general.animationSpeed = Settings.getDefaultValue("general.animationSpeed")
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
label: I18n.tr("panels.user-interface.animation-speed-label")
description: I18n.tr("panels.user-interface.animation-speed-description")
from: 0
to: 2.0
stepSize: 0.01
showReset: true
value: Settings.data.general.animationSpeed
defaultValue: Settings.getDefaultValue("general.animationSpeed")
onMoved: value => Settings.data.general.animationSpeed = Math.max(value, 0.05)
text: Math.round(Settings.data.general.animationSpeed * 100) + "%"
}
}
}
@@ -29,36 +29,18 @@ ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
RowLayout {
spacing: Style.marginL
NValueSlider {
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.general.screen-corners-radius-label")
description: I18n.tr("panels.general.screen-corners-radius-description")
from: 0
to: 2
stepSize: 0.01
value: Settings.data.general.screenRadiusRatio
defaultValue: Settings.getDefaultValue("general.screenRadiusRatio")
onMoved: value => Settings.data.general.screenRadiusRatio = value
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
}
Item {
Layout.preferredWidth: 30 * Style.uiScaleRatio
Layout.preferredHeight: 30 * Style.uiScaleRatio
NIconButton {
icon: "restore"
baseSize: Style.baseWidgetSize * 0.8
tooltipText: I18n.tr("panels.general.screen-corners-radius-reset")
onClicked: Settings.data.general.screenRadiusRatio = Settings.getDefaultValue("general.screenRadiusRatio")
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
label: I18n.tr("panels.general.screen-corners-radius-label")
description: I18n.tr("panels.general.screen-corners-radius-description")
from: 0
to: 2
stepSize: 0.01
showReset: true
value: Settings.data.general.screenRadiusRatio
defaultValue: Settings.getDefaultValue("general.screenRadiusRatio")
onMoved: value => Settings.data.general.screenRadiusRatio = value
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
}
}
}
@@ -59,6 +59,7 @@ ColumnLayout {
from: 500
to: 10000
stepSize: 100
showReset: true
value: Settings.data.wallpaper.transitionDuration
onMoved: value => Settings.data.wallpaper.transitionDuration = value
text: (Settings.data.wallpaper.transitionDuration / 1000).toFixed(1) + "s"
@@ -71,6 +72,7 @@ ColumnLayout {
description: I18n.tr("panels.wallpaper.look-feel-edge-smoothness-description")
from: 0.0
to: 1.0
showReset: true
value: Settings.data.wallpaper.transitionEdgeSmoothness
onMoved: value => Settings.data.wallpaper.transitionEdgeSmoothness = value
text: Math.round(Settings.data.wallpaper.transitionEdgeSmoothness * 100) + "%"
+1 -4
View File
@@ -203,10 +203,7 @@ Singleton {
"visualizerType": "linear",
"textColor": "none",
"compactMode": false,
"panelShowAlbumArt": true,
"panelShowVisualizer": true,
"compactShowAlbumArt": true,
"compactShowVisualizer": false
"panelShowAlbumArt": true
},
"Microphone": {
"displayMode": "onhover",
+7 -4
View File
@@ -55,28 +55,31 @@ Singleton {
property var widgetMetadata: ({
"Clock": {
"showBackground": true,
"roundedCorners": true,
"clockStyle": "digital",
"clockColor": "none",
"useCustomFont": false,
"customFont": "",
"format": "HH:mm\\nd MMMM yyyy"
},
"MediaPlayer": {
"showBackground": true,
"roundedCorners": true,
"visualizerType": "linear",
"hideMode": "visible",
"showButtons": true,
"showAlbumArt": true,
"showVisualizer": true,
"roundedCorners": true
"showVisualizer": true
},
"Weather": {
"showBackground": true
"showBackground": true,
"roundedCorners": true
},
"SystemStat": {
"showBackground": true,
"roundedCorners": true,
"statType": "CPU",
"diskPath": "/",
"roundedCorners": true,
"layout": "bottom"
}
})