diff --git a/Assets/settings-widgets-default.json b/Assets/settings-widgets-default.json index 744c937e5..1d756edb4 100644 --- a/Assets/settings-widgets-default.json +++ b/Assets/settings-widgets-default.json @@ -125,10 +125,7 @@ "visualizerType": "linear", "textColor": "none", "compactMode": false, - "panelShowAlbumArt": true, - "panelShowVisualizer": true, - "compactShowAlbumArt": true, - "compactShowVisualizer": false + "panelShowAlbumArt": true }, "Microphone": { "displayMode": "onhover", diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 48fdf195f..f67ec6759 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -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 diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml index ddf5b6138..b1fed1cdc 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ActiveWindowSettings.qml @@ -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(); diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml index fe58e12e1..ca474a1c3 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/AudioVisualizerSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/BatterySettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/BatterySettings.qml index 679ed4281..7c59cd26f 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/BatterySettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/BatterySettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/BluetoothSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/BluetoothSettings.qml index c308d3575..cd1c53d2b 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/BluetoothSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/BluetoothSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/BrightnessSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/BrightnessSettings.qml index 984c6d0ee..38a349452 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/BrightnessSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/BrightnessSettings.qml @@ -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 { diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml index 0f08a5d76..5ff3f715c 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ClockSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml index 8ec884a34..d24602d90 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -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 { diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml index 94b7ef5ee..da099e41b 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/CustomButtonSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/DarkModeSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/DarkModeSettings.qml index ec0584b61..f6546e836 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/DarkModeSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/DarkModeSettings.qml @@ -29,5 +29,6 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + defaultValue: widgetMetadata.iconColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/KeepAwakeSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/KeepAwakeSettings.qml index 2132c15d3..fc942356a 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/KeepAwakeSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/KeepAwakeSettings.qml @@ -31,6 +31,7 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + defaultValue: widgetMetadata.iconColor } NColorChoice { @@ -39,5 +40,6 @@ ColumnLayout { valueTextColor = key; saveSettings(); } + defaultValue: widgetMetadata.textColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml index 2c7e90e7f..9b40c80d0 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/LauncherSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/LauncherSettings.qml index c232d6405..ff91dc614 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/LauncherSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/LauncherSettings.qml @@ -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 { diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/LockKeysSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/LockKeysSettings.qml index 21d78eb30..f5373a3fd 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/LockKeysSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/LockKeysSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml index 4cab94297..b9000b132 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/MediaMiniSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml index b07dc4c41..fdc79ebda 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/MicrophoneSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/NetworkSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/NetworkSettings.qml index c308d3575..cd1c53d2b 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/NetworkSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/NetworkSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/NightLightSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/NightLightSettings.qml index ec0584b61..f6546e836 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/NightLightSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/NightLightSettings.qml @@ -29,5 +29,6 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + defaultValue: widgetMetadata.iconColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/NoctaliaPerformanceSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/NoctaliaPerformanceSettings.qml index ec0584b61..f6546e836 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/NoctaliaPerformanceSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/NoctaliaPerformanceSettings.qml @@ -29,5 +29,6 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + defaultValue: widgetMetadata.iconColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/NotificationHistorySettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/NotificationHistorySettings.qml index 14df75eb0..4a59f1ac8 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/NotificationHistorySettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/NotificationHistorySettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/PowerProfileSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/PowerProfileSettings.qml index ec0584b61..f6546e836 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/PowerProfileSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/PowerProfileSettings.qml @@ -29,5 +29,6 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + defaultValue: widgetMetadata.iconColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SessionMenuSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SessionMenuSettings.qml index cf4088ce4..258d0abc7 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SessionMenuSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SessionMenuSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SettingsSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SettingsSettings.qml index 1b381411e..d5f54b1a7 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SettingsSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SettingsSettings.qml @@ -30,5 +30,6 @@ ColumnLayout { valueIconColor = key; saveSettings(); } + valueDefault: widgetMetadata.iconColor } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml index 73143d3e4..8909d12e3 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SpacerSettings.qml @@ -29,5 +29,6 @@ ColumnLayout { text: widgetData.width || widgetMetadata.width placeholderText: I18n.tr("placeholders.enter-width-pixels") onEditingFinished: saveSettings() + defaultValue: String(widgetMetadata.width) } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml index 171593589..e4511e966 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml index 2ff8faac8..8d3b81594 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/TaskbarSettings.qml @@ -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(); diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/TraySettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/TraySettings.qml index fd566a82d..e3fb99b01 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/TraySettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/TraySettings.qml @@ -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 { diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml index b07dc4c41..fdc79ebda 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/VolumeSettings.qml @@ -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 } } diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/WorkspaceSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/WorkspaceSettings.qml index daa8e1530..6ef5b44f7 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/WorkspaceSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/WorkspaceSettings.qml @@ -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(); diff --git a/Modules/Panels/Settings/Tabs/UserInterface/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/UserInterface/AppearanceSubTab.qml index 2eb102ad6..90ce9ad70 100644 --- a/Modules/Panels/Settings/Tabs/UserInterface/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/UserInterface/AppearanceSubTab.qml @@ -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) + "%" } } } diff --git a/Modules/Panels/Settings/Tabs/UserInterface/ScreenCornersSubTab.qml b/Modules/Panels/Settings/Tabs/UserInterface/ScreenCornersSubTab.qml index fa356b083..1607abc34 100644 --- a/Modules/Panels/Settings/Tabs/UserInterface/ScreenCornersSubTab.qml +++ b/Modules/Panels/Settings/Tabs/UserInterface/ScreenCornersSubTab.qml @@ -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) + "%" } } } diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml index e33aa23b2..72039c0bf 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml @@ -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) + "%" diff --git a/Services/UI/BarWidgetRegistry.qml b/Services/UI/BarWidgetRegistry.qml index f452b9f0f..36ae14b0b 100644 --- a/Services/UI/BarWidgetRegistry.qml +++ b/Services/UI/BarWidgetRegistry.qml @@ -203,10 +203,7 @@ Singleton { "visualizerType": "linear", "textColor": "none", "compactMode": false, - "panelShowAlbumArt": true, - "panelShowVisualizer": true, - "compactShowAlbumArt": true, - "compactShowVisualizer": false + "panelShowAlbumArt": true }, "Microphone": { "displayMode": "onhover",