- ToolBar {
- id: toolBar
- opacity: 0.8
- anchors.bottom: parent.bottom
- tools: ToolBarLayout {
- id: layout
-
- ToolIcon { iconId: "icon-m-toolbar-mediacontrol-stop-white"; onClicked: { video.stop(); } }
-
- Slider {
- id: slider
- height: toolBar.height
-
- platformStyle: SliderStyle {
- // HACK
- handleBackground: " "
- handleBackgroundPressed: " "
- }
-
- minimumValue: 0
- maximumValue: video.duration
- value: video.position
- orientation: Qt.Horizontal
-
- onPressedChanged: {
- if (!slider.pressed) {
- video.position = slider.value;
- }
- }
- }
-
- ToolIcon {
- id: control
- iconId: !video.paused ? "icon-m-toolbar-mediacontrol-pause-white" : "icon-m-toolbar-mediacontrol-play-white"
- onClicked: {
- if (!video.paused) {
- video.pause();
- }
- else {
- video.play();
- }
- }
- }
+ tools: CameraToolBarTools {
+ CameraToolIcon {
+ iconSource: cameraTheme.videoStopIconId
+ onClicked: video.stop()
+ }
+
+ CameraSlider {
+ id: slider
+ height: toolBar.height
+ anchors.verticalCenter: parent.verticalCenter
+
+ handleBackground: ""
+ handleBackgroundPressed: ""
+
+ minimumValue: 0
+ maximumValue: video.duration
+ value: video.position
+ orientation: Qt.Horizontal
+
+ onPressedChanged: {
+ if (!slider.pressed) {
+ video.position = slider.value
+ }
+
+ hideTimer.restart()
+ }
+ }
+
+ CameraToolIcon {
+ id: control
+ iconSource: video.state != VideoPlayer.StatePaused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
+ onClicked: {
+ video.toggle()
+ hideTimer.restart()