Improve hover behaviour, make font configurable, adjust overview
This commit is contained in:
+8
-7
@@ -4,13 +4,13 @@ import Quickshell.Widgets
|
||||
import Quickshell.Services.Mpris
|
||||
|
||||
Item {
|
||||
id: root
|
||||
id: time
|
||||
property var player: Mpris.players.values[0]
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: children[1].width + 24
|
||||
width: children[1].width + 18
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
@@ -20,20 +20,20 @@ Item {
|
||||
Behavior on color {ColorAnimation {duration: 150}}
|
||||
}
|
||||
Row {
|
||||
spacing: 12
|
||||
spacing: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: 12
|
||||
x: 8
|
||||
ClippingRectangle {
|
||||
visible: !!root.player
|
||||
visible: !!time.player
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 24
|
||||
height: width
|
||||
radius: 6
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: root.player?.trackArtUrl ?? source
|
||||
source: time.player?.trackArtUrl ?? source
|
||||
}
|
||||
opacity: root.player?.isPlaying ? 1 : 0.5
|
||||
opacity: time.player?.isPlaying ? 1 : 0.5
|
||||
Behavior on opacity {NumberAnimation {duration: 150}}
|
||||
}
|
||||
Text {
|
||||
@@ -41,6 +41,7 @@ Item {
|
||||
property var clock: SystemClock {}
|
||||
color: "white"
|
||||
text: Qt.formatDateTime(clock.date, "ddd MMM dd · hh:mm")
|
||||
font.family: root.font
|
||||
}
|
||||
}
|
||||
HoverHandler {id: hover}
|
||||
|
||||
Reference in New Issue
Block a user