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 id: root
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: contentItem.implicitHeight + 8 * 2 implicitHeight: contentItem.implicitHeight + 8 * 2
onClicked: checked = !checked
contentItem: RowLayout { contentItem: RowLayout {
spacing: 10 spacing: 10
@@ -92,8 +92,7 @@ Scope {
visible: GlobalStates.overviewOpen visible: GlobalStates.overviewOpen
anchors { anchors {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
top: !ConfigOptions.bar.bottom ? parent.top : undefined top: parent.top
bottom: ConfigOptions.bar.bottom ? parent.bottom : undefined
} }
Keys.onPressed: (event) => { 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 { ConfigRow {
text: "Transparency" ConfigSwitch {
checked: ConfigOptions.appearance.transparency text: "Transparency"
onClicked: checked = !checked; checked: ConfigOptions.appearance.transparency
onCheckedChanged: { onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("appearance.transparency", checked); 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 { ConfigSwitch {
text: "Title bar" text: "Title bar"
checked: ConfigOptions.windows.showTitlebar checked: ConfigOptions.windows.showTitlebar
onClicked: checked = !checked;
onCheckedChanged: { onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("windows.showTitlebar", checked); ConfigLoader.setConfigValueAndSave("windows.showTitlebar", checked);
} }
@@ -204,7 +229,6 @@ ContentPage {
ConfigSwitch { ConfigSwitch {
text: "Center title" text: "Center title"
checked: ConfigOptions.windows.centerTitle checked: ConfigOptions.windows.centerTitle
onClicked: checked = !checked;
onCheckedChanged: { onCheckedChanged: {
ConfigLoader.setConfigValueAndSave("windows.centerTitle", checked); ConfigLoader.setConfigValueAndSave("windows.centerTitle", checked);
} }