settings: bar and audio options

This commit is contained in:
end-4
2025-06-21 03:24:03 +02:00
parent ddcf13678d
commit 5ffbd55f58
4 changed files with 49 additions and 14 deletions
@@ -8,6 +8,7 @@ RippleButton {
id: root
Layout.fillWidth: true
implicitHeight: contentItem.implicitHeight + 8 * 2
onClicked: checked = !checked
contentItem: RowLayout {
spacing: 10
@@ -92,8 +92,7 @@ Scope {
visible: GlobalStates.overviewOpen
anchors {
horizontalCenter: parent.horizontalCenter
top: !ConfigOptions.bar.bottom ? parent.top : undefined
bottom: ConfigOptions.bar.bottom ? parent.bottom : undefined
top: parent.top
}
Keys.onPressed: (event) => {
@@ -48,7 +48,18 @@ ContentPage {
}
}
}
}
ContentSection {
title: "Audio"
ConfigSwitch {
text: "Earbang protection"
checked: ConfigOptions.audio.protection.enable
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("audio.protection.enable", checked);
}
StyledToolTip {
content: "Prevents abrupt increments and restricts volume limit"
}
}
}
}
+34 -10
View File
@@ -174,15 +174,41 @@ ContentPage {
}
}
ConfigSwitch {
text: "Transparency"
checked: ConfigOptions.appearance.transparency
onClicked: checked = !checked;
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("appearance.transparency", checked);
ConfigRow {
ConfigSwitch {
text: "Transparency"
checked: ConfigOptions.appearance.transparency
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("appearance.transparency", checked);
}
StyledToolTip {
content: "Might look ass. Unsupported."
}
}
StyledToolTip {
content: "Might look ass. Unsupported."
}
StyledText {
text: "Bar"
color: Appearance.colors.colSubtext
}
ConfigRow {
uniform: true
ConfigSwitch {
text: 'Borderless'
checked: ConfigOptions.bar.borderless
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("bar.borderless", checked);
}
}
ConfigSwitch {
text: 'Show background'
checked: ConfigOptions.bar.showBackground
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("bar.showBackground", checked);
}
StyledToolTip {
content: "Note: turning off can hurt readability"
}
}
}
}
@@ -196,7 +222,6 @@ ContentPage {
ConfigSwitch {
text: "Title bar"
checked: ConfigOptions.windows.showTitlebar
onClicked: checked = !checked;
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("windows.showTitlebar", checked);
}
@@ -204,7 +229,6 @@ ContentPage {
ConfigSwitch {
text: "Center title"
checked: ConfigOptions.windows.centerTitle
onClicked: checked = !checked;
onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("windows.centerTitle", checked);
}