1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Merge branch 'master' into qt6-support

# Conflicts:
#	.gitlab-ci.yml
#	CMakeLists.txt
#	ScreenPlay/CMakeLists.txt
#	ScreenPlay/qml/Workshop/Workshop.qml
#	ScreenPlay/qml/Workshop/upload/UploadProjectItem.qml
#	ScreenPlay/translations/ScreenPlay_.ts
#	ScreenPlay/translations/ScreenPlay_de.ts
#	ScreenPlay/translations/ScreenPlay_es.ts
#	ScreenPlay/translations/ScreenPlay_fr.ts
#	ScreenPlay/translations/ScreenPlay_ko.ts
#	ScreenPlay/translations/ScreenPlay_pt_br.ts
#	ScreenPlay/translations/ScreenPlay_ru.ts
#	ScreenPlay/translations/ScreenPlay_vi.qm
#	ScreenPlay/translations/ScreenPlay_vi.ts
#	ScreenPlay/translations/ScreenPlay_zh_cn.ts
This commit is contained in:
Elias Steurer 2021-09-26 17:56:40 +02:00
commit 6b653bdfdc
77 changed files with 19257 additions and 19299 deletions

View File

@ -16,22 +16,6 @@ check:
- python clang_format.py
- python cmake_format.py
build:windows_debug:
stage: build
tags:
- vs2019
- windows10
needs:
- check
script:
- cd Tools
- python setup.py
- python build.py -t debug
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-windows-debug/bin/
build:windows_release:
stage: build
tags:
@ -42,27 +26,28 @@ build:windows_release:
script:
- cd Tools
- python setup.py
- python build.py -t release
- python build.py -t release -steam=False
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-windows-release/bin/
build:osx_debug:
build:windows_release_steam:
stage: build
allow_failure: true
tags:
- osx
- vs2019
- windows10
needs:
- check
script:
- cd Tools
- python3 setup.py
- python3 build.py -t debug
- python setup.py
- python build.py -t release -steam=True
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-osx-debug/bin/
- build-x64-windows-release/bin/
build:osx_release:
stage: build
@ -74,38 +59,27 @@ build:osx_release:
script:
- cd Tools
- python3 setup.py
- python3 build.py -t release
- python3 build.py -t release -steam=False
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-osx-release/bin/
build:linux_debug:
build:osx_release_steam:
stage: build
allow_failure: true
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
- osx
needs:
- check
script:
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install aqtinstall
- mkdir Qt
- aqt install --outputdir Qt/ 6.2.0 linux desktop
- cd Tools
- wget -q https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.2/CQtDeployer_1.5.2_OfflineInstaller_Linux64.run
- python3 setup.py
- python3 build.py -t debug
- python3 build.py -t release -steam=True
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-linux-debug/bin/
- build-x64-osx-release/bin/
build:linux_release:
stage: build
@ -127,29 +101,12 @@ build:linux_release:
- cd Tools
- wget -q https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.2/CQtDeployer_1.5.2_OfflineInstaller_Linux64.run
- python3 setup.py
- python3 build.py -t release
- python3 build.py -t release -steam=False
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-linux-release/bin/
test:windows_debug:
stage: test
tags:
- windows10
- vs2019
dependencies:
- build:windows_debug
needs:
- build:windows_debug
script:
- ./build-x64-windows-debug/bin/ScreenPlay.exe --no-run=false --exit=true --reporters=junit --out=test-report-junit.xml
artifacts:
expire_in: "4 weeks"
when: always
reports:
junit: test-report-junit.xml
test:windows_release:
stage: test
tags:

View File

@ -7,7 +7,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
option(SCREENPLAY_STEAM_DEPLOY OFF "Steam build settings. Disables steam_app.txt copy step, that is only needed for development.")
option(SCREENPLAY_STEAM ON "For FOSS distribution so we do not bundle proprietary code.")
option(TESTS_ENABLED OFF)
@ -59,6 +58,7 @@ execute_process(
add_compile_definitions(COMPILE_INFO="${BUILD_DATE} + ${GIT_COMMIT_HASH}")
add_compile_definitions(SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
add_compile_definitions(SCREENPLAY_STEAM="${SCREENPLAY_STEAM}")
if(UNIX AND NOT APPLE)
# Fixes QWebEngine linker errors on Ubuntu 20.04
@ -85,11 +85,10 @@ endif()
message(STATUS "[DEFINE] SOURCE_DIR = ${SOURCE_DIR}")
message(STATUS "[DEFINE] BUILD_DATE = ${BUILD_DATE}")
message(STATUS "[DEFINE] GIT_COMMIT_HASH = ${GIT_COMMIT_HASH}")
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
message(STATUS "[OPTION] TESTS_ENABLED = ${TESTS_ENABLED}")
message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS "[PROJECT] VCPKG_PATH = ${VCPKG_PATH}")
message(STATUS "[PROJECT] VCPKG_ARCH = ${VCPKG_ARCH}")
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
message(STATUS "[OPTION] SCREENPLAY_STEAM_DEPLOY = ${SCREENPLAY_STEAM_DEPLOY}")
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
message(STATUS "[OPTION] TESTS_ENABLED = ${TESTS_ENABLED}")

View File

@ -1,44 +1,27 @@
<div>
<img width="100%" height="93" src=".gitlab/media/logo_gitlab_fullwidth.svg">
</div>
<div align="center">
<br>
ScreenPlay [![pipeline status](https://gitlab.com/kelteseth/ScreenPlay/badges/master/pipeline.svg)](https://gitlab.com/kelteseth/ScreenPlay/-/commits/master) <br>
Dev. Docs [![pipeline status](https://gitlab.com/kelteseth/ScreenPlayDeveloperDocs/badges/master/pipeline.svg)](https://gitlab.com/kelteseth/ScreenPlayDeveloperDocs/-/commits/master) <br><br>
<a href=""></a>
[中文总览](README_zh_CN.md)
<br><br>
<a href="https://twitter.com/kelteseth">![Twitter Follow](https://img.shields.io/twitter/follow/kelteseth?style=for-the-badge)</a>
<a href="https://www.reddit.com/r/ScreenPlayApp/">![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/screenplayapp?style=for-the-badge)</a>
<br><br>
User Chat (Discord)
<a href="https://discord.com/invite/JBMmZbgc?utm_source=Discord%20Widget&utm_medium=Connect">![Discord](https://img.shields.io/discord/516635043435773970?style=for-the-badge)</a>
ScreenPlay: [![pipeline status](https://gitlab.com/kelteseth/ScreenPlay/badges/master/pipeline.svg)](https://gitlab.com/kelteseth/ScreenPlay/-/commits/master) Docs: [![pipeline status](https://gitlab.com/kelteseth/ScreenPlayDeveloperDocs/badges/master/pipeline.svg)](https://gitlab.com/kelteseth/ScreenPlayDeveloperDocs/-/commits/master) [![Crowdin](https://badges.crowdin.net/screenplay/localized.svg)](https://crowdin.com/project/screenplay) <a href="https://twitter.com/kelteseth">![Twitter Follow](https://img.shields.io/twitter/follow/kelteseth?style=for-the-badge)</a> <a href="https://www.reddit.com/r/ScreenPlayApp/">![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/screenplayapp?style=for-the-badge)</a> <a href="https://discord.com/invite/4sY9d4f2DM">![Discord](https://img.shields.io/discord/516635043435773970?style=for-the-badge)</a>
<h3><a href="https://store.steampowered.com/app/672870/ScreenPlay/">✨Download ScreenPlay with via Steam™ with Workshop support✨</a> </h3>
<h3><a href="http://gitlab.com/kelteseth/ScreenPlay/-/jobs/artifacts/master/download?job=build:windows_release">✨💻 Download ScreenPlay Windows directly✨</a> </h3>
<h3><a href="http://gitlab.com/kelteseth/ScreenPlay/-/jobs/artifacts/master/download?job=build:osx_release">✨🍏 Download ScreenPlay macOS (unsigned) directly✨</a> </h3>
<br>
ScreenPlay is an open source cross platform app for displaying Video Wallpaper, Widgets and AppDrawer. It is written in modern C++20/Qt5/QML. Binaries with workshop support are available for Windows and soon Linux & MacOSX via <a href="https://store.steampowered.com/app/672870/ScreenPlay/">Steam</a>. Join our community: <a href="https://screen-play.app/">Homepage</a> - <a href="https://forum.screen-play.app/">Forum</a>
<br>
<h3><a href="https://store.steampowered.com/app/672870/ScreenPlay/">✨Download ScreenPlay✨</a> <br> <br> <a href="https://www.patreon.com/ScreenPlayApp">🚀Support ScreenPlay On Patreon🚀</a></h3>
Windows only, Linux and MacOS next.
<br>
<br>
<!-- This works only on gitlab -->
![](https://gitlab.com/kelteseth/ScreenPlay/-/raw/master/.gitlab/media/preview.webp)
<!-- This works only on github -->
![](/.gitlab/media/preview.webp)
<!-- This works only on gitlab --> ![](https://gitlab.com/kelteseth/ScreenPlay/-/raw/master/.gitlab/media/preview.webp) ![](/.gitlab/media/preview.webp) <!-- This works only on github -->
<a href="https://www.youtube.com/watch?v=q-J2fTWDxw8"><p>Watch the Steam Early Access Trailer (YouTube)</p></a>
[中文总览](README_zh_CN.md)
ScreenPlay is an Open Source cross-platform app for displaying Video Wallpaper & Widgets. It is written in modern C++20/Qt5/QML. <br> <a href="https://screen-play.app/">Homepage</a> - <a href="https://forum.screen-play.app/">Forum</a>- <a href="https://discord.com/invite/4sY9d4f2DM">Discord</a>
<h4><a href="https://www.patreon.com/ScreenPlayApp">🚀Support ScreenPlay On Patreon🚀</a> </h4>
</div>
# Important Issues
* [Implement KDE Support](https://gitlab.com/kelteseth/ScreenPlay/-/issues/111)
* [Implement MacOS Support](https://gitlab.com/kelteseth/ScreenPlay/-/issues/130)
# Content Creation
[Learn the basics of QML for Wallpapers and Widgets in 5 minutes](https://screen-play.app/blog/guide_learn_the_basics_of_qml/)
@ -67,7 +50,7 @@ Everyone can contribute with code, design, documentation or translation. Visit o
Here are some ways you can contribute:
* by using prerelease versions / master branch or the Steam nightly builds
* by [adding/fixing translation](https://kelteseth.gitlab.io/ScreenPlayDocs/contribute/translations/)
* by [adding/fixing translation](https://crowdin.com/project/screenplay)
* by [designing UI/UX](https://kelteseth.gitlab.io/ScreenPlayDocs/contribute/contribute/#design)
* by [creating example HTML/QML/Javascript content](https://kelteseth.gitlab.io/ScreenPlayDocs/)
* by [reporting bugs](https://gitlab.com/kelteseth/ScreenPlay/-/issues)
@ -103,22 +86,6 @@ Here are some ways you can contribute:
</div>
Because every operating system has its own version of desktop environment we need to adapt the ScreenPlayWindow for every platform
separately. The most feature complete for now is Windows 10. Windows 7 works but the wallpaper have the [wrong coordinates](https://gitlab.com/kelteseth/ScreenPlay/issues/34). MacOS has some basic wallpaper functionality but no maintainer. For Linux we sadly have no support for any desktop environments at the moment, except basic KDE support.
__If you want to help and add new desktop environments look at ScreenPlayWallpaper/src folder__
* [BaseWindow](https://gitlab.com/kelteseth/ScreenPlay/blob/dev/ScreenPlayWallpaper/src/basewindow.h) baseclass for:
* [LinuxWindow](https://gitlab.com/kelteseth/ScreenPlay/blob/dev/ScreenPlayWallpaper/src/linuxwindow.h)
* [WinWindow](https://gitlab.com/kelteseth/ScreenPlay/blob/dev/ScreenPlayWallpaper/src/winwindow.h)
* [MacWindow](https://gitlab.com/kelteseth/ScreenPlay/blob/dev/ScreenPlayWallpaper/src/macwindow.h)
<div align="center">
| Plattform | Windows 10 | Gnome | KDE | MacOS |
|------------------------ |------- |--------- |------- | ------- |
| __Wallpaper__ | ✔ |❌ Help Needed! | ❓ [Basic implementation](https://gitlab.com/kelteseth/ScreenPlay/-/tree/master/ScreenPlayWallpaper/kde/ScreenPlay) | ❓ [Basic implementation](https://gitlab.com/kelteseth/ScreenPlay/-/blob/master/ScreenPlayWallpaper/src/MacBridge.mm) |
</div>

View File

@ -55,15 +55,17 @@ list(
APPEND
L10N_LIST
# cmake-format: sortable
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_de.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_zh_cn.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_pt_br.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_en.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_es.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_fr.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_ko.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_ru.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_vi.ts)
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_tr_TR.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_nl_NL.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_de_DE.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_zh_CN.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_pt_BR.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_es_ES.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_fr_FR.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_ko_KR.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_ru_RU.ts
${CMAKE_CURRENT_SOURCE_DIR}/translations/ScreenPlay_vi_VN.ts)
include(QtUpdateTranslations)
qt_update_translations("${CMAKE_CURRENT_SOURCE_DIR}/qml" "${L10N_LIST}")
@ -109,8 +111,10 @@ target_link_libraries(
Qt6::WebEngineQuick
Qt6::WebEngineCore)
add_executable(tst_ScreenPlay tests/tst_main.cpp)
target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt6::Test)
if(${TESTS_ENABLED})
add_executable(tst_ScreenPlay tests/tst_main.cpp)
target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt6::Test)
endif()
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlayLib)
@ -119,8 +123,6 @@ qt_add_translation(qmFiles ${l10n})
qt_add_big_resources(fonts fonts.qrc)
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
if(WIN32)
# Icon
target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc)

View File

@ -115,13 +115,6 @@
<file>legal/lgpl-2.1.txt</file>
<file>profiles.json</file>
<file>qtquickcontrols2.conf</file>
<file>translations/ScreenPlay_de.qm</file>
<file>translations/ScreenPlay_en.qm</file>
<file>translations/ScreenPlay_es.qm</file>
<file>translations/ScreenPlay_fr.qm</file>
<file>translations/ScreenPlay_ko.qm</file>
<file>translations/ScreenPlay_ru.qm</file>
<file>translations/ScreenPlay_vi.qm</file>
<file>translations/ScreenPlay_zh_cn.qm</file>
<file>assets/images/Early_Access.png</file>
<file>translations/ScreenPlay_pt_br.qm</file>
@ -131,5 +124,27 @@
<file>assets/icons/steam_default_avatar.png</file>
<file>assets/macos/app.screenplay.plist</file>
<file>assets/icons/item_banner_new.svg</file>
<file>translations/ScreenPlay_de_DE.qm</file>
<file>translations/ScreenPlay_es_ES.qm</file>
<file>translations/ScreenPlay_fr_FR.qm</file>
<file>translations/ScreenPlay_ko_KR.qm</file>
<file>translations/ScreenPlay_pt_BR.qm</file>
<file>translations/ScreenPlay_ru_RU.qm</file>
<file>translations/ScreenPlay_vi_VN.qm</file>
<file>translations/ScreenPlay_zh_CN.qm</file>
<file>translations/ScreenPlay_.qm</file>
<file>translations/ScreenPlay_.ts</file>
<file>translations/ScreenPlay_de_DE.ts</file>
<file>translations/ScreenPlay_es_ES.ts</file>
<file>translations/ScreenPlay_fr_FR.ts</file>
<file>translations/ScreenPlay_ko_KR.ts</file>
<file>translations/ScreenPlay_pt_BR.ts</file>
<file>translations/ScreenPlay_ru_RU.ts</file>
<file>translations/ScreenPlay_vi_VN.ts</file>
<file>translations/ScreenPlay_zh_CN.ts</file>
<file>translations/ScreenPlay_tr_TR.qm</file>
<file>translations/ScreenPlay_tr_TR.ts</file>
<file>translations/ScreenPlay_nl_NL.qm</file>
<file>translations/ScreenPlay_nl_NL.ts</file>
</qresource>
</RCC>

View File

@ -92,5 +92,7 @@
<file>qml/Create/StartInfoLinkImage.qml</file>
<file>qml/Workshop/SteamProfile.qml</file>
<file>qml/Workshop/SteamWorkshop.qml</file>
<file>qml/Workshop/Forum.qml</file>
<file>qml/Workshop/SteamWorkshopStartPage.qml</file>
</qresource>
</RCC>

View File

@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Particles 2.0
import QtQuick.Particles
Rectangle {
id: element

View File

@ -14,7 +14,7 @@ Item {
font.pointSize: 18
color: Material.primaryTextColor
text: qsTr("Headline")
text: "Headline"
font.capitalization: Font.Capitalize
font.family: ScreenPlay.settings.font
}

View File

@ -40,7 +40,7 @@ ColumnLayout {
ListElement {
name: "Creative Commons - Attribution 4.0"
description: qsTr("You grant other to remix your work and change the license to their linking.")
description: qsTr("You grant other to remix your work and change the license to their liking.")
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-4.0-international-(cc-by-4)"
licenseFile: "License_CC_Attribution_4.0.txt"
}
@ -61,7 +61,7 @@ ColumnLayout {
ListElement {
name: "Open Source - Apache License 2.0"
description: qsTr("You grant other to remix your work and change the license to their linking.")
description: qsTr("You grant other to remix your work and change the license to their liking.")
tldrlegal: "https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)"
licenseFile: "License_Apache_2.0.txt"
}

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtQuick.Particles 2.0
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtQuick.Particles 2.0
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtQuick.Particles 2.0
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtQuick.Particles 2.0
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -1,7 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls
import QtQuick.Controls.Material
import ScreenPlay 1.0
import "../Common"

View File

@ -1,7 +1,6 @@
import QtQuick 2.0
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0

View File

@ -2,7 +2,6 @@ import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Controls
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import "../Common/Util.js" as JSUtil

View File

@ -78,6 +78,7 @@ Rectangle {
state: "inactive"
name: "Create"
text: qsTr("Create")
iconSource: "qrc:/assets/icons/icon_plus.svg"
onPageClicked: (name)=> {root.onPageChanged(name)}
objectName: "createTab"
@ -88,6 +89,7 @@ Rectangle {
state: "inactive"
name: "Workshop"
text: qsTr("Workshop")
iconSource: "qrc:/assets/icons/icon_steam.svg"
onPageClicked: (name)=> {root.onPageChanged(name)}
objectName: "workshopTab"
@ -98,6 +100,7 @@ Rectangle {
state: "active"
name: "Installed"
text: qsTr("Installed")
amount: ScreenPlay.installedListModel.count
iconSource: "qrc:/assets/icons/icon_installed.svg"
onPageClicked: (name)=> {root.onPageChanged(name)}
@ -109,6 +112,7 @@ Rectangle {
state: "inactive"
name: "Community"
text: qsTr("Community")
iconSource: "qrc:/assets/icons/icon_community.svg"
onPageClicked: (name)=> {root.onPageChanged(name)}
objectName: "communityTab"
@ -119,6 +123,7 @@ Rectangle {
state: "inactive"
name: "Settings"
text: qsTr("Settings")
iconSource: "qrc:/assets/icons/icon_settings.svg"
onPageClicked: (name)=> {root.onPageChanged(name)}
objectName: "settingsTab"

View File

@ -7,7 +7,8 @@ Item {
id: navigationItem
property string iconSource: "qrc:/assets/icons/icon_installed.svg"
property alias name: txt.text
property string name
property alias text: txt.text
property alias amount: txtAmount.text
property bool enabled: true

View File

@ -163,32 +163,38 @@ Item {
comboBox {
model: [{
"value": Settings.En,
"text": qsTr("English")
"value": Settings.En_US,
"text": "English"
}, {
"value": Settings.De,
"text": qsTr("German")
"value": Settings.De_DE,
"text": "German"
}, {
"value": Settings.Zh_CN,
"text": qsTr("Chinese - Simplified")
"text": "Chinese - Simplified"
}, {
"value": Settings.Ru,
"text": qsTr("Russian")
"value": Settings.Ru_RU,
"text": "Russian"
}, {
"value": Settings.Fr,
"text": qsTr("French")
"value": Settings.Fr_FR,
"text": "French"
}, {
"value": Settings.Es,
"text": qsTr("Spanish")
"value": Settings.Es_ES,
"text": "Spanish"
}, {
"value": Settings.Ko,
"text": qsTr("Korean")
"value": Settings.Ko_KR,
"text": "Korean"
}, {
"value": Settings.Vi,
"text": qsTr("Vietnamese")
"value": Settings.Vi_VN,
"text": "Vietnamese"
}, {
"value": Settings.Pt_BR,
"text": qsTr("Portuguese (Brazil)")
"text": "Portuguese (Brazil)"
}, {
"value": Settings.Tr_TR,
"text": "Turkish"
}, {
"value": Settings.Nl_NL,
"text": "Dutch"
}]
onActivated: {
ScreenPlay.settings.setLanguage(settingsLanguage.comboBox.currentValue);

View File

@ -7,22 +7,31 @@ Rectangle {
property string backgroundImage: ""
property int imageOffsetTop: 0
property int stackViewDepth: 0
onStackViewDepthChanged: {
if (stackViewDepth > 1) {
root.state = "backgroundBlur"
return true
}
root.state = "backgroundImage"
return false
}
color: "#161C1D"
onImageOffsetTopChanged: {
if ((imageOffsetTop * -1) >= 200) {
root.state = "backgroundColor";
root.state = "backgroundColor"
} else {
if (root.state !== "backgroundImage")
root.state = "backgroundImage";
root.state = "backgroundImage"
}
}
onBackgroundImageChanged: {
if (backgroundImage === "")
root.state = "";
root.state = ""
else
root.state = "backgroundImage";
root.state = "backgroundImage"
}
Image {
@ -68,11 +77,8 @@ Rectangle {
position: 1
color: "#161C1D"
}
}
}
}
FastBlur {
@ -111,7 +117,6 @@ Rectangle {
target: blur
opacity: 0
}
},
State {
name: "backgroundImage"
@ -129,8 +134,8 @@ Rectangle {
PropertyChanges {
target: blur
opacity: 0
radius: 16
}
},
State {
name: "backgroundColor"
@ -148,8 +153,27 @@ Rectangle {
PropertyChanges {
target: blur
opacity: 1
radius: 16
}
},
State {
name: "backgroundBlur"
PropertyChanges {
target: bgImage
opacity: 1
}
PropertyChanges {
target: bgColor
opacity: 0.85
}
PropertyChanges {
target: blur
opacity: 1
radius: 64
}
}
]
transitions: [
@ -164,7 +188,6 @@ Rectangle {
easing.type: Easing.InOutQuart
property: "opacity"
}
},
Transition {
from: "backgroundImage"
@ -177,7 +200,25 @@ Rectangle {
easing.type: Easing.InOutQuart
property: "opacity"
}
},
Transition {
from: "backgroundImage"
to: "backgroundBlur"
reversible: true
PropertyAnimation {
targets: [bgImage, bgColor, blur]
duration: 300
easing.type: Easing.InOutQuart
property: "opacity"
}
PropertyAnimation {
target: blur
duration: 300
easing.type: Easing.InOutQuart
property: "radius"
}
}
]
}

View File

@ -0,0 +1,65 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import QtWebEngine
import ScreenPlay 1.0
Item {
id: root
Rectangle {
id: navWrapper
color: Material.theme === Material.Light ? "white" : Material.background
height: 46
anchors {
top: parent.top
right: parent.right
left: parent.left
}
RowLayout {
anchors{
fill: parent
rightMargin: 20
leftMargin: 20
}
spacing: 20
Text {
id: name
text: qsTr("Download Wallpaper and Widgets from our forums manually. If you want to download Steam Workshop content you have to install ScreenPlay via Steam.")
Layout.fillHeight: true
Layout.fillWidth: true
verticalAlignment: Text.AlignVCenter
font.pointSize: 10
font.family: ScreenPlay.settings.font
color: Material.secondaryTextColor
}
Button {
text: qsTr("Install Steam Version")
onClicked: Qt.openUrlExternally("https://store.steampowered.com/app/672870/ScreenPlay/")
}
Button {
text: qsTr("Open In Browser")
onClicked: Qt.openUrlExternally("https://forum.screen-play.app/category/5/wallpaper")
}
}
}
WebEngineView {
id: webView
anchors {
top: navWrapper.bottom
right: parent.right
bottom: parent.bottom
left: parent.left
}
url:"https://forum.screen-play.app/category/5/wallpaper"
}
}

View File

@ -1,4 +1,4 @@
import QtQuick 2.0
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects

View File

@ -11,12 +11,11 @@ import "../Common" as Common
Item {
id: root
property ScreenPlayWorkshop workshop
property SteamWorkshop steam
property ScreenPlayWorkshop screenPlayWorkshop
property SteamWorkshop steamWorkshop
signal requestWorkshopMainPage
Component.onCompleted: steam.requestUserItems()
signal requestBack
Component.onCompleted: steamWorkshop.requestUserItems()
Flickable {
id: scrollView
@ -48,7 +47,7 @@ Item {
width: 70
height: 70
Component.onCompleted: {
steam.steamAccount.loadAvatar()
root.steamWorkshop.steamAccount.loadAvatar()
}
Connections {
@ -57,7 +56,7 @@ Item {
avatarPlaceholder.opacity = 0
}
target: steam.steamAccount
target: root.steamWorkshop.steamAccount
}
Image {
id: avatarPlaceholder
@ -67,7 +66,7 @@ Item {
}
Text {
text: steam.steamAccount.username
text: root.steamWorkshop.steamAccount.username
font.pointSize: 12
color: "white"
font.family: ScreenPlay.settings.font
@ -76,7 +75,7 @@ Item {
Button {
text: qsTr("Back")
onClicked: root.requestWorkshopMainPage()
onClicked: root.requestBack()
}
}
}
@ -90,7 +89,7 @@ Item {
cellHeight: 190
height: contentHeight
interactive: false
model: root.steam.workshopProfileListModel
model: root.steamWorkshop.workshopProfileListModel
boundsBehavior: Flickable.StopAtBounds
anchors {
@ -108,7 +107,7 @@ Item {
additionalPreviewUrl: m_additionalPreviewUrl
subscriptionCount: m_subscriptionCount
itemIndex: index
steamWorkshop: root.steam
steamWorkshop: root.steamWorkshop
// onClicked: {
// sidebar.setWorkshopItem(publishedFileID, imgUrl,
// additionalPreviewUrl,
@ -136,10 +135,10 @@ Item {
Layout.alignment: Qt.AlignVCenter
text: qsTr("Back")
enabled: root.steam.workshopProfileListModel.currentPage > 1
enabled: root.steamWorkshop.workshopProfileListModel.currentPage > 1
onClicked: {
root.steam.workshopProfileListModel.setCurrentPage(
root.steam.workshopProfileListModel.currentPage - 1)
root.steamWorkshop.workshopProfileListModel.setCurrentPage(
root.steamWorkshop.workshopProfileListModel.currentPage - 1)
}
}
@ -147,8 +146,8 @@ Item {
id: txtPage
Layout.alignment: Qt.AlignVCenter
text: root.steam.workshopProfileListModel.currentPage + "/"
+ root.steam.workshopProfileListModel.pages
text: root.steamWorkshop.workshopProfileListModel.currentPage
+ "/" + root.steamWorkshop.workshopProfileListModel.pages
font.family: ScreenPlay.settings.font
color: Material.primaryTextColor
}
@ -158,11 +157,11 @@ Item {
Layout.alignment: Qt.AlignVCenter
text: qsTr("Forward")
enabled: root.steam.workshopProfileListModel.currentPage
<= root.steam.workshopProfileListModel.pages - 1
enabled: root.steamWorkshop.workshopProfileListModel.currentPage
<= root.steamWorkshop.workshopProfileListModel.pages - 1
onClicked: {
root.steam.workshopProfileListModel.setCurrentPage(
root.steam.workshopProfileListModel.currentPage + 1)
root.steamWorkshop.workshopProfileListModel.setCurrentPage(
root.steamWorkshop.workshopProfileListModel.currentPage + 1)
}
}

View File

@ -6,508 +6,83 @@ import QtQuick.Layouts
import Workshop 1.0
import ScreenPlay 1.0
import "upload/"
import "../Common" as Common
Item {
id: root
property ScreenPlayWorkshop workshop
property SteamWorkshop steam
signal openSteamProfile
onVisibleChanged: {
if (!visible)
sidebar.close()
}
Component.onCompleted: {
if (root.steam.online) {
root.steam.searchWorkshop(SteamEnums.K_EUGCQuery_RankedByTrend)
} else {
popupOffline.open()
ScreenPlayWorkshop {
id: screenPlayWorkshop
Component.onCompleted: {
if (screenPlayWorkshop.init()) {
stackView.push("qrc:/qml/Workshop/SteamWorkshopStartPage.qml", {
"stackView": stackView,
"screenPlayWorkshop": screenPlayWorkshop,
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
"background": background
})
} else {
popupOffline.open()
}
}
}
MouseArea {
enabled: gridView.count === 0
z: enabled ? 10 : 0
cursorShape: enabled ? Qt.WaitCursor : Qt.ArrowCursor
acceptedButtons: Qt.NoButton
propagateComposedEvents: true
anchors.fill: parent
preventStealing: true
}
Connections {
function onWorkshopSearched() {
bannerTxt.text = root.steam.workshopListModel.getBannerText()
background.backgroundImage = root.steam.workshopListModel.getBannerUrl()
banner.bannerPublishedFileID = root.steam.workshopListModel.getBannerID()
bannerTxtUnderline.numberSubscriber
= root.steam.workshopListModel.getBannerAmountSubscriber()
}
target: root.steam
}
Background {
id: background
anchors.fill: parent
stackViewDepth: stackView.depth
}
UploadProject {
id: popupUploadProject
screenPlayWorkshop: workshop
PopupOffline {
id: popupOffline
workshop: screenPlayWorkshop
steam: screenPlayWorkshop.steamWorkshop
}
PopupSteamWorkshopAgreement {
id: popupSteamWorkshopAgreement
}
StackView {
id: stackView
property int duration: 300
Connections {
function onUserNeedsToAcceptWorkshopLegalAgreement() {
popupSteamWorkshopAgreement.open()
Connections {
target: stackView.currentItem
ignoreUnknownSignals: true
function onRequestBack() {
stackView.pop()
}
}
target: root.steam.uploadListModel
}
Flickable {
id: scrollView
anchors.fill: parent
contentWidth: parent.width
contentHeight: gridView.height + header.height + 150
onContentYChanged: {
// Calculate parallax scrolling
if (contentY >= 0)
background.imageOffsetTop = (contentY * -0.4)
else
background.imageOffsetTop = 0
}
Item {
id: header
height: 450
anchors {
top: parent.top
right: parent.right
left: parent.left
replaceEnter: Transition {
OpacityAnimator {
from: 0
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
}
Item {
id: banner
property var bannerPublishedFileID
height: header.height
anchors {
top: parent.top
right: parent.right
left: parent.left
}
Image {
id: bannerImg2
asynchronous: true
fillMode: Image.PreserveAspectCrop
anchors {
right: parent.right
left: parent.left
bottom: parent.bottom
}
}
ColumnLayout {
anchors {
top: parent.top
topMargin: 100
right: parent.right
left: parent.left
leftMargin: 100
}
Text {
id: bannerTxtUnderline
property int numberSubscriber: 0
text: numberSubscriber + " SUBSCRIBED TO:"
font.pointSize: 12
color: "white"
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
}
Text {
id: bannerTxt
text: qsTr("Loading")
font.pointSize: 42
color: "white"
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
width: 400
}
RowLayout {
spacing: 10
Button {
text: qsTr("Download now!")
Material.background: Material.accent
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_download.svg"
onClicked: {
text = qsTr("Downloading...")
root.steam.subscribeItem(
root.steam.workshopListModel.getBannerID(
))
}
}
Button {
text: qsTr("Details")
Material.background: Material.accent
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_info.svg"
visible: false
onClicked: {
sidebar.setWorkshopItem(publishedFileID,
imgUrl,
additionalPreviewUrl,
subscriptionCount)
}
}
}
MouseArea {
onClicked: Qt.openUrlExternally(
"steam://url/CommunityFilePage/"
+ banner.bannerPublishedFileID)
height: 30
width: bannerTxtOpenInSteam.paintedWidth
cursorShape: Qt.PointingHandCursor
Text {
id: bannerTxtOpenInSteam
opacity: 0.7
text: qsTr("Open In Steam")
font.pointSize: 10
color: "white"
font.underline: true
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
}
}
}
}
}
GridView {
id: gridView
maximumFlickVelocity: 7000
flickDeceleration: 5000
cellWidth: 330
cellHeight: 190
height: contentHeight
interactive: false
model: root.steam.workshopListModel
boundsBehavior: Flickable.StopAtBounds
anchors {
top: header.bottom
topMargin: 100
left: parent.left
right: parent.right
leftMargin: 45
}
header: Item {
property alias searchField: tiSearch
height: 80
width: gridView.width - gridView.anchors.leftMargin
Rectangle {
color: Material.backgroundColor
radius: 3
width: parent.width - 20
height: 70
anchors.centerIn: parent
SteamImage {
id: avatar
width: 70
height: 70
Component.onCompleted: {
steam.steamAccount.loadAvatar()
}
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
Connections {
function onAvatarChanged(_avatar) {
avatar.setImage(_avatar)
avatarPlaceholder.opacity = 0
}
target: steam.steamAccount
}
}
Image {
id: avatarPlaceholder
anchors.fill: avatar
source: "qrc:/assets/icons/steam_default_avatar.png"
}
Button {
id: btnSteamProfile
anchors {
verticalCenter: parent.verticalCenter
left: avatar.right
leftMargin: 20
}
text: qsTr("Profile")
onClicked: root.openSteamProfile()
}
Item {
id: searchWrapper
width: 400
height: 50
anchors {
verticalCenter: parent.verticalCenter
left: btnSteamProfile.right
leftMargin: 20
}
TextField {
id: tiSearch
placeholderText: qsTr("Search for Wallpaper and Widgets...")
onEditingFinished: root.steam.searchWorkshopByText(
tiSearch.text)
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
left: parent.left
leftMargin: 10
}
}
ToolButton {
id: tb
icon.source: "qrc:/assets/icons/icon_search.svg"
onClicked: root.steam.searchWorkshopByText(
tiSearch.text)
icon.width: 20
icon.height: 20
anchors {
right: parent.right
bottom: parent.bottom
bottomMargin: 10
}
}
}
RowLayout {
spacing: 20
anchors {
left: searchWrapper.right
leftMargin: 20
right: cbQuerySort.left
rightMargin: 20
verticalCenter: parent.verticalCenter
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
Button {
text: qsTr("Open Workshop in Steam")
font.capitalization: Font.Capitalize
font.family: ScreenPlay.settings.font
onClicked: Qt.openUrlExternally(
"steam://url/SteamWorkshopPage/672870")
icon.source: "qrc:/assets/icons/icon_steam.svg"
icon.width: 18
icon.height: 18
height: cbQuerySort.height
}
}
ComboBox {
id: cbQuerySort
width: 220
height: searchWrapper.height
textRole: "text"
valueRole: "value"
currentIndex: 2
Layout.preferredHeight: searchWrapper.height
font.family: ScreenPlay.settings.font
model: [{
"value": SteamEnums.k_EUGCQuery_RankedByVote,
"text": qsTr("Ranked By Vote")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByPublicationDate,
"text": qsTr("Publication Date")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTrend,
"text": qsTr("Ranked By Trend")
}, {
"value": SteamEnums.K_EUGCQuery_FavoritedByFriendsRankedByPublicationDate,
"text": qsTr("Favorited By Friends")
}, {
"value": SteamEnums.K_EUGCQuery_CreatedByFriendsRankedByPublicationDate,
"text": qsTr("Created By Friends")
}, {
"value": SteamEnums.K_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate,
"text": qsTr("Created By Followed Users")
}, {
"value": SteamEnums.K_EUGCQuery_NotYetRated,
"text": qsTr("Not Yet Rated")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTotalVotesAsc,
"text": qsTr("Total VotesAsc")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByVotesUp,
"text": qsTr("Votes Up")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTotalUniqueSubscriptions,
"text": qsTr("Total Unique Subscriptions")
}]
onActivated: {
root.steam.searchWorkshop(cbQuerySort.currentValue)
}
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 10
}
}
}
}
delegate: WorkshopItem {
imgUrl: m_workshopPreview
name: m_workshopTitle
publishedFileID: m_publishedFileID
additionalPreviewUrl: m_additionalPreviewUrl
subscriptionCount: m_subscriptionCount
itemIndex: index
steamWorkshop: root.steam
onClicked: {
sidebar.setWorkshopItem(publishedFileID, imgUrl,
additionalPreviewUrl,
subscriptionCount)
}
}
ScrollBar.vertical: ScrollBar {
id: workshopScrollBar
snapMode: ScrollBar.SnapOnRelease
}
footer: RowLayout {
height: 150
width: parent.width
spacing: 10
Item {
Layout.fillWidth: true
}
Button {
id: btnBack
Layout.alignment: Qt.AlignVCenter
text: qsTr("Back")
enabled: root.steam.workshopListModel.currentPage > 1
onClicked: {
root.steam.workshopListModel.setCurrentPage(
root.steam.workshopListModel.currentPage - 1)
root.steam.searchWorkshop(
SteamEnums.K_EUGCQuery_RankedByTrend)
}
}
Text {
id: txtPage
Layout.alignment: Qt.AlignVCenter
text: root.steam.workshopListModel.currentPage + "/"
+ root.steam.workshopListModel.pages
font.family: ScreenPlay.settings.font
color: Material.primaryTextColor
}
Button {
id: btnForward
Layout.alignment: Qt.AlignVCenter
text: qsTr("Forward")
enabled: root.steam.workshopListModel.currentPage
<= root.steam.workshopListModel.pages - 1
onClicked: {
root.steam.workshopListModel.setCurrentPage(
root.steam.workshopListModel.currentPage + 1)
root.steam.searchWorkshop(
SteamEnums.K_EUGCQuery_RankedByTrend)
}
}
Item {
Layout.fillWidth: true
}
}
}
Behavior on contentHeight {
PropertyAnimation {
duration: 400
property: "contentHeight"
ScaleAnimator {
from: 0.8
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
}
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
}
replaceExit: Transition {
OpacityAnimator {
from: 1
to: 0
duration: stackView.duration
easing.type: Easing.InOutQuart
}
Sidebar {
id: sidebar
topMargin: 60
steamWorkshop: root.steam
onTagClicked: {
gridView.headerItem.searchField.text = tag
sidebar.close()
ScaleAnimator {
from: 1
to: 0.8
duration: stackView.duration
easing.type: Easing.InOutQuart
}
}
}
}

View File

@ -0,0 +1,525 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import Workshop 1.0
import ScreenPlay 1.0
import "upload/"
import "../Common" as Common
Item {
id: root
property SteamWorkshop steamWorkshop
property ScreenPlayWorkshop screenPlayWorkshop
property StackView stackView
property Background background
Component.onCompleted: {
root.steamWorkshop.searchWorkshop(SteamEnums.K_EUGCQuery_RankedByTrend)
}
onVisibleChanged: {
if (!visible)
sidebar.close()
}
MouseArea {
enabled: gridView.count === 0
z: enabled ? 10 : 0
cursorShape: enabled ? Qt.WaitCursor : Qt.ArrowCursor
acceptedButtons: Qt.NoButton
propagateComposedEvents: true
anchors.fill: parent
preventStealing: true
}
Connections {
function onWorkshopSearched() {
bannerTxt.text = root.steamWorkshop.workshopListModel.getBannerText(
)
background.backgroundImage = root.steamWorkshop.workshopListModel.getBannerUrl()
banner.bannerPublishedFileID = root.steamWorkshop.workshopListModel.getBannerID()
bannerTxtUnderline.numberSubscriber
= root.steamWorkshop.workshopListModel.getBannerAmountSubscriber()
}
target: root.steamWorkshop
}
PopupSteamWorkshopAgreement {
id: popupSteamWorkshopAgreement
}
Connections {
function onUserNeedsToAcceptWorkshopLegalAgreement() {
popupSteamWorkshopAgreement.open()
}
target: root.steamWorkshop.uploadListModel
}
Flickable {
id: scrollView
anchors.fill: parent
contentWidth: parent.width
contentHeight: gridView.height + header.height + 150
onContentYChanged: {
// Calculate parallax scrolling
if (contentY >= 0)
background.imageOffsetTop = (contentY * -0.4)
else
background.imageOffsetTop = 0
}
Item {
id: header
height: 450
anchors {
top: parent.top
right: parent.right
left: parent.left
}
Item {
id: banner
property var bannerPublishedFileID
height: header.height
anchors {
top: parent.top
right: parent.right
left: parent.left
}
Image {
id: bannerImg2
asynchronous: true
fillMode: Image.PreserveAspectCrop
anchors {
right: parent.right
left: parent.left
bottom: parent.bottom
}
}
ColumnLayout {
anchors {
top: parent.top
topMargin: 100
right: parent.right
left: parent.left
leftMargin: 100
}
Text {
id: bannerTxtUnderline
property int numberSubscriber: 0
text: numberSubscriber + " SUBSCRIBED TO:"
font.pointSize: 12
color: "white"
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
}
Text {
id: bannerTxt
text: qsTr("Loading")
font.pointSize: 42
color: "white"
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
width: 400
}
RowLayout {
spacing: 10
Button {
text: qsTr("Download now!")
Material.background: Material.accent
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_download.svg"
onClicked: {
text = qsTr("Downloading...")
root.steamWorkshop.subscribeItem(
root.steamWorkshop.workshopListModel.getBannerID(
))
}
}
Button {
text: qsTr("Details")
Material.background: Material.accent
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_info.svg"
visible: false
onClicked: {
sidebar.setWorkshopItem(publishedFileID,
imgUrl,
additionalPreviewUrl,
subscriptionCount)
}
}
}
MouseArea {
onClicked: Qt.openUrlExternally(
"steam://url/CommunityFilePage/"
+ banner.bannerPublishedFileID)
height: 30
width: bannerTxtOpenInSteam.paintedWidth
cursorShape: Qt.PointingHandCursor
Text {
id: bannerTxtOpenInSteam
opacity: 0.7
text: qsTr("Open In Steam")
font.pointSize: 10
color: "white"
font.underline: true
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
}
}
}
}
}
GridView {
id: gridView
maximumFlickVelocity: 7000
flickDeceleration: 5000
cellWidth: 330
cellHeight: 190
height: contentHeight
interactive: false
model: root.steamWorkshop.workshopListModel
boundsBehavior: Flickable.StopAtBounds
anchors {
top: header.bottom
topMargin: 100
left: parent.left
right: parent.right
leftMargin: 45
}
header: Item {
property alias searchField: tiSearch
height: 80
width: gridView.width - gridView.anchors.leftMargin
Rectangle {
color: Material.backgroundColor
radius: 3
width: parent.width - 20
height: 70
anchors.centerIn: parent
SteamImage {
id: avatar
width: 70
height: 70
Component.onCompleted: {
steamWorkshop.steamAccount.loadAvatar()
}
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
Connections {
function onAvatarChanged(_avatar) {
avatar.setImage(_avatar)
avatarPlaceholder.opacity = 0
}
target: steamWorkshop.steamAccount
}
}
Image {
id: avatarPlaceholder
anchors.fill: avatar
source: "qrc:/assets/icons/steam_default_avatar.png"
}
Button {
id: btnSteamProfile
anchors {
verticalCenter: parent.verticalCenter
left: avatar.right
leftMargin: 20
}
text: qsTr("Profile")
onClicked: {
stackView.push(
"qrc:/qml/Workshop/SteamProfile.qml", {
"screenPlayWorkshop": root.screenPlayWorkshop,
"steamWorkshop": root.steamWorkshop
})
}
}
Button {
id: btnSteamUpload
anchors {
verticalCenter: parent.verticalCenter
left: btnSteamProfile.right
leftMargin: 20
}
text: qsTr("Upload")
onClicked: {
stackView.push(
"qrc:/qml/Workshop/upload/UploadProject.qml", {
"screenPlayWorkshop": root.screenPlayWorkshop,
"steamWorkshop": root.steamWorkshop
})
}
}
Item {
id: searchWrapper
width: 400
height: 50
anchors {
verticalCenter: parent.verticalCenter
left: btnSteamUpload.right
leftMargin: 20
}
TextField {
id: tiSearch
placeholderText: qsTr("Search for Wallpaper and Widgets...")
onEditingFinished: root.steamWorkshop.searchWorkshopByText(
tiSearch.text)
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
left: parent.left
leftMargin: 10
}
}
ToolButton {
id: tb
icon.source: "qrc:/assets/icons/icon_search.svg"
onClicked: root.steamWorkshop.searchWorkshopByText(
tiSearch.text)
icon.width: 20
icon.height: 20
anchors {
right: parent.right
bottom: parent.bottom
bottomMargin: 10
}
}
}
RowLayout {
spacing: 20
anchors {
left: searchWrapper.right
leftMargin: 20
right: cbQuerySort.left
rightMargin: 20
verticalCenter: parent.verticalCenter
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
Button {
text: qsTr("Open Workshop in Steam")
font.capitalization: Font.Capitalize
font.family: ScreenPlay.settings.font
onClicked: Qt.openUrlExternally(
"steam://url/SteamWorkshopPage/672870")
icon.source: "qrc:/assets/icons/icon_steam.svg"
icon.width: 18
icon.height: 18
height: cbQuerySort.height
}
}
ComboBox {
id: cbQuerySort
width: 220
height: searchWrapper.height
textRole: "text"
valueRole: "value"
currentIndex: 2
Layout.preferredHeight: searchWrapper.height
font.family: ScreenPlay.settings.font
model: [{
"value": SteamEnums.k_EUGCQuery_RankedByVote,
"text": qsTr("Ranked By Vote")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByPublicationDate,
"text": qsTr("Publication Date")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTrend,
"text": qsTr("Ranked By Trend")
}, {
"value": SteamEnums.K_EUGCQuery_FavoritedByFriendsRankedByPublicationDate,
"text": qsTr("Favorited By Friends")
}, {
"value": SteamEnums.K_EUGCQuery_CreatedByFriendsRankedByPublicationDate,
"text": qsTr("Created By Friends")
}, {
"value": SteamEnums.K_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate,
"text": qsTr("Created By Followed Users")
}, {
"value": SteamEnums.K_EUGCQuery_NotYetRated,
"text": qsTr("Not Yet Rated")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTotalVotesAsc,
"text": qsTr("Total VotesAsc")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByVotesUp,
"text": qsTr("Votes Up")
}, {
"value": SteamEnums.K_EUGCQuery_RankedByTotalUniqueSubscriptions,
"text": qsTr("Total Unique Subscriptions")
}]
onActivated: {
root.steamWorkshop.searchWorkshop(
cbQuerySort.currentValue)
}
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 10
}
}
}
}
delegate: WorkshopItem {
imgUrl: m_workshopPreview
name: m_workshopTitle
publishedFileID: m_publishedFileID
additionalPreviewUrl: m_additionalPreviewUrl
subscriptionCount: m_subscriptionCount
itemIndex: index
steamWorkshop: root.steamWorkshop
onClicked: {
sidebar.setWorkshopItem(publishedFileID, imgUrl,
additionalPreviewUrl,
subscriptionCount)
}
}
ScrollBar.vertical: ScrollBar {
id: workshopScrollBar
snapMode: ScrollBar.SnapOnRelease
}
footer: RowLayout {
height: 150
width: parent.width
spacing: 10
Item {
Layout.fillWidth: true
}
Button {
id: btnBack
Layout.alignment: Qt.AlignVCenter
text: qsTr("Back")
enabled: root.steamWorkshop.workshopListModel.currentPage > 1
onClicked: {
root.steamWorkshop.workshopListModel.setCurrentPage(
root.steamWorkshop.workshopListModel.currentPage - 1)
root.steamWorkshop.searchWorkshop(
SteamEnums.K_EUGCQuery_RankedByTrend)
}
}
Text {
id: txtPage
Layout.alignment: Qt.AlignVCenter
text: root.steamWorkshop.workshopListModel.currentPage + "/"
+ root.steamWorkshop.workshopListModel.pages
font.family: ScreenPlay.settings.font
color: Material.primaryTextColor
}
Button {
id: btnForward
Layout.alignment: Qt.AlignVCenter
text: qsTr("Forward")
enabled: root.steamWorkshop.workshopListModel.currentPage
<= root.steamWorkshop.workshopListModel.pages - 1
onClicked: {
root.steamWorkshop.workshopListModel.setCurrentPage(
root.steamWorkshop.workshopListModel.currentPage + 1)
root.steamWorkshop.searchWorkshop(
SteamEnums.K_EUGCQuery_RankedByTrend)
}
}
Item {
Layout.fillWidth: true
}
}
}
Behavior on contentHeight {
PropertyAnimation {
duration: 400
property: "contentHeight"
easing.type: Easing.InOutQuart
}
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
}
Sidebar {
id: sidebar
topMargin: 60
steamWorkshop: root.steamWorkshop
onTagClicked: {
gridView.headerItem.searchField.text = tag
sidebar.close()
}
}
}

View File

@ -3,84 +3,23 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import Workshop 1.0
import ScreenPlay 1.0
import Settings
import ScreenPlay
Item {
id: root
ScreenPlayWorkshop {
id: ws
Component.onCompleted: {
const success = ws.init();
if(success){
stackView.push("qrc:/qml/Workshop/SteamWorkshop.qml", {
"workshop": ws,
"steam": ws.steamWorkshop
})
} else {
popupOffline.open()
}
Component.onCompleted: {
if (ScreenPlay.settings.steamVersion) {
workshopLoader.setSource("qrc:/qml/Workshop/SteamWorkshop.qml")
} else {
workshopLoader.setSource("qrc:/qml/Workshop/Forum.qml")
}
}
PopupOffline {
id: popupOffline
workshop: ws
steam: ws.steamWorkshop
}
StackView {
id: stackView
property int duration: 300
Connections {
target: stackView.currentItem
ignoreUnknownSignals: true
function onOpenSteamProfile(){
stackView.push("qrc:/qml/Workshop/SteamProfile.qml", {
"workshop": ws,
"steam": ws.steamWorkshop
})
}
function onRequestWorkshopMainPage(){
stackView.pop()
}
}
Loader {
id: workshopLoader
asynchronous: true
anchors.fill: parent
replaceEnter: Transition {
OpacityAnimator {
from: 0
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
}
ScaleAnimator {
from: 0.8
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
}
}
replaceExit: Transition {
OpacityAnimator {
from: 1
to: 0
duration: stackView.duration
easing.type: Easing.InOutQuart
}
ScaleAnimator {
from: 1
to: 0.8
duration: stackView.duration
easing.type: Easing.InOutQuart
}
}
}
}

View File

@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import Workshop 1.0 as SP

View File

@ -5,250 +5,215 @@ import QtQuick.Layouts
import Workshop 1.0
import ScreenPlay 1.0
Popup {
Item {
id: root
property ScreenPlayWorkshop screenPlayWorkshop
property SteamWorkshop steam: screenPlayWorkshop.steamWorkshop
property SteamWorkshop steamWorkshop
width: 1200
height: 700
modal: true
dim: true
anchors.centerIn: Overlay.overlay
closePolicy: Popup.NoAutoClose
onAboutToShow: uploadLoader.sourceComponent = com
onAboutToHide: uploadLoader.sourceComponent = undefined
signal requestBack
Loader {
id: uploadLoader
Item {
id: headerWrapper
anchors.fill: parent
}
height: 50
Connections {
function onRequestClosePopup() {
root.close()
anchors {
top: parent.top
right: parent.right
left: parent.left
margins: 10
}
target: uploadLoader.item
Text {
id: txtHeadline
text: qsTr("Upload Wallpaper/Widgets to Steam")
color: Material.foreground
font.pointSize: 21
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
}
}
Component {
id: com
SwipeView {
id: view
clip: true
currentIndex: 0
interactive: false
anchors {
top: headerWrapper.bottom
right: parent.right
bottom: parent.bottom
left: parent.left
margins: 10
}
Item {
id: wrapper
id: firstPage
signal requestClosePopup
GridView {
id: gridView
Item {
id: headerWrapper
height: 50
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 7000
flickDeceleration: 5000
cellWidth: parent.width
cellHeight: 250
clip: true
model: screenPlayWorkshop.installedListModel
anchors {
top: parent.top
right: parent.right
bottom: btnAbort.top
left: parent.left
margins: 10
}
Text {
id: txtHeadline
delegate: UploadProjectBigItem {
id: delegate
text: qsTr("Upload Wallpaper/Widgets to Steam")
color: Material.foreground
font.pointSize: 21
font.family: ScreenPlay.settings.font
font.weight: Font.Thin
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
focus: true
width: gridView.cellWidth - 30
customTitle: m_title
type: m_type
screenId: m_folderId
absoluteStoragePath: m_absoluteStoragePath
publishedFileID: m_publishedFileID
preview: m_preview
itemIndex: index
onItemClicked: {
for (let childItem in gridView.contentItem.children) {
if (gridView.contentItem.children[childItem].isSelected) {
btnUploadProjects.enabled = true
return
}
}
btnUploadProjects.enabled = false
}
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
policy: ScrollBar.AlwaysOn
}
}
SwipeView {
id: view
Button {
id: btnAbort
clip: true
currentIndex: 0
interactive: false
text: qsTr("Abort")
onClicked: {
root.requestBack()
}
anchors {
top: headerWrapper.bottom
right: parent.right
right: btnUploadProjects.left
bottom: parent.bottom
left: parent.left
margins: 10
}
Item {
id: firstPage
GridView {
id: gridView
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 7000
flickDeceleration: 5000
cellWidth: parent.width
cellHeight: 250
clip: true
model: screenPlayWorkshop.installedListModel
anchors {
top: parent.top
right: parent.right
bottom: btnAbort.top
left: parent.left
margins: 10
}
delegate: UploadProjectBigItem {
id: delegate
focus: true
width: gridView.cellWidth - 30
customTitle: m_title
type: m_type
screenId: m_folderId
absoluteStoragePath: m_absoluteStoragePath
publishedFileID: m_publishedFileID
preview: m_preview
itemIndex: index
onItemClicked: {
for (let childItem in gridView.contentItem.children) {
if (gridView.contentItem.children[childItem].isSelected) {
btnUploadProjects.enabled = true
return
}
}
btnUploadProjects.enabled = false
}
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
policy: ScrollBar.AlwaysOn
}
}
Button {
id: btnAbort
text: qsTr("Abort")
onClicked: {
wrapper.requestClosePopup()
}
anchors {
right: btnUploadProjects.left
bottom: parent.bottom
margins: 10
}
}
Button {
id: btnUploadProjects
text: qsTr("Upload Selected Projects")
highlighted: true
enabled: false
onClicked: {
var uploadListArray = []
for (let childItem in gridView.contentItem.children) {
if (gridView.contentItem.children[childItem].isSelected)
uploadListArray.push(
gridView.contentItem.children[childItem].absoluteStoragePath)
}
view.currentIndex = 1
steam.bulkUploadToWorkshop(uploadListArray)
}
anchors {
right: parent.right
bottom: parent.bottom
margins: 10
}
}
}
Item {
id: secondPage
ListView {
id: listView
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 7000
flickDeceleration: 5000
cacheBuffer: 1000
clip: true
model: steam.uploadListModel
width: parent.width - 50
spacing: 25
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
margins: 10
}
delegate: UploadProjectItem {
previewImagePath: m_absolutePreviewImagePath
progress: m_uploadProgress
name: m_name
steamStatus: m_status
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
}
Button {
id: btnFinish
text: qsTr("Finish")
highlighted: true
enabled: false
onClicked: {
root.close()
}
anchors {
right: parent.right
bottom: parent.bottom
margins: 10
}
Connections {
function onUploadCompleted() {
btnFinish.enabled = true
}
target: steam.uploadListModel
}
}
}
}
PageIndicator {
id: indicator
Button {
id: btnUploadProjects
count: view.count
currentIndex: view.currentIndex
anchors.bottom: view.bottom
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Upload Selected Projects")
highlighted: true
enabled: false
onClicked: {
var uploadListArray = []
for (let childItem in gridView.contentItem.children) {
if (gridView.contentItem.children[childItem].isSelected)
uploadListArray.push(
gridView.contentItem.children[childItem].absoluteStoragePath)
}
view.currentIndex = 1
root.steamWorkshop.bulkUploadToWorkshop(uploadListArray)
}
anchors {
right: parent.right
bottom: parent.bottom
margins: 10
}
}
}
Item {
id: secondPage
ListView {
id: listView
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 7000
flickDeceleration: 5000
cacheBuffer: 1000
clip: true
model: root.steamWorkshop.uploadListModel
width: parent.width - 50
spacing: 25
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
margins: 10
}
delegate: UploadProjectItem {
previewImagePath: m_absolutePreviewImagePath
progress: m_uploadProgress
name: m_name
steamStatus: m_status
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
}
Button {
id: btnFinish
text: qsTr("Finish")
highlighted: true
enabled: false
onClicked: {
root.requestBack()
}
anchors {
right: parent.right
bottom: parent.bottom
margins: 10
}
Connections {
function onUploadCompleted() {
btnFinish.enabled = true
}
target: root.steamWorkshop.uploadListModel
}
}
}
}
background: Rectangle {
color: Material.theme === Material.Light ? "white" : Material.background
PageIndicator {
id: indicator
count: view.count
currentIndex: view.currentIndex
anchors.bottom: view.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
}

View File

@ -63,9 +63,9 @@ Item {
Image {
id: screenPlayItemImage
asynchronous: true
width: 400
source: Qt.resolvedUrl(root.absoluteStoragePath + "/" + root.preview)
source: root.preview !== "" ? Qt.resolvedUrl(root.absoluteStoragePath + "/" + root.preview) : ""
anchors {
top: parent.top

View File

@ -4,9 +4,9 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Controls.Material.impl
import Workshop
Page {
// Everyting that is not OK is a fail. See steam_qt_enums_generated.h
id: root
@ -20,6 +20,7 @@ Page {
anchors.centerIn: parent
padding: 20
onPreviewImagePathChanged: img.source = Qt.resolvedUrl("file:///" + previewImagePath)
// Everyting that is not OK is a fail. See steam_qt_enums_generated.h
onSteamStatusChanged: {
let errorText;
switch (steamStatus) {

View File

@ -559,7 +559,6 @@ bool ScreenPlayManager::loadProfiles()
return false;
}
qInfo() << "Loading profiles " << activeProfilesTmp.size();
bool containsInvalidData = false;
for (const QJsonValueRef wallpaper : activeProfilesTmp) {

View File

@ -102,6 +102,7 @@ Settings::Settings(const std::shared_ptr<GlobalVariables>& globalVariables,
setupWidgetAndWindowPaths();
setGitBuildHash(COMPILE_INFO);
setSteamVersion(!(QString(SCREENPLAY_STEAM).compare("OFF", Qt::CaseInsensitive) ? false : true));
}
/*!
@ -194,7 +195,6 @@ void Settings::restoreDefault(const QString& appConfigLocation, const QString& s
void Settings::initInstalledPath()
{
//If empty use steam workshop location
qInfo() << m_qSettings.value("ScreenPlayContentPath").toString();
if (QString(m_qSettings.value("ScreenPlayContentPath").toString()).isEmpty()) {
/*
@ -246,22 +246,14 @@ void Settings::setupLanguage()
{
QString langCode;
if (m_qSettings.value("Language").isNull()) {
auto localeList = QLocale::system().uiLanguages();
// Like En-us, De-de
QStringList localeSplits = localeList.at(0).split("-");
langCode = localeSplits.at(0);
// Ether De, En, Ru, Fr...
if (langCode.length() != 2) {
qWarning() << "Could not parse locale of value " << langCode;
return;
}
langCode = QLocale::system().name();
// QML enum begin with uppercase: de_DE -> De_DE
langCode = langCode.replace(0, 1, langCode.at(0).toUpper());
} else {
langCode = m_qSettings.value("Language").toString();
}
setLanguage(QStringToEnum<Language>(langCode, Language::En));
setLanguage(QStringToEnum<Language>(langCode, Language::En_US));
retranslateUI();
}
@ -272,17 +264,16 @@ void Settings::setupLanguage()
*/
bool Settings::retranslateUI()
{
auto* app = static_cast<QApplication*>(QApplication::instance());
QString langCode = QVariant::fromValue(language()).toString();
langCode = langCode.toLower();
QFile tsFile;
QString langCode = fixLanguageCode(QVariant::fromValue(language()).toString());
QFile tsFile;
if (tsFile.exists(":/translations/ScreenPlay_" + langCode + ".qm")) {
m_translator.load(":/translations/ScreenPlay_" + langCode + ".qm");
auto* app = static_cast<QApplication*>(QApplication::instance());
app->installTranslator(&m_translator);
emit requestRetranslation();
if (language() == Settings::Language::Ko) {
if (language() == Settings::Language::Ko_KR) {
setFont("Noto Sans CJK KR Regular");
} else {
setFont("Roboto");
@ -292,4 +283,19 @@ bool Settings::retranslateUI()
qWarning() << tsFile.fileName() << ", cannot be loaded width langCode " << langCode;
return false;
}
/*!
\brief We must translate between qml langauge code and real ones.
*/
QString Settings::fixLanguageCode(const QString& languageCode)
{
QString langCode = languageCode;
// QML enums must begin with uppercase, but our code begin with lowercase
langCode = langCode.replace(0, 1, langCode.at(0).toLower());
// For US we use the default .ts file without langauge code
if (langCode == "en_US")
langCode = "";
return langCode;
}
}

View File

@ -115,15 +115,17 @@ public:
};
enum class Language {
En,
De,
Ru,
Fr,
Es,
Ko,
Vi,
En_US,
De_DE,
Ru_RU,
Fr_FR,
Es_ES,
Ko_KR,
Vi_VN,
Pt_BR,
Zh_CN,
Tr_TR,
Nl_NL,
};
Q_ENUM(Language)
@ -402,6 +404,7 @@ public slots:
private:
void restoreDefault(const QString& appConfigLocation, const QString& settingsFileType);
void initInstalledPath();
QString fixLanguageCode(const QString& languageCode);
private:
QSettings m_qSettings;
@ -419,7 +422,7 @@ private:
QString m_gitBuildHash;
QString m_decoder;
ScreenPlay::FillMode::FillMode m_videoFillMode { ScreenPlay::FillMode::FillMode::Cover };
Language m_language { Language::En };
Language m_language { Language::En_US };
Theme m_theme { Theme::System };
QString m_font { "Roboto" };
bool m_steamVersion { false };

View File

@ -72,6 +72,8 @@ T QStringToEnum(const QString& key, const T defaultValue)
if (ok) {
return wantedEnum;
} else {
qWarning() << "Unable to convert QStringToEnum. Key: " << key;
}
return defaultValue;

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -237,5 +237,5 @@ void BaseWindow::setupLiveReloading()
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, timeoutLambda);
QObject::connect(&m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, timeoutLambda);
QObject::connect(&m_liveReloadLimiter, &QTimer::timeout, this, reloadQMLLambda);
m_fileSystemWatcher.addPaths({ projectPath() });
m_fileSystemWatcher.addPaths({ QUrl::fromUserInput(projectPath()).toLocalFile() });
}

View File

@ -86,7 +86,7 @@ if(APPLE)
COMMENT "Copying steam library into ScreenPlay.app bundle"
COMMAND ${CMAKE_COMMAND} -E copy ${steam_bin} ${workshop_install_dir})
if(NOT ${SCREENPLAY_STEAM_DEPLOY})
if(${SCREENPLAY_STEAM})
add_custom_command(
TARGET workshopplugin
POST_BUILD
@ -96,7 +96,7 @@ if(APPLE)
endif()
else()
if(NOT ${SCREENPLAY_STEAM_DEPLOY})
if(${SCREENPLAY_STEAM})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/steam_appid.txt ${CMAKE_BINARY_DIR}/bin/steam_appid.txt COPYONLY)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${WORKSHOP_PLUGIN_DIR}/qmldir COPYONLY)

View File

@ -2,7 +2,6 @@
void ScreenPlayWorkshopPlugin::registerTypes(const char* uri)
{
qInfo() << "void ScreenPlayWorkshopPlugin::registerTypes(const char* uri)";
qRegisterMetaType<ScreenPlayWorkshop::SteamQMLImageProvider*>("SteamQMLImageProvider*");
qmlRegisterType<ScreenPlayWorkshop::SteamQMLImageProvider>("Workshop", 1, 0, "SteamImage");

View File

@ -228,8 +228,6 @@ void SteamWorkshop::onWorkshopSearched(SteamUGCQueryCompleted_t* pCallback, bool
bool SteamWorkshop::queryWorkshopItemFromHandle(SteamWorkshopListModel* listModel, SteamUGCQueryCompleted_t* pCallback)
{
qDebug() << "queryWorkshopItemFromHandle " << pCallback->m_unNumResultsReturned << pCallback->m_unTotalMatchingResults;
SteamUGCDetails_t details;
const int urlLength = 200;
char url[urlLength];

View File

@ -49,10 +49,16 @@ void SteamWorkshopItem::uploadItemToWorkshop(CreateItemResult_t* pCallback, bool
return;
}
QString absoluteContentPath = m_absolutePath.toString();
const QString absoluteContentPath = ScreenPlayUtil::toLocal(m_absolutePath.toString());
auto jsonObjectOpt = ScreenPlayUtil::openJsonFileToObject(absoluteContentPath + "/project.json");
if (!jsonObjectOpt.has_value()) {
qWarning() << "Unable to load project file";
emit removeThis(this);
return;
}
auto jsonObject = jsonObjectOpt.value();
QString preview = absoluteContentPath + "/" + jsonObject.value("preview").toString();
setAbsolutePreviewImagePath(preview);

View File

@ -35,12 +35,14 @@ def run_io_tasks_in_parallel(tasks):
parser = argparse.ArgumentParser(description='Build and Package ScreenPlay')
parser.add_argument('-t', action="store", dest="build_type",
help="Build type. This is either debug or release.")
parser.add_argument('-s', action="store", dest="sign_build",
help="Enable if you want to sign the apps. This is macos only for now.")
parser.add_argument('-sign', action="store", dest="sign_build",
help="Enable if you want to sign the apps. This is macos only for now.")
parser.add_argument('-steam', action="store", dest="steam_build",
help="Enable if you want to build the Steam workshop plugin.")
args = parser.parse_args()
if not args.build_type:
print("Build type argument is missing (release,debug). Example: python build.py -t release -s=True")
print("Build type argument is missing (release,debug). Example: python build.py -t release -steam=True")
sys.exit(1)
qt_version = "6.2.0"
@ -100,15 +102,15 @@ cmake_configure_command = """cmake ../
-DCMAKE_TOOLCHAIN_FILE={toolchain}
-DVCPKG_TARGET_TRIPLET={triplet}
-DTESTS_ENABLED=OFF
-DSCREENPLAY_STEAM_DEPLOY=ON
-DSCREENPLAY_STEAM=ON
-DSCREENPLAY_STEAM={steam}
-G "CodeBlocks - Ninja"
-B.
""".format(
type=args.build_type,
prefix_path=cmake_prefix_path,
triplet=cmake_target_triplet,
toolchain=cmake_toolchain_file).replace("\n", "")
toolchain=cmake_toolchain_file,
steam=args.steam_build).replace("\n", "")
execute(cmake_configure_command)
execute("cmake --build . --target all")

3
crowdin.yml Normal file
View File

@ -0,0 +1,3 @@
files:
- source: /ScreenPlay/translations/ScreenPlay_.ts
translation: /ScreenPlay/translations/ScreenPlay_%locale_with_underscore%.ts