mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-12 08:42:13 -04:00
settings: Dankbar layout updates
This commit is contained in:
@@ -912,6 +912,107 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsCard {
|
||||||
|
iconName: "opacity"
|
||||||
|
title: I18n.tr("Transparency")
|
||||||
|
settingKey: "barTransparency"
|
||||||
|
visible: selectedBarConfig?.enabled
|
||||||
|
|
||||||
|
SettingsSliderRow {
|
||||||
|
id: barTransparencySlider
|
||||||
|
text: I18n.tr("Bar Transparency")
|
||||||
|
value: (selectedBarConfig?.transparency ?? 1.0) * 100
|
||||||
|
minimum: 0
|
||||||
|
maximum: 100
|
||||||
|
unit: "%"
|
||||||
|
defaultValue: 100
|
||||||
|
onSliderDragFinished: finalValue => {
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
transparency: finalValue / 100
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: barTransparencySlider
|
||||||
|
property: "value"
|
||||||
|
value: (selectedBarConfig?.transparency ?? 1.0) * 100
|
||||||
|
restoreMode: Binding.RestoreBinding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsSliderRow {
|
||||||
|
id: widgetTransparencySlider
|
||||||
|
text: I18n.tr("Widget Transparency")
|
||||||
|
value: (selectedBarConfig?.widgetTransparency ?? 1.0) * 100
|
||||||
|
minimum: 0
|
||||||
|
maximum: 100
|
||||||
|
unit: "%"
|
||||||
|
defaultValue: 100
|
||||||
|
onSliderDragFinished: finalValue => {
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
widgetTransparency: finalValue / 100
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: widgetTransparencySlider
|
||||||
|
property: "value"
|
||||||
|
value: (selectedBarConfig?.widgetTransparency ?? 1.0) * 100
|
||||||
|
restoreMode: Binding.RestoreBinding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
@@ -1321,107 +1422,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsCard {
|
|
||||||
iconName: "opacity"
|
|
||||||
title: I18n.tr("Transparency")
|
|
||||||
settingKey: "barTransparency"
|
|
||||||
visible: selectedBarConfig?.enabled
|
|
||||||
|
|
||||||
SettingsSliderRow {
|
|
||||||
id: barTransparencySlider
|
|
||||||
text: I18n.tr("Bar Transparency")
|
|
||||||
value: (selectedBarConfig?.transparency ?? 1.0) * 100
|
|
||||||
minimum: 0
|
|
||||||
maximum: 100
|
|
||||||
unit: "%"
|
|
||||||
defaultValue: 100
|
|
||||||
onSliderDragFinished: finalValue => {
|
|
||||||
SettingsData.updateBarConfig(selectedBarId, {
|
|
||||||
transparency: finalValue / 100
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Binding {
|
|
||||||
target: barTransparencySlider
|
|
||||||
property: "value"
|
|
||||||
value: (selectedBarConfig?.transparency ?? 1.0) * 100
|
|
||||||
restoreMode: Binding.RestoreBinding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsSliderRow {
|
|
||||||
id: widgetTransparencySlider
|
|
||||||
text: I18n.tr("Widget Transparency")
|
|
||||||
value: (selectedBarConfig?.widgetTransparency ?? 1.0) * 100
|
|
||||||
minimum: 0
|
|
||||||
maximum: 100
|
|
||||||
unit: "%"
|
|
||||||
defaultValue: 100
|
|
||||||
onSliderDragFinished: finalValue => {
|
|
||||||
SettingsData.updateBarConfig(selectedBarId, {
|
|
||||||
widgetTransparency: finalValue / 100
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Binding {
|
|
||||||
target: widgetTransparencySlider
|
|
||||||
property: "value"
|
|
||||||
value: (selectedBarConfig?.widgetTransparency ?? 1.0) * 100
|
|
||||||
restoreMode: Binding.RestoreBinding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user