From 606fe6ebf81d316a112561c620f07c1fba4b3a99 Mon Sep 17 00:00:00 2001 From: kelteseth Date: Sat, 18 Aug 2018 18:05:06 +0200 Subject: [PATCH] Cleanup create --- ScreenPlay/qml/Create/CreateUpload.qml | 124 +++++++++---------- ScreenPlay/qml/Create/CreateWallpaper.qml | 2 +- ScreenPlay/qml/Create/CreateWidgetButton.qml | 14 --- 3 files changed, 60 insertions(+), 80 deletions(-) diff --git a/ScreenPlay/qml/Create/CreateUpload.qml b/ScreenPlay/qml/Create/CreateUpload.qml index 54f431d8..4cc06ee8 100644 --- a/ScreenPlay/qml/Create/CreateUpload.qml +++ b/ScreenPlay/qml/Create/CreateUpload.qml @@ -1,11 +1,10 @@ import QtQuick 2.9 -import QtAV 1.7 import QtGraphicalEffects 1.0 import QtQuick.Controls 2.3 import Qt.labs.platform 1.0 import QtQuick.Controls.Material 2.2 import QtQuick.Controls.Styles 1.4 - +import QtQuick.Layouts 1.3 import RemoteWorkshopCreationStatus 1.0 Item { @@ -31,23 +30,21 @@ Item { txtTitle.text = jsonProjectFile.title txtDescription.text = jsonProjectFile.description - var newStr = projectFile.substring(0, projectFile.length-12); + var newStr = projectFile.substring(0, projectFile.length - 12) - player.source = utility.fixWindowsPath(newStr + jsonProjectFile.file) - print(player.source) - player.play() + imgPreview.source = Qt.resolvedUrl(newStr + jsonProjectFile.preview) } Connections { target: steamWorkshop ignoreUnknownSignals: true onWorkshopItemCreated: { - print(userNeedsToAcceptWorkshopLegalAgreement, publishedFileId + "" + projectFile) + print(userNeedsToAcceptWorkshopLegalAgreement, + publishedFileId + "" + projectFile) steamWorkshop.submitWorkshopItem(txtTitle.text.toString(), txtDescription.text.toString(), "english", 0, projectFile, - videoFile, - publishedFileId) + videoFile, publishedFileId) } onRemoteWorkshopCreationStatusChanged: { switch (status) { @@ -146,44 +143,26 @@ Item { horizontalCenter: parent.horizontalCenter } - VideoOutput2 { - id: videoOut - z: 13 + Image { + id: imgPreview anchors.fill: parent - source: player - fillMode: VideoOutput.Stretch + } - Image { - id: imgPreview - anchors.fill: parent - opacity: 0 - } - - Rectangle { - id: rectProgressBar - height: 5 - color: "orange" - anchors { - right: parent.right - rightMargin: videoOutWrapper.width - left: parent.left - leftMargin: 0 - bottom: parent.bottom - bottomMargin: 0 - } + Rectangle { + id: rectProgressBar + height: 5 + color: "orange" + anchors { + right: parent.right + rightMargin: videoOutWrapper.width + left: parent.left + leftMargin: 0 + bottom: parent.bottom + bottomMargin: 0 } } } - MediaPlayer { - id: player - videoCodecPriority: ["CUDA", "D3D11", "DXVA", "VAAPI", "FFmpeg"] - autoPlay: false - onPlaying: print("playing") - loops: MediaPlayer.Infinite - volume: 0 - } - RectangularGlow { id: effect2 anchors { @@ -216,7 +195,7 @@ Item { horizontalCenter: parent.horizontalCenter } - Column { + ColumnLayout { anchors { top: parent.top @@ -232,7 +211,7 @@ Item { TextField { id: txtTitle height: 60 - width: parent.width + Layout.preferredWidth: parent.width selectByMouse: true text: qsTr("") placeholderText: "Title" @@ -240,7 +219,7 @@ Item { TextField { id: txtDescription height: 60 - width: parent.width + Layout.preferredWidth: parent.width selectByMouse: true text: qsTr("") placeholderText: "Description" @@ -249,18 +228,42 @@ Item { TextField { id: txtYoutube height: 60 - width: parent.width + Layout.preferredWidth: parent.width selectByMouse: true text: qsTr("") placeholderText: "Youtube Preview URL" } - TextField { - id: txtTags - height: 60 - width: parent.width - selectByMouse: true - text: qsTr("") - placeholderText: "Tags - Seperation between tags via , " + Row { + height: 50 + Layout.alignment: Qt.AlignHCenter + Item { + width: 100 + height: 50 + CheckBox { + text: qsTr("Videos") + } + } + Item { + width: 100 + height: 50 + CheckBox { + text: qsTr("Scenes") + } + } + Item { + width: 100 + height: 50 + CheckBox { + text: qsTr("Widgets") + } + } + Item { + width: 100 + height: 50 + CheckBox { + text: qsTr("AppDrawer") + } + } } } @@ -274,7 +277,7 @@ Item { Material.background: Material.Orange Material.foreground: "white" icon.source: "qrc:/assets/icons/icon_upload.svg" - icon.color:"white" + icon.color: "white" icon.width: 16 icon.height: 16 onClicked: { @@ -367,10 +370,7 @@ Item { target: createUpload opacity: 1 } - PropertyChanges { - target: videoOut - opacity: 1 - } + PropertyChanges { target: effect opacity: .4 @@ -398,10 +398,7 @@ Item { target: createUpload opacity: 1 } - PropertyChanges { - target: videoOut - opacity: 1 - } + PropertyChanges { target: effect opacity: 0 @@ -429,10 +426,7 @@ Item { target: createUpload opacity: 1 } - PropertyChanges { - target: videoOut - opacity: 0 - } + PropertyChanges { target: effect opacity: 0 diff --git a/ScreenPlay/qml/Create/CreateWallpaper.qml b/ScreenPlay/qml/Create/CreateWallpaper.qml index 38db1ab6..e61f7ec8 100644 --- a/ScreenPlay/qml/Create/CreateWallpaper.qml +++ b/ScreenPlay/qml/Create/CreateWallpaper.qml @@ -52,7 +52,7 @@ Item { Image { id: imgUpload - source: "qrc:/assets/icons/icon_upload.svg" + source: "qrc:/assets/icons/icon_movie.svg" height: 120 width: 120 anchors { diff --git a/ScreenPlay/qml/Create/CreateWidgetButton.qml b/ScreenPlay/qml/Create/CreateWidgetButton.qml index a26ada99..f5b1bb91 100644 --- a/ScreenPlay/qml/Create/CreateWidgetButton.qml +++ b/ScreenPlay/qml/Create/CreateWidgetButton.qml @@ -14,21 +14,7 @@ Item { property bool buttonActive: true property string imgSource: "qrc:/assets/icons/icon_library_music.svg" - RectangularGlow { - id: effectBtnEmpty - anchors { - top: btnEmpty.top - } - height: btnEmpty.height - width: btnEmpty.width - cached: true - glowRadius: 3 - spread: 0.2 - color: "black" - opacity: 0.2 - cornerRadius: 15 - } Rectangle { width: parent.width