summaryrefslogtreecommitdiffstats
path: root/basicsuite/mediaplayer/main.qml
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2018-04-17 15:02:13 +0300
committerJuho Annunen <juho.annunen@qt.io>2018-05-04 10:02:42 +0000
commit04e4798de567c64a08e962f541b5dd35d60fedd3 (patch)
treebbcfbc6f8c6bbc5be45c72b2e869c84fa588e478 /basicsuite/mediaplayer/main.qml
parent2e8942fe7661ba75da5c45d214d2efd6212910c8 (diff)
Update Mediaplayer demo to new UI theme
Task-number: QTBUG-62791 Change-Id: Id7cb520669fc696cec65da591414b045fe45754a Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'basicsuite/mediaplayer/main.qml')
-rw-r--r--[-rwxr-xr-x]basicsuite/mediaplayer/main.qml44
1 files changed, 10 insertions, 34 deletions
diff --git a/basicsuite/mediaplayer/main.qml b/basicsuite/mediaplayer/main.qml
index d1667bf..5f3ff42 100755..100644
--- a/basicsuite/mediaplayer/main.qml
+++ b/basicsuite/mediaplayer/main.qml
@@ -50,11 +50,14 @@
import QtQuick 2.0
import QtMultimedia 5.0
+import QtDeviceUtilities.QtButtonImageProvider 1.0
FocusScope {
id: applicationWindow
focus: true
+ property real buttonHeight: height * 0.05
+
MouseArea {
id: mouseActivityMonitor
anchors.fill: parent
@@ -114,15 +117,11 @@ FocusScope {
onOpenFX: {
applicationWindow.openFX();
}
-
- onToggleFullScreen: {
-// viewer.toggleFullscreen();
- }
}
ParameterPanel {
id: parameterPanel
- opacity: controlBar.opacity
+ opacity: controlBar.opacity * 0.9
visible: effectSelectionPanel.visible && model.count !== 0
height: 116
width: 500
@@ -137,11 +136,10 @@ FocusScope {
EffectSelectionPanel {
id: effectSelectionPanel
visible: false
- opacity: controlBar.opacity
+ opacity: controlBar.opacity * 0.9
anchors {
bottom: controlBar.top
right: controlBar.right
- // rightMargin: 15
bottomMargin: 15
}
width: 250
@@ -165,33 +163,17 @@ FocusScope {
}
}
- Rectangle {
+ ImageButton{
+ id: infoButton
anchors.right: parent.right
anchors.top: parent.top
anchors.rightMargin: 32
anchors.topMargin: 32
width: 40
height: 40
- radius: width / 2
- color: infoMouser.pressed ? "#BB999999" : "#88444444"
- antialiasing: true
- visible: content.videoPlayer.mediaPlayer.status !== MediaPlayer.NoMedia && controlBar.state === "VISIBLE"
-
- Text {
- anchors.centerIn: parent
- text: "i"
- font.italic: true
- font.bold: true
- color: "white"
- font.pixelSize: 28
- }
-
- MouseArea {
- id: infoMouser
- anchors.fill: parent
- anchors.margins: -10
- onClicked: metadataView.opacity = 1
- }
+ imageSource: "images/info_icon.svg"
+ onClicked: metadataView.opacity = 1
+ visible: content.videoPlayer.mediaPlayer.status !== MediaPlayer.NoMedia && content.videoPlayer.mediaPlayer.status !== MediaPlayer.InvalidMedia
}
MetadataView {
@@ -223,7 +205,6 @@ FocusScope {
openFX();
return;
} else if (event.key === Qt.Key_F && event.modifiers & Qt.ControlModifier) {
-// viewer.toggleFullscreen();
return;
} else if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) {
content.videoPlayer.mediaPlayer.volume = Math.min(1, content.videoPlayer.mediaPlayer.volume + 0.1);
@@ -241,7 +222,6 @@ FocusScope {
}
return;
} else if (applicationWindow.isFullScreen && event.key === Qt.Key_Escape) {
-// viewer.toggleFullscreen();
return;
}
@@ -271,10 +251,6 @@ FocusScope {
}
function openVideo() {
- //videoFileBrowser.show()
- // var videoFile = viewer.openFileDialog();
- // if (videoFile != "")
- // content.openVideo(videoFile);
fileBrowser.show()
}