audio popout color feedback when muting specific tracks
This commit is contained in:
@@ -5,13 +5,15 @@ import qs.Config
|
|||||||
Slider {
|
Slider {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property color color: DynamicColors.palette.m3primary
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
CustomRect {
|
CustomRect {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
bottomRightRadius: root.implicitHeight / 6
|
bottomRightRadius: root.implicitHeight / 6
|
||||||
color: DynamicColors.palette.m3primary
|
color: root.color
|
||||||
implicitWidth: root.handle.x - root.implicitHeight / 2
|
implicitWidth: root.handle.x - root.implicitHeight / 2
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
topRightRadius: root.implicitHeight / 6
|
topRightRadius: root.implicitHeight / 6
|
||||||
@@ -30,7 +32,7 @@ Slider {
|
|||||||
}
|
}
|
||||||
handle: CustomRect {
|
handle: CustomRect {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: DynamicColors.palette.m3primary
|
color: root.color
|
||||||
implicitHeight: 15
|
implicitHeight: 15
|
||||||
implicitWidth: 5
|
implicitWidth: 5
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
|
|||||||
@@ -401,18 +401,21 @@ CustomRect {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredHeight: 40
|
Layout.preferredHeight: 40
|
||||||
Layout.preferredWidth: 40
|
Layout.preferredWidth: 40
|
||||||
color: DynamicColors.palette.m3primary
|
color: appBox.modelData.audio.muted ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
|
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: DynamicColors.palette.m3onPrimary
|
animate: true
|
||||||
|
color: appBox.modelData.audio.muted ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onPrimary
|
||||||
font.pointSize: 22
|
font.pointSize: 22
|
||||||
text: "volume_up"
|
text: appBox.modelData.audio.muted ? "volume_off" : "volume_up"
|
||||||
|
}
|
||||||
|
|
||||||
StateLayer {
|
StateLayer {
|
||||||
|
color: appBox.modelData.audio.muted ? DynamicColors.palette.m3onError : DynamicColors.palette.m3onPrimary
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -420,7 +423,6 @@ CustomRect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
@@ -463,6 +465,7 @@ CustomRect {
|
|||||||
CustomSlider {
|
CustomSlider {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
color: appBox.modelData.audio.muted ? DynamicColors.palette.m3error : DynamicColors.palette.m3primary
|
||||||
implicitHeight: 10
|
implicitHeight: 10
|
||||||
value: appBox.modelData.audio.volume
|
value: appBox.modelData.audio.volume
|
||||||
|
|
||||||
|
|||||||
@@ -11,22 +11,12 @@ GridLayout {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool dashboardVisible: visibilities.dashboard
|
readonly property bool dashboardVisible: visibilities.dashboard
|
||||||
property int radius: 6
|
property int radius: Appearance.rounding.smallest
|
||||||
required property PersistentProperties state
|
required property PersistentProperties state
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
columnSpacing: Appearance.spacing.smaller
|
columnSpacing: Appearance.spacing.smaller
|
||||||
opacity: 0
|
|
||||||
rowSpacing: Appearance.spacing.smaller
|
rowSpacing: Appearance.spacing.smaller
|
||||||
scale: 0.9
|
|
||||||
|
|
||||||
onDashboardVisibleChanged: {
|
|
||||||
if (dashboardVisible) {
|
|
||||||
openAnim.start();
|
|
||||||
} else {
|
|
||||||
closeAnim.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
id: openAnim
|
id: openAnim
|
||||||
@@ -110,7 +100,6 @@ GridLayout {
|
|||||||
|
|
||||||
Resources {
|
Resources {
|
||||||
id: resources
|
id: resources
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +113,6 @@ GridLayout {
|
|||||||
|
|
||||||
Media {
|
Media {
|
||||||
id: media
|
id: media
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user