minor fixes and icons
This commit is contained in:
parent
2f6f940b76
commit
cf4696fe04
10 changed files with 82 additions and 11 deletions
|
|
@ -4,6 +4,7 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import qs
|
||||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
id: root
|
||||
|
|
@ -16,6 +17,7 @@ WrapperRectangle {
|
|||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
color: Colors.base01
|
||||
radius: Config.rounding
|
||||
function findSpotify() {
|
||||
for (let i = 0; i < Mpris.players.values.length; i++) {
|
||||
let current = Mpris.players.values[i];
|
||||
|
|
@ -25,7 +27,22 @@ WrapperRectangle {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
StyledText {
|
||||
text: root.spotify?.trackTitle + " - " + root.spotify?.trackArtists
|
||||
child: WrapperMouseArea {
|
||||
id: clickHandler
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: mouse => {
|
||||
if (mouse.button == Qt.RightButton) {
|
||||
root.spotify.togglePlaying();
|
||||
}
|
||||
}
|
||||
child: RowLayout {
|
||||
MaterialIcon {
|
||||
text: "music_note_2"
|
||||
}
|
||||
StyledText {
|
||||
text: root.spotify?.trackTitle + " - " + root.spotify?.trackArtists
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue