[vlc-devel] [PATCH 16/21] qml: add text above the seekbar in the fullplayer

Pierre Lamot pierre at videolabs.io
Wed Aug 7 15:52:22 CEST 2019


---
 modules/gui/qt/qml/player/ControlBar.qml | 32 +++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/qml/player/ControlBar.qml b/modules/gui/qt/qml/player/ControlBar.qml
index dd6eea3f75..38defce274 100644
--- a/modules/gui/qt/qml/player/ControlBar.qml
+++ b/modules/gui/qt/qml/player/ControlBar.qml
@@ -43,8 +43,38 @@ Utils.NavigableFocusScope {
 
     ColumnLayout {
         anchors.fill: parent
-        spacing: 0
+        spacing: VLCStyle.margin_xsmall
 
+
+        RowLayout {
+            Text {
+                text: player.time.toString()
+                color: VLCStyle.colors.playerFg
+                font.pixelSize: VLCStyle.fontSize_normal
+                font.bold: true
+                Layout.alignment: Qt.AlignLeft
+            }
+
+            Item {
+                Layout.fillWidth: true
+            }
+
+
+            Text {
+                text: (rootWindow.showRemainingTime && player.remainingTime.valid())
+                    ? "-" + player.remainingTime.toString()
+                    : player.length.toString()
+                color: VLCStyle.colors.playerFg
+                font.pixelSize: VLCStyle.fontSize_normal
+                font.bold: true
+                Layout.alignment: Qt.AlignRight
+                MouseArea {
+                    anchors.fill: parent
+                    onClicked: rootWindow.showRemainingTime = !rootWindow.showRemainingTime
+                }
+            }
+
+        }
         SliderBar {
             id: trackPositionSlider
             Layout.alignment: Qt.AlignLeft | Qt.AlignTop
-- 
2.17.1



More information about the vlc-devel mailing list