mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 01:02:18 -04:00
settings: Re-adjust dbar layout
This commit is contained in:
@@ -912,6 +912,56 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsSliderCard {
|
||||||
|
id: fontScaleSliderCard
|
||||||
|
iconName: "text_fields"
|
||||||
|
title: I18n.tr("Font Scale")
|
||||||
|
description: I18n.tr("Scale DankBar font sizes independently")
|
||||||
|
visible: selectedBarConfig?.enabled
|
||||||
|
minimum: 50
|
||||||
|
maximum: 200
|
||||||
|
value: Math.round((selectedBarConfig?.fontScale ?? 1.0) * 100)
|
||||||
|
unit: "%"
|
||||||
|
defaultValue: 100
|
||||||
|
onSliderDragFinished: finalValue => {
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
fontScale: finalValue / 100
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: fontScaleSliderCard
|
||||||
|
property: "value"
|
||||||
|
value: Math.round((selectedBarConfig?.fontScale ?? 1.0) * 100)
|
||||||
|
restoreMode: Binding.RestoreBinding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsSliderCard {
|
||||||
|
id: iconScaleSliderCard
|
||||||
|
iconName: "interests"
|
||||||
|
title: I18n.tr("Icon Scale")
|
||||||
|
description: I18n.tr("Scale DankBar icon sizes independently")
|
||||||
|
visible: selectedBarConfig?.enabled
|
||||||
|
minimum: 50
|
||||||
|
maximum: 200
|
||||||
|
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
||||||
|
unit: "%"
|
||||||
|
defaultValue: 100
|
||||||
|
onSliderDragFinished: finalValue => {
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
iconScale: finalValue / 100
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: iconScaleSliderCard
|
||||||
|
property: "value"
|
||||||
|
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
||||||
|
restoreMode: Binding.RestoreBinding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SettingsCard {
|
SettingsCard {
|
||||||
iconName: "opacity"
|
iconName: "opacity"
|
||||||
title: I18n.tr("Transparency")
|
title: I18n.tr("Transparency")
|
||||||
@@ -963,56 +1013,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsSliderCard {
|
|
||||||
id: fontScaleSliderCard
|
|
||||||
iconName: "text_fields"
|
|
||||||
title: I18n.tr("Font Scale")
|
|
||||||
description: I18n.tr("Scale DankBar font sizes independently")
|
|
||||||
visible: selectedBarConfig?.enabled
|
|
||||||
minimum: 50
|
|
||||||
maximum: 200
|
|
||||||
value: Math.round((selectedBarConfig?.fontScale ?? 1.0) * 100)
|
|
||||||
unit: "%"
|
|
||||||
defaultValue: 100
|
|
||||||
onSliderDragFinished: finalValue => {
|
|
||||||
SettingsData.updateBarConfig(selectedBarId, {
|
|
||||||
fontScale: finalValue / 100
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Binding {
|
|
||||||
target: fontScaleSliderCard
|
|
||||||
property: "value"
|
|
||||||
value: Math.round((selectedBarConfig?.fontScale ?? 1.0) * 100)
|
|
||||||
restoreMode: Binding.RestoreBinding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsSliderCard {
|
|
||||||
id: iconScaleSliderCard
|
|
||||||
iconName: "interests"
|
|
||||||
title: I18n.tr("Icon Scale")
|
|
||||||
description: I18n.tr("Scale DankBar icon sizes independently")
|
|
||||||
visible: selectedBarConfig?.enabled
|
|
||||||
minimum: 50
|
|
||||||
maximum: 200
|
|
||||||
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
|
||||||
unit: "%"
|
|
||||||
defaultValue: 100
|
|
||||||
onSliderDragFinished: finalValue => {
|
|
||||||
SettingsData.updateBarConfig(selectedBarId, {
|
|
||||||
iconScale: finalValue / 100
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Binding {
|
|
||||||
target: iconScaleSliderCard
|
|
||||||
property: "value"
|
|
||||||
value: Math.round((selectedBarConfig?.iconScale ?? 1.0) * 100)
|
|
||||||
restoreMode: Binding.RestoreBinding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsCard {
|
SettingsCard {
|
||||||
iconName: "rounded_corner"
|
iconName: "rounded_corner"
|
||||||
title: I18n.tr("Corners & Background")
|
title: I18n.tr("Corners & Background")
|
||||||
|
|||||||
Reference in New Issue
Block a user