mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Make "none" defaultValue of NColorChoice
This commit is contained in:
@@ -56,7 +56,6 @@ ColumnLayout {
|
||||
label: I18n.tr("common.select-icon-color")
|
||||
description: I18n.tr("common.select-color-description")
|
||||
currentKey: valueIconColor
|
||||
defaultValue: "none"
|
||||
onSelected: key => {
|
||||
valueIconColor = key;
|
||||
saveSettings();
|
||||
|
||||
@@ -10,13 +10,15 @@ RowLayout {
|
||||
property string description: ""
|
||||
property string tooltip: ""
|
||||
property string currentKey: ""
|
||||
property var defaultValue: undefined
|
||||
property var defaultValue: "none"
|
||||
property int circleSize: Style.baseWidgetSize * 0.9
|
||||
// Private properties
|
||||
readonly property bool isValueChanged: (defaultValue !== undefined) && (currentKey !== defaultValue)
|
||||
readonly property string indicatorTooltip: defaultValue !== undefined ? I18n.tr("panels.indicator.default-value", {
|
||||
"value": defaultValue === "" ? "(empty)" : String(defaultValue)
|
||||
}) : ""
|
||||
|
||||
readonly property bool isValueChanged: currentKey !== defaultValue
|
||||
readonly property string indicatorTooltip: {
|
||||
I18n.tr("panels.indicator.default-value", {
|
||||
"value": defaultValue === "" ? "(empty)" : String(defaultValue)
|
||||
});
|
||||
}
|
||||
|
||||
signal selected(string key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user