diff --git a/src/qml/presenter/Presentation.qml b/src/qml/presenter/Presentation.qml index 58caf38..2093c56 100644 --- a/src/qml/presenter/Presentation.qml +++ b/src/qml/presenter/Presentation.qml @@ -104,6 +104,42 @@ Item { } } + Item { + Layout.fillWidth: true + } + + RowLayout { + spacing: 2 + Layout.preferredWidth: previewSlide.width - 50 + /* Layout.columnSpan: 3 */ + Kirigami.Icon { + source: previewSlide.mpvIsPlaying ? "media-pause" : "media-play" + Layout.preferredWidth: 25 + Layout.preferredHeight: 25 + visible: itemType === "video"; + MouseArea { + anchors.fill: parent + onPressed: print("pressed play/plause"); + cursorShape: Qt.PointingHandCursor + } + } + Controls.Slider { + id: videoSlider + visible: itemType === "video"; + Layout.fillWidth: true + Layout.preferredHeight: 25 + from: 0 + to: previewSlide.mpvDuration + value: previewSlide.mpvPosition + live: true + onMoved: print("moved slider"); + } + } + + Item { + Layout.fillWidth: true + } + Item { /* Layout.preferredHeight: 200 */ Layout.fillHeight: true diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index 834cd58..c37dbb4 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -29,6 +29,7 @@ Item { property int mpvPosition: mpv.position property int mpvDuration: mpv.duration property var mpvLoop: mpv.getProperty("loop") + property bool mpvIsPlaying: mpv.isPlaying // These properties help to determine the state of the slide property string itemType