vlc | branch: master | Adrien Maglo <[email protected]> | Tue Jun 18 16:44:40 2019 +0200| [ca8fa708f9f59b9322d0d7e52f0dcbdc721b9c4c] | committer: Jean-Baptiste Kempf
QML: make the full player accessible from the mini player On clicking the playing item information Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca8fa708f9f59b9322d0d7e52f0dcbdc721b9c4c --- modules/gui/qt/qml/mediacenter/MCMainDisplay.qml | 17 ++--- modules/gui/qt/qml/mediacenter/MiniPlayer.qml | 83 +++++++++++++++++------- 2 files changed, 68 insertions(+), 32 deletions(-) diff --git a/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml b/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml index 3e74cf9a4d..e5ee8a6651 100644 --- a/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml +++ b/modules/gui/qt/qml/mediacenter/MCMainDisplay.qml @@ -145,14 +145,6 @@ Utils.NavigableFocusScope { id: stackViewZone anchors.fill: parent - Rectangle { - visible: parent.focus - anchors.fill: parent - color: "transparent" - border.width: VLCStyle.selectedBorder - border.color: VLCStyle.colors.accent - } - onActionUp: sourcesBanner.focus = true onActionDown: { if (miniPlayer.expanded) @@ -171,6 +163,15 @@ Utils.NavigableFocusScope { } } + Rectangle { + visible: stackViewZone.focus + anchors.fill: stackViewZone + z: 42 + color: "#22ff950d" + border.width: VLCStyle.selectedBorder + border.color: VLCStyle.colors.accent + } + Utils.StackViewExt { id: stackView anchors.fill: parent diff --git a/modules/gui/qt/qml/mediacenter/MiniPlayer.qml b/modules/gui/qt/qml/mediacenter/MiniPlayer.qml index f9c953be2e..66abfcac97 100644 --- a/modules/gui/qt/qml/mediacenter/MiniPlayer.qml +++ b/modules/gui/qt/qml/mediacenter/MiniPlayer.qml @@ -59,36 +59,71 @@ Utils.NavigableFocusScope { RowLayout { anchors.fill: parent - Image { - id: cover - source: (mainPlaylistController.currentItem.artwork && mainPlaylistController.currentItem.artwork.toString()) - ? mainPlaylistController.currentItem.artwork - : VLCStyle.noArtAlbum - fillMode: Image.PreserveAspectFit - + Item { + id: playingItemInfo Layout.fillHeight: true - Layout.maximumWidth: height - } - - Column { - Layout.alignment: Qt.AlignVCenter - Layout.fillWidth: true + width: childrenRect.width + + Rectangle { + anchors.fill: parent + visible: parent.activeFocus + color: VLCStyle.colors.accent + border.width: 0 + border.color: VLCStyle.colors.accent + } - leftPadding: VLCStyle.margin_normal + MouseArea { + anchors.fill: parent + onClicked: history.push(["player"], History.Go) + } - Text { - id: titleLabel - text: mainPlaylistController.currentItem.title - font.pixelSize: VLCStyle.fontSize_large - color: VLCStyle.colors.text + Keys.onReleased: { + if (!event.accepted && (event.key === Qt.Key_Return || event.key === Qt.Key_Space)) + history.push(["player"], History.Go) } - Text { - id: artistLabel - text: mainPlaylistController.currentItem.artist - font.pixelSize: VLCStyle.fontSize_normal - color: VLCStyle.colors.lightText + Row { + anchors.top: parent.top + anchors.bottom: parent.bottom + + rightPadding: VLCStyle.margin_normal + + Image { + id: cover + source: (mainPlaylistController.currentItem.artwork && mainPlaylistController.currentItem.artwork.toString()) + ? mainPlaylistController.currentItem.artwork + : VLCStyle.noArtAlbum + fillMode: Image.PreserveAspectFit + + anchors.top: parent.top + anchors.bottom: parent.bottom + } + + Column { + anchors.verticalCenter: parent.verticalCenter + leftPadding: VLCStyle.margin_normal + + Text { + id: titleLabel + text: mainPlaylistController.currentItem.title + font.pixelSize: VLCStyle.fontSize_large + color: VLCStyle.colors.text + } + + Text { + id: artistLabel + text: mainPlaylistController.currentItem.artist + font.pixelSize: VLCStyle.fontSize_normal + color: VLCStyle.colors.lightText + } + } } + + KeyNavigation.right: randomBtn + } + + Item { + Layout.fillWidth: true } Row { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
