brightess and volume control

This commit is contained in:
2026-03-26 13:15:54 -07:00
parent 80efc104ed
commit 5b8d82a934
20 changed files with 588 additions and 37 deletions

View File

@@ -20,7 +20,7 @@ Item {
Rectangle {
width: 400
height: 300
color: "#181818"
color: "#111"
radius: 10
Column {
anchors.centerIn: parent
@@ -47,7 +47,6 @@ Item {
anchors.rightMargin: anchors.leftMargin
clip: true
spacing: 4
interactive: background.index === 3
add: Transition {NumberAnimation {
property: "opacity"
@@ -69,7 +68,7 @@ Item {
header: Item {height: 4; width: 1}
model: Array.from(notifServer.trackedNotifications.values)
delegate: Widgets.Notification {
color: "#222"
color: "#181818"
}
}
}
@@ -98,25 +97,32 @@ Item {
}
}
Column {
anchors.centerIn: parent
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
margins: 6
}
opacity: Mpris.players.values.length
Behavior on opacity {NumberAnimation {duration: 150}}
Shape {
id: progressShape
anchors.horizontalCenter: parent.horizontalCenter
width: 180
height: 180
width: 160
height: width
property var strokeWidth: 6
preferredRendererType: Shape.CurveRenderer
ShapePath {
capStyle: ShapePath.RoundCap
strokeColor: "#444"
fillColor: "transparent"
strokeWidth: 4
strokeWidth: progressShape.strokeWidth
PathAngleArc {
moveToStart: true
radiusX: 90 - 6
radiusY: 90 - 6
centerX: 90
centerY: 90
radiusX: (progressShape.width-progressShape.strokeWidth)/2
radiusY: (progressShape.height-progressShape.strokeWidth)/2
centerX: progressShape.width/2
centerY: progressShape.height/2
startAngle: 90 + 20
sweepAngle: 360 - 40
}
@@ -125,13 +131,13 @@ Item {
capStyle: ShapePath.RoundCap
strokeColor: "white"
fillColor: "transparent"
strokeWidth: 4
strokeWidth: 6
PathAngleArc {
moveToStart: true
radiusX: 90 - 6
radiusY: 90 - 6
centerX: 90
centerY: 90
radiusX: (progressShape.width-progressShape.strokeWidth)/2
radiusY: (progressShape.height-progressShape.strokeWidth)/2
centerX: progressShape.width/2
centerY: progressShape.height/2
startAngle: 90 + 20
sweepAngle: (player.modelData?.position/player.modelData.length) * (360 - 40)
}
@@ -140,9 +146,12 @@ Item {
color: "transparent"
radius: height/2
anchors.fill: parent
anchors.margins: 12
anchors.margins: progressShape.strokeWidth*2
Image {
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
mipmap: true
smooth: true
source: player.modelData?.trackArtUrl ?? source
}
NumberAnimation on rotation {
@@ -159,15 +168,25 @@ Item {
}
Item {width: 1; height: 10}
Text {
anchors {
left: parent.left
right: parent.right
}
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
color: "white"
text: player.modelData?.trackTitle ?? ""
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 16
}
Text {
anchors {
left: parent.left
right: parent.right
}
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
color: "white"
text: player.modelData?.trackArtist ?? ""
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12
}
Item {width: 1; height: 8}