mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Fix media player when on right edge
This commit is contained in:
@@ -17,7 +17,7 @@ Item {
|
|||||||
property MprisPlayer activePlayer: MprisController.activePlayer
|
property MprisPlayer activePlayer: MprisController.activePlayer
|
||||||
property var allPlayers: MprisController.availablePlayers
|
property var allPlayers: MprisController.availablePlayers
|
||||||
|
|
||||||
|
readonly property bool isRightEdge: SettingsData.dankBarPosition === SettingsData.Position.Right
|
||||||
property var defaultSink: AudioService.sink
|
property var defaultSink: AudioService.sink
|
||||||
|
|
||||||
// Palette that stays stable across track switches until new colors are ready
|
// Palette that stays stable across track switches until new colors are ready
|
||||||
@@ -342,7 +342,7 @@ Item {
|
|||||||
id: audioDevicesDropdown
|
id: audioDevicesDropdown
|
||||||
width: 280
|
width: 280
|
||||||
height: audioDevicesButton.devicesExpanded ? Math.max(200, Math.min(280, audioDevicesDropdown.availableDevices.length * 50 + 100)) : 0
|
height: audioDevicesButton.devicesExpanded ? Math.max(200, Math.min(280, audioDevicesDropdown.availableDevices.length * 50 + 100)) : 0
|
||||||
x: root.width + Theme.spacingS
|
x: isRightEdge ? -width - Theme.spacingS : root.width + Theme.spacingS
|
||||||
y: audioDevicesButton.y - 50
|
y: audioDevicesButton.y - 50
|
||||||
visible: audioDevicesButton.devicesExpanded
|
visible: audioDevicesButton.devicesExpanded
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
@@ -504,7 +504,7 @@ Item {
|
|||||||
id: playerSelectorDropdown
|
id: playerSelectorDropdown
|
||||||
width: 240
|
width: 240
|
||||||
height: playerSelectorButton.playersExpanded ? Math.max(180, Math.min(240, (root.allPlayers?.length || 0) * 50 + 80)) : 0
|
height: playerSelectorButton.playersExpanded ? Math.max(180, Math.min(240, (root.allPlayers?.length || 0) * 50 + 80)) : 0
|
||||||
x: root.width + Theme.spacingS
|
x: isRightEdge ? -width - Theme.spacingS : root.width + Theme.spacingS
|
||||||
y: playerSelectorButton.y - 50
|
y: playerSelectorButton.y - 50
|
||||||
visible: playerSelectorButton.playersExpanded
|
visible: playerSelectorButton.playersExpanded
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
@@ -1045,7 +1045,7 @@ Item {
|
|||||||
width: 40
|
width: 40
|
||||||
height: 40
|
height: 40
|
||||||
radius: 20
|
radius: 20
|
||||||
x: parent.width - 40 - Theme.spacingM
|
x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM
|
||||||
y: 185
|
y: 185
|
||||||
color: playerSelectorArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
color: playerSelectorArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||||
@@ -1098,7 +1098,7 @@ Item {
|
|||||||
width: 40
|
width: 40
|
||||||
height: 40
|
height: 40
|
||||||
radius: 20
|
radius: 20
|
||||||
x: parent.width - 40 - Theme.spacingM
|
x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM
|
||||||
y: 130
|
y: 130
|
||||||
color: volumeButtonArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
color: volumeButtonArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||||
@@ -1153,8 +1153,8 @@ Item {
|
|||||||
width: 40
|
width: 40
|
||||||
height: 40
|
height: 40
|
||||||
radius: 20
|
radius: 20
|
||||||
x: parent.width - 40 - Theme.spacingM
|
x: isRightEdge ? Theme.spacingM : parent.width - 40 - Theme.spacingM
|
||||||
y: 240
|
y: 240
|
||||||
color: audioDevicesArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
color: audioDevicesArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2) : "transparent"
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
@@ -1206,7 +1206,7 @@ Item {
|
|||||||
id: volumeSliderPanel
|
id: volumeSliderPanel
|
||||||
width: 60
|
width: 60
|
||||||
height: 180
|
height: 180
|
||||||
x: root.width + Theme.spacingS
|
x: isRightEdge ? -width - Theme.spacingS : root.width + Theme.spacingS
|
||||||
y: volumeButton.y - 50
|
y: volumeButton.y - 50
|
||||||
visible: volumeButton.volumeExpanded
|
visible: volumeButton.volumeExpanded
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
|
|||||||
Reference in New Issue
Block a user