formatter
This commit is contained in:
+96
-91
@@ -8,113 +8,118 @@ import qs.Config
|
||||
import qs.Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
implicitWidth: expanded ? 300 : 150
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
id: root
|
||||
|
||||
property bool expanded: false
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
property color barColor: DynamicColors.palette.m3primary
|
||||
property color barColor: DynamicColors.palette.m3primary
|
||||
property bool expanded: false
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
implicitWidth: expanded ? 300 : 150
|
||||
|
||||
Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 22
|
||||
radius: height / 2
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
height: 22
|
||||
radius: height / 2
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
radius: width / 2
|
||||
color: "transparent"
|
||||
border.color: "#30ffffff"
|
||||
border.width: 0
|
||||
}
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: 10
|
||||
rightMargin: 15
|
||||
}
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
border.color: "#30ffffff"
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
height: parent.height
|
||||
radius: width / 2
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pixelSize: 18
|
||||
text: Audio.muted ? "volume_off" : "volume_up"
|
||||
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
|
||||
}
|
||||
RowLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: 10
|
||||
rightMargin: 15
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
|
||||
font.pixelSize: 18
|
||||
text: Audio.muted ? "volume_off" : "volume_up"
|
||||
}
|
||||
|
||||
implicitHeight: 4
|
||||
radius: 20
|
||||
color: "#50ffffff"
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: "#50ffffff"
|
||||
implicitHeight: 4
|
||||
radius: 20
|
||||
|
||||
Rectangle {
|
||||
id: sinkVolumeBar
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
Rectangle {
|
||||
id: sinkVolumeBar
|
||||
|
||||
implicitWidth: parent.width * ( Audio.volume ?? 0 )
|
||||
radius: parent.radius
|
||||
color: Audio.muted ? DynamicColors.palette.m3error : root.barColor
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
implicitWidth: parent.width * (Audio.volume ?? 0)
|
||||
radius: parent.radius
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pixelSize: 18
|
||||
text: Audio.sourceMuted ? "mic_off" : "mic"
|
||||
color: ( Audio.sourceMuted ?? false ) ? DynamicColors.palette.m3error : root.textColor
|
||||
}
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
implicitHeight: 4
|
||||
radius: 20
|
||||
color: "#50ffffff"
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.textColor
|
||||
font.pixelSize: 18
|
||||
text: Audio.sourceMuted ? "mic_off" : "mic"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: sourceVolumeBar
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: "#50ffffff"
|
||||
implicitHeight: 4
|
||||
radius: 20
|
||||
|
||||
implicitWidth: parent.width * ( Audio.sourceVolume ?? 0 )
|
||||
radius: parent.radius
|
||||
color: ( Audio.sourceMuted ?? false ) ? DynamicColors.palette.m3error : root.barColor
|
||||
Rectangle {
|
||||
id: sourceVolumeBar
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.barColor
|
||||
implicitWidth: parent.width * (Audio.sourceVolume ?? 0)
|
||||
radius: parent.radius
|
||||
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
}
|
||||
}
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user