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:
@@ -179,6 +179,11 @@ DankPopout {
|
|||||||
tabBar.tabClicked(2)
|
tabBar.tabClicked(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSwitchToMediaTab: {
|
||||||
|
tabBar.currentIndex = 1
|
||||||
|
tabBar.tabClicked(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaPlayerTab {
|
MediaPlayerTab {
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import qs.Widgets
|
|||||||
Card {
|
Card {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
property MprisPlayer activePlayer: MprisController.activePlayer
|
property MprisPlayer activePlayer: MprisController.activePlayer
|
||||||
property real currentPosition: activePlayer?.positionSupported ? activePlayer.position : 0
|
property real currentPosition: activePlayer?.positionSupported ? activePlayer.position : 0
|
||||||
property real displayPosition: currentPosition
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ Item {
|
|||||||
implicitHeight: 410
|
implicitHeight: 410
|
||||||
|
|
||||||
signal switchToWeatherTab()
|
signal switchToWeatherTab()
|
||||||
|
signal switchToMediaTab()
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -65,6 +66,8 @@ Item {
|
|||||||
y: 100 + Theme.spacingM
|
y: 100 + Theme.spacingM
|
||||||
width: parent.width * 0.2
|
width: parent.width * 0.2
|
||||||
height: 300
|
height: 300
|
||||||
|
|
||||||
|
onClicked: root.switchToMediaTab()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user