1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -05:00

Add Media click-through on Dashboard

This commit is contained in:
purian23
2025-09-15 19:52:27 -04:00
parent fff4b8c817
commit 38f61ceae2
3 changed files with 22 additions and 0 deletions

View File

@@ -179,6 +179,11 @@ DankPopout {
tabBar.tabClicked(2)
}
}
onSwitchToMediaTab: {
tabBar.currentIndex = 1
tabBar.tabClicked(1)
}
}
MediaPlayerTab {

View File

@@ -9,6 +9,8 @@ import qs.Widgets
Card {
id: root
signal clicked()
property MprisPlayer activePlayer: MprisController.activePlayer
property real currentPosition: activePlayer?.positionSupported ? activePlayer.position : 0
property real displayPosition: currentPosition
@@ -192,4 +194,16 @@ Card {
}
}
}
MouseArea {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 123
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
visible: activePlayer
}
}

View File

@@ -13,6 +13,7 @@ Item {
implicitHeight: 410
signal switchToWeatherTab()
signal switchToMediaTab()
Item {
anchors.fill: parent
@@ -65,6 +66,8 @@ Item {
y: 100 + Theme.spacingM
width: parent.width * 0.2
height: 300
onClicked: root.switchToMediaTab()
}
}
}