controlcenter: audio pane refresh
This commit is contained in:
parent
6cc779d6f3
commit
a86fde606e
1 changed files with 128 additions and 119 deletions
|
|
@ -247,34 +247,30 @@ RowLayout {
|
||||||
|
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
MaterialIcon {
|
ConnectionHeader {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
icon: "volume_up"
|
||||||
text: "volume_up"
|
title: qsTr("Audio Settings")
|
||||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
|
||||||
font.bold: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
SectionHeader {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
title: qsTr("Output volume")
|
||||||
text: qsTr("Audio Settings")
|
description: qsTr("Control the volume of your output device")
|
||||||
font.pointSize: Appearance.font.size.large
|
|
||||||
font.bold: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
SectionContainer {
|
||||||
Layout.topMargin: Appearance.spacing.large
|
contentSpacing: Appearance.spacing.normal
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: qsTr("Output volume")
|
ColumnLayout {
|
||||||
font.pointSize: Appearance.font.size.larger
|
Layout.fillWidth: true
|
||||||
font.weight: 500
|
spacing: Appearance.spacing.small
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Appearance.spacing.smaller
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr("Volume")
|
text: qsTr("Volume")
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.normal
|
||||||
font.weight: 500
|
font.weight: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,6 +278,13 @@ RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: Audio.muted ? qsTr("Muted") : qsTr("%1%").arg(Math.round(Audio.volume * 100))
|
||||||
|
color: Audio.muted ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
font.weight: 500
|
||||||
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
implicitWidth: implicitHeight
|
implicitWidth: implicitHeight
|
||||||
implicitHeight: muteIcon.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: muteIcon.implicitHeight + Appearance.padding.normal * 2
|
||||||
|
|
@ -307,11 +310,6 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: Audio.muted ? qsTr("Muted") : qsTr("%1%").arg(Math.round(Audio.volume * 100))
|
|
||||||
color: Audio.muted ? Colours.palette.m3primary : Colours.palette.m3outline
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSlider {
|
StyledSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: Appearance.padding.normal * 3
|
implicitHeight: Appearance.padding.normal * 3
|
||||||
|
|
@ -321,21 +319,28 @@ RowLayout {
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
onMoved: Audio.setVolume(value)
|
onMoved: Audio.setVolume(value)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
StyledText {
|
|
||||||
Layout.topMargin: Appearance.spacing.large
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: qsTr("Input volume")
|
|
||||||
font.pointSize: Appearance.font.size.larger
|
|
||||||
font.weight: 500
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SectionHeader {
|
||||||
|
title: qsTr("Input volume")
|
||||||
|
description: qsTr("Control the volume of your input device")
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionContainer {
|
||||||
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Appearance.spacing.smaller
|
Layout.fillWidth: true
|
||||||
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr("Volume")
|
text: qsTr("Volume")
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.normal
|
||||||
font.weight: 500
|
font.weight: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,6 +348,13 @@ RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: Audio.sourceMuted ? qsTr("Muted") : qsTr("%1%").arg(Math.round(Audio.sourceVolume * 100))
|
||||||
|
color: Audio.sourceMuted ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||||
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
font.weight: 500
|
||||||
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
implicitWidth: implicitHeight
|
implicitWidth: implicitHeight
|
||||||
implicitHeight: muteInputIcon.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: muteInputIcon.implicitHeight + Appearance.padding.normal * 2
|
||||||
|
|
@ -368,11 +380,6 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: Audio.sourceMuted ? qsTr("Muted") : qsTr("%1%").arg(Math.round(Audio.sourceVolume * 100))
|
|
||||||
color: Audio.sourceMuted ? Colours.palette.m3primary : Colours.palette.m3outline
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledSlider {
|
StyledSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: Appearance.padding.normal * 3
|
implicitHeight: Appearance.padding.normal * 3
|
||||||
|
|
@ -384,6 +391,8 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InnerBorder {
|
InnerBorder {
|
||||||
leftThickness: Appearance.padding.normal / 2
|
leftThickness: Appearance.padding.normal / 2
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue