Move workshop qml files into ScreenPlayWorkshop
Move common qml stuff into ScreenPlayUtil
@ -44,35 +44,10 @@ set(HEADER
|
||||
|
||||
set(QML
|
||||
main.qml
|
||||
qml/Common/CloseIcon.qml
|
||||
qml/Common/ColorPicker.qml
|
||||
qml/Common/Dialog.qml
|
||||
qml/Common/Dialogs/CriticalError.qml
|
||||
qml/Common/Dialogs/MonitorConfiguration.qml
|
||||
qml/Common/Dialogs/SteamNotAvailable.qml
|
||||
qml/Common/FileSelector.qml
|
||||
qml/Common/Grow.qml
|
||||
qml/Common/GrowIconLink.qml
|
||||
qml/Common/Headline.qml
|
||||
qml/Common/HeadlineSection.qml
|
||||
qml/Common/ImageSelector.qml
|
||||
qml/Common/LicenseSelector.qml
|
||||
qml/Common/ModalBackgroundBlur.qml
|
||||
qml/Common/MouseHoverBlocker.qml
|
||||
qml/Common/Popup.qml
|
||||
qml/Common/RippleEffect.qml
|
||||
qml/Common/Search.qml
|
||||
qml/Common/Shake.qml
|
||||
qml/Common/Slider.qml
|
||||
qml/Common/Tag.qml
|
||||
qml/Common/TagSelector.qml
|
||||
qml/Common/TextField.qml
|
||||
qml/Common/TrayIcon.qml
|
||||
qml/Common/Util.js
|
||||
qml/Community/Community.qml
|
||||
qml/Create/Wizard.qml
|
||||
qml/Community/CommunityNavItem.qml
|
||||
qml/Community/XMLNewsfeed.qml
|
||||
qml/Create/Wizard.qml
|
||||
qml/Create/Create.qml
|
||||
qml/Create/Sidebar.qml
|
||||
qml/Create/StartInfo.qml
|
||||
@ -120,23 +95,7 @@ set(QML
|
||||
qml/Settings/SettingsHeader.qml
|
||||
qml/Settings/SettingsHorizontalSeperator.qml
|
||||
qml/Settings/SettingsPage.qml
|
||||
qml/Workshop/Background.qml
|
||||
qml/Workshop/Forum.qml
|
||||
qml/Workshop/Navigation.qml
|
||||
qml/Workshop/PopupOffline.qml
|
||||
qml/Workshop/ScreenPlayItem.qml
|
||||
qml/Workshop/ScreenPlayItemImage.qml
|
||||
qml/Workshop/Sidebar.qml
|
||||
qml/Workshop/SteamProfile.qml
|
||||
qml/Workshop/SteamWorkshop.qml
|
||||
qml/Workshop/SteamWorkshopStartPage.qml
|
||||
qml/Workshop/upload/PopupSteamWorkshopAgreement.qml
|
||||
qml/Workshop/upload/UploadProject.qml
|
||||
qml/Workshop/upload/UploadProjectBigItem.qml
|
||||
qml/Workshop/upload/UploadProjectItem.qml
|
||||
qml/Workshop/Workshop.qml
|
||||
qml/Workshop/WorkshopInstalled.qml
|
||||
qml/Workshop/WorkshopItem.qml)
|
||||
qml/Workshop/Workshop.qml)
|
||||
|
||||
set(TS_FILES
|
||||
translations/ScreenPlay_.ts
|
||||
@ -185,7 +144,6 @@ add_library(
|
||||
target_link_libraries(
|
||||
ScreenPlayLib
|
||||
PUBLIC ScreenPlaySDK
|
||||
ScreenPlayUtil
|
||||
sentry::sentry
|
||||
Threads::Threads
|
||||
Qt6::Quick
|
||||
@ -195,13 +153,12 @@ target_link_libraries(
|
||||
Qt6::WebSockets
|
||||
Qt6::Svg
|
||||
ScreenPlayQmlplugin
|
||||
ScreenPlayUtil
|
||||
ScreenPlayUtilplugin
|
||||
ScreenPlayWorkshopplugin
|
||||
ScreenPlayWorkshop
|
||||
SteamSDKQtEnums)
|
||||
|
||||
if(${TESTS_ENABLED})
|
||||
add_executable(tst_ScreenPlay tests/tst_main.cpp)
|
||||
target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt6::Test)
|
||||
endif()
|
||||
|
||||
qt_add_executable(${PROJECT_NAME} main.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlayLib)
|
||||
|
||||
@ -231,6 +188,11 @@ qt_add_qml_module(
|
||||
QML_FILES
|
||||
${QML})
|
||||
|
||||
#if(${SCREENPLAY_TESTS})
|
||||
# add_executable(tst_ScreenPlay tests/tst_main.cpp)
|
||||
# target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt6::Test)
|
||||
#endif()
|
||||
|
||||
if(WIN32)
|
||||
# Icon
|
||||
target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc)
|
||||
@ -282,7 +244,7 @@ if(APPLE)
|
||||
${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/)
|
||||
|
||||
# tst_ScreenPlay needs ffmpeg in the base path
|
||||
if(${TESTS_ENABLED})
|
||||
if(${SCREENPLAY_TESTS})
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
|
@ -36,10 +36,12 @@
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDebug>
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayQmlPlugin)
|
||||
|
||||
#include <sentry.h>
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayQmlPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(Resources);
|
||||
|
@ -5,13 +5,11 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import Settings 1.0
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import "qml/Monitors" as Monitors
|
||||
import "qml/Common" as Common
|
||||
import "qml/Common/Dialogs" as Dialogs
|
||||
import "qml/Installed" as Installed
|
||||
import "qml/Navigation" as Navigation
|
||||
import "qml/Workshop" as Workshop
|
||||
import "qml/Community" as Community
|
||||
|
||||
ApplicationWindow {
|
||||
@ -90,16 +88,16 @@ ApplicationWindow {
|
||||
|
||||
Item {
|
||||
id: noneContentItems
|
||||
Dialogs.SteamNotAvailable {
|
||||
Common.SteamNotAvailable {
|
||||
id: dialogSteam
|
||||
modalSource: content
|
||||
}
|
||||
|
||||
Dialogs.MonitorConfiguration {
|
||||
Common.MonitorConfiguration {
|
||||
modalSource: content
|
||||
}
|
||||
|
||||
Dialogs.CriticalError {
|
||||
Common.CriticalError {
|
||||
window: root
|
||||
modalSource: content
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import ScreenPlay.QMLUtilities 1.0
|
||||
import "../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -8,7 +8,7 @@ import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import ScreenPlay.QMLUtilities 1.0
|
||||
import "../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: delegate
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../Common"
|
||||
import ScreenPlayUtil 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -4,7 +4,7 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import ScreenPlay.Enums.ImportVideoState 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import ScreenPlay.Enums.ImportVideoState 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
import "../../"
|
||||
|
||||
Item {
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import ScreenPlay.Enums.ImportVideoState 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
import "../../"
|
||||
|
||||
Item {
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -4,7 +4,7 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
WizardPage {
|
||||
id: root
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import ScreenPlay.Enums.SearchType 1.0
|
||||
import "../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -2,7 +2,7 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
import "../Common"
|
||||
import ScreenPlayUtil 1.0
|
||||
|
||||
Item {
|
||||
id: installedUserHelper
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import ScreenPlay.Enums.SearchType 1.0
|
||||
import "../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -4,7 +4,7 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import "../Common/Util.js" as JSUtil
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -23,15 +23,15 @@ Item {
|
||||
width: 320
|
||||
height: 180
|
||||
onTypeChanged: {
|
||||
if (JSUtil.isWidget(type)) {
|
||||
if (Common.JSUtil.isWidget(type)) {
|
||||
icnType.source = "qrc:/assets/icons/icon_widgets.svg"
|
||||
return
|
||||
}
|
||||
if (JSUtil.isScene(type)) {
|
||||
if (Common.JSUtil.isScene(type)) {
|
||||
icnType.source = "qrc:/assets/icons/icon_code.svg"
|
||||
return
|
||||
}
|
||||
if (JSUtil.isVideo(type)) {
|
||||
if (Common.JSUtil.isVideo(type)) {
|
||||
icnType.source = "qrc:/assets/icons/icon_movie.svg"
|
||||
return
|
||||
}
|
||||
|
@ -8,8 +8,7 @@ import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.FillMode 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import "../Monitors"
|
||||
import "../Common" as Common
|
||||
import "../Common/Util.js" as JSUtil
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -48,7 +47,7 @@ Item {
|
||||
image.source = Qt.resolvedUrl(ScreenPlay.globalVariables.localStoragePath + "/" + root.contentFolderName + "/" + ScreenPlay.installedListModel.get(root.contentFolderName).m_previewGIF);
|
||||
image.playing = true;
|
||||
}
|
||||
if (JSUtil.isWidget(root.type) || (monitorSelection.activeMonitors.length > 0)) {
|
||||
if (Common.JSUtil.isWidget(root.type) || (monitorSelection.activeMonitors.length > 0)) {
|
||||
btnSetWallpaper.enabled = true;
|
||||
return ;
|
||||
}
|
||||
@ -66,7 +65,7 @@ Item {
|
||||
}
|
||||
root.contentFolderName = folderName;
|
||||
root.type = type;
|
||||
if (JSUtil.isWallpaper(root.type)) {
|
||||
if (Common.JSUtil.isWallpaper(root.type)) {
|
||||
if (type === InstalledType.VideoWallpaper)
|
||||
root.state = "activeWallpaper";
|
||||
else
|
||||
@ -282,7 +281,7 @@ Item {
|
||||
availableHeight: height
|
||||
fontSize: 11
|
||||
onActiveMonitorsChanged: {
|
||||
if (JSUtil.isWidget(root.type)) {
|
||||
if (Common.JSUtil.isWidget(root.type)) {
|
||||
btnSetWallpaper.enabled = true;
|
||||
return ;
|
||||
}
|
||||
@ -371,7 +370,7 @@ Item {
|
||||
onClicked: {
|
||||
const absoluteStoragePath = ScreenPlay.globalVariables.localStoragePath + "/" + root.contentFolderName;
|
||||
const previewImage = ScreenPlay.installedListModel.get(root.contentFolderName).m_preview;
|
||||
if (JSUtil.isWallpaper(root.type)) {
|
||||
if (Common.JSUtil.isWallpaper(root.type)) {
|
||||
let activeMonitors = monitorSelection.getActiveMonitors();
|
||||
// TODO Alert user to choose a monitor
|
||||
if (activeMonitors.length === 0)
|
||||
@ -386,7 +385,7 @@ Item {
|
||||
let success =ScreenPlay.screenPlayManager.createWallpaper(root.type, cbVideoFillMode.currentValue, absoluteStoragePath, previewImage, screenFile, activeMonitors, volume, 1, {}, true);
|
||||
print(success)
|
||||
}
|
||||
if (JSUtil.isWidget(root.type))
|
||||
if (Common.JSUtil.isWidget(root.type))
|
||||
ScreenPlay.screenPlayManager.createWidget(type, Qt.point(0, 0), absoluteStoragePath, previewImage, {}, true);
|
||||
|
||||
root.state = "inactive";
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.FillMode 1.0
|
||||
import "../Common/" as SP
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
@ -30,7 +30,7 @@ ColumnLayout {
|
||||
slVolume.slider.value = wallpaper.volume;
|
||||
}
|
||||
|
||||
SP.Slider {
|
||||
Common.Slider {
|
||||
id: slVolume
|
||||
|
||||
headline: qsTr("Volume")
|
||||
@ -44,7 +44,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
|
||||
SP.Slider {
|
||||
Common.Slider {
|
||||
id: slCurrentVideoTime
|
||||
|
||||
headline: qsTr("Current Video Time")
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import "../Common/" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Common.Popup {
|
||||
id: root
|
||||
|
@ -6,8 +6,7 @@ import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import "../Workshop"
|
||||
import "../Common"
|
||||
import ScreenPlayUtil 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
@ -6,8 +6,7 @@ import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlay 1.0
|
||||
import "../Workshop"
|
||||
import "../Common" as Common
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
@ -7,7 +7,7 @@ import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.FillMode 1.0
|
||||
import Settings 1.0
|
||||
import "../Common"
|
||||
import ScreenPlayUtil 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -5,6 +5,7 @@ import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts
|
||||
import Settings
|
||||
import ScreenPlay
|
||||
import ScreenPlayWorkshop 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -14,11 +15,11 @@ Item {
|
||||
Component.onCompleted: {
|
||||
if (ScreenPlay.settings.steamVersion) {
|
||||
workshopLoader.setSource(
|
||||
"qrc:/ScreenPlayQml/qml/Workshop/SteamWorkshop.qml", {
|
||||
"qrc:/ScreenPlayWorkshop/qml/SteamWorkshop.qml", {
|
||||
"modalSource": modalSource
|
||||
})
|
||||
} else {
|
||||
workshopLoader.setSource("qrc:/ScreenPlayQml/qml/Workshop/Forum.qml")
|
||||
workshopLoader.setSource("qrc:/ScreenPlayWorkshop/qml/Forum.qml")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QQuickItem>
|
||||
#include <QtTest>
|
||||
#define DOCTEST_CONFIG_IMPLEMENT
|
||||
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayQmlPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
|
||||
|
||||
class ScreenPlayTest : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -259,21 +259,6 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Forum</name>
|
||||
<message>
|
||||
<source>Download Wallpaper and Widgets from our forums manually. If you want to download Steam Workshop content you have to install ScreenPlay via Steam.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Install Steam Version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open In Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GifWallpaper</name>
|
||||
<message>
|
||||
@ -726,14 +711,6 @@
|
||||
<source>Widgets</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> Subscribed items: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Upload to the Steam Workshop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -775,41 +752,6 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PopupOffline</name>
|
||||
<message>
|
||||
<source>Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You need to run Steam to access the Steam Workshop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Steam Error Restart: %1
|
||||
Steam Error API Init: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PopupSteamWorkshopAgreement</name>
|
||||
<message>
|
||||
<source>You Need to Agree To The Steam Subscriber Agreement First</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>REQUIRES INTERNET CONNECTION AND FREE STEAM ACCOUNT TO ACTIVATE. Notice: Product offered subject to your acceptance of the Steam Subscriber Agreement (SSA). You must activate this product via the Internet by registering for a Steam account and accepting the SSA. Please see https://store.steampowered.com/subscriber_agreement/ to view the SSA prior to purchase. If you do not agree with the provisions of the SSA, you should return this game unopened to your retailer in accordance with their return policy.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View The Steam Subscriber Agreement</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Accept Steam Workshop Agreement</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMLWallpaper</name>
|
||||
<message>
|
||||
@ -1154,38 +1096,6 @@ Steam Error API Init: %2</source>
|
||||
<source>Scale-Down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No description...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Click here if you like the content</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Click here if you do not like the content</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Subscribtions: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open In Steam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Subscribed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Subscribe</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>StartInfo</name>
|
||||
@ -1205,104 +1115,6 @@ Steam Error API Init: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SteamProfile</name>
|
||||
<message>
|
||||
<source>Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SteamWorkshopStartPage</name>
|
||||
<message>
|
||||
<source>Loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Download now!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Downloading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Details</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open In Steam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Upload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Search for Wallpaper and Widgets...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Workshop in Steam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ranked By Vote</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Publication Date</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ranked By Trend</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Favorited By Friends</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Created By Friends</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Created By Followed Users</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Not Yet Rated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Total VotesAsc</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Votes Up</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Total Unique Subscriptions</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Back</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Forward</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TagSelector</name>
|
||||
<message>
|
||||
@ -1364,507 +1176,6 @@ Steam Error API Init: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploadProject</name>
|
||||
<message>
|
||||
<source>Upload Wallpaper/Widgets to Steam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Abort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Upload Selected Projects</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploadProjectBigItem</name>
|
||||
<message>
|
||||
<source>Type: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Project!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploadProjectItem</name>
|
||||
<message>
|
||||
<source>Fail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No Connection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logged In Elsewhere</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Protocol Version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Param</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File Not Found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Busy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid State</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Email</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Duplicate Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Access Denied</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Timeout</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Banned</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Not Found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid SteamID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Service Unavailable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Not Logged On</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Encryption Failure</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insufficient Privilege</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Limit Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Revoked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Expired</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Already Redeemed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Duplicate Request</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Already Owned</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IP Not Found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Persist Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Locking Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logon Session Replaced</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connect Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Handshake Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IO Failure</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remote Disconnect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shopping Cart Not Found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blocked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ignored</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No Match</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Disabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Service ReadOnly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Not Featured</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Administrator OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Content Version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Try Another CM</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Password Required To Kick Session</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Already Logged In Elsewhere</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Suspended</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancelled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Data Corruption</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disk Full</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remote Call Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Password Unset</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>External Account Unlinked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PSN Ticket Invalid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>External Account Already Linked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remote File Conflict</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Illegal Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Same As Previous Value</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Logon Denied</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot Use Old Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Login AuthCode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Logon Denied No Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hardware Not Capable Of IPT</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IPT Init Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parental Control Restricted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Facebook Query Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Expired Login Auth Code</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IP Login Restriction Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Locked Down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Logon Denied Verified Email Required</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No MatchingURL</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bad Response</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Require Password ReEntry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Value Out Of Range</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unexpecte Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid CEG Submission</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restricted Device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Region Locked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Rate Limit Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Login Denied Need Two Factor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Item Deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Login Denied Throttle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Two Factor Code Mismatch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Two Factor Activation Code Mismatch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Associated To Multiple Partners</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Not Modified</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No Mobile Device</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time Not Synced</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sms Code Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Limit Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Activity Limit Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Phone Activity Limit Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refund To Wallet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Email Send Failure</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Not Settled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Need Captcha</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GSLT Denied</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GS Owner Denied</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid Item Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IP Banned</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GSLT Expired</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insufficient Funds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Too Many Pending</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No Site Licenses Found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>WG Network Send Exceeded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Not Friends</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Limited User Account</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cant Remove Item</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Account Deleted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Existing User Cancelled License</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Community Cooldown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Status:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Upload Progress: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WebsiteWallpaper</name>
|
||||
<message>
|
||||
@ -1918,17 +1229,6 @@ Steam Error API Init: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WorkshopItem</name>
|
||||
<message>
|
||||
<source>Successfully subscribed to Workshop Item!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Download complete!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>XMLNewsfeed</name>
|
||||
<message>
|
||||
|
@ -18,6 +18,21 @@ set(QML_PLUGIN_SOURCES src/shaderlibrary.cpp)
|
||||
|
||||
set(QML_PLUGIN_HEADER src/shaderlibrary.h)
|
||||
|
||||
set(SHADER
|
||||
shaders/lightning.vert
|
||||
shaders/lightning.frag
|
||||
shaders/wobble.frag
|
||||
shaders/water.frag
|
||||
shaders/water.vert
|
||||
)
|
||||
|
||||
set(RESOURCES
|
||||
assets/mask_01.png
|
||||
assets/Shadertoy_Bayer.png
|
||||
assets/Shadertoy_Gray_Noise_Medium.png
|
||||
assets/Shadertoy_Lichen.jpg
|
||||
assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg
|
||||
)
|
||||
|
||||
qt_add_library(${PROJECT_NAME} STATIC)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick)
|
||||
@ -35,7 +50,9 @@ qt_add_qml_module(
|
||||
${QML_PLUGIN_SOURCES}
|
||||
${QML_PLUGIN_HEADER}
|
||||
QML_FILES
|
||||
${QML})
|
||||
${QML}
|
||||
RESOURCES
|
||||
${RESOURCES})
|
||||
|
||||
# https://doc.qt.io/qt-6/qtshadertools-build.html
|
||||
qt6_add_shaders(
|
||||
@ -46,13 +63,10 @@ qt6_add_shaders(
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
# shader/lightning.frag shader/lightning.vert
|
||||
shaders/wobble.frag
|
||||
shaders/water.frag
|
||||
shaders/water.vert)
|
||||
${SHADER})
|
||||
|
||||
if(${SCREENPLAY_TESTS})
|
||||
qt_add_executable(tst_ScreenPlayShader src/TestMain.cpp Resources.qrc)
|
||||
qt_add_executable(tst_ScreenPlayShader src/TestMain.cpp)
|
||||
target_link_libraries(tst_ScreenPlayShader PRIVATE Qt::Quick ${PROJECT_NAME}plugin )
|
||||
target_compile_definitions(tst_ScreenPlayShader PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||
endif()
|
||||
|
@ -4,5 +4,6 @@
|
||||
<file>assets/Shadertoy_Gray_Noise_Medium.png</file>
|
||||
<file>assets/Shadertoy_Lichen.jpg</file>
|
||||
<file>assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg</file>
|
||||
<file>assets/mask_01.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
ScreenPlayShader/assets/mask_01.png
Normal file
After Width: | Height: | Size: 20 KiB |
@ -1,84 +1,16 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
#version 440
|
||||
|
||||
uniform float time;
|
||||
uniform vec2 resolution;
|
||||
layout(location=0) in vec2 qt_TexCoord0;
|
||||
|
||||
layout(location=0) out vec4 fragColor;
|
||||
|
||||
float hash( float n ) { return fract(sin(n)*753.5453123); }
|
||||
layout(std140, binding=0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
} ubuf;
|
||||
|
||||
// Slight modification of iq's noise function.
|
||||
float noise( in vec2 x )
|
||||
{
|
||||
vec2 p = floor(x);
|
||||
vec2 f = fract(x);
|
||||
f = f*f*(3.0-2.0*f);
|
||||
|
||||
float n = p.x + p.y*157.0;
|
||||
return mix(
|
||||
mix( hash(n+ 0.0), hash(n+ 1.0),f.x),
|
||||
mix( hash(n+157.0), hash(n+158.0),f.x),
|
||||
f.y);
|
||||
}
|
||||
|
||||
|
||||
float fbm(vec2 p, vec3 a)
|
||||
{
|
||||
float v = 0.0;
|
||||
v += noise(p*a.x)*1.20;
|
||||
v += noise(p*a.y)*1.20;
|
||||
v += noise(p*a.z)*.125;
|
||||
return v;
|
||||
}
|
||||
|
||||
vec3 drawLines( vec2 uv, vec3 fbmOffset, vec3 color1, vec3 color2 )
|
||||
{
|
||||
float timeVal = time * 0.1;
|
||||
vec3 finalColor = vec3( 0.0 );
|
||||
for( int i=0; i < 3; ++i )
|
||||
{
|
||||
float indexAsFloat = float(i);
|
||||
float amp = 40.0 + (indexAsFloat*10.0);
|
||||
float period = 2.0 + (indexAsFloat+2.0);
|
||||
float thickness = mix( 0.9, 1.0, noise(uv*10.0) );
|
||||
float t = abs( 0.9 / (sin(uv.x + fbm( uv + timeVal * period, fbmOffset )) * amp) * thickness );
|
||||
|
||||
finalColor += t * color1;
|
||||
}
|
||||
|
||||
for( int i=0; i < 0; ++i )
|
||||
{
|
||||
float indexAsFloat = float(i);
|
||||
float amp = 40.0 + (indexAsFloat*7.0);
|
||||
float period = 2.0 + (indexAsFloat+8.0);
|
||||
float thickness = mix( 0.7, 1.0, noise(uv*10.0) );
|
||||
float t = abs( 0.8 / (sin(uv.x + fbm( uv + timeVal * period, fbmOffset )) * amp) * thickness );
|
||||
|
||||
finalColor += t * color2 * 0.6;
|
||||
}
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
|
||||
void main( void )
|
||||
{
|
||||
|
||||
vec2 uv = ( gl_FragCoord.xy / resolution.xy ) * 1.0 - 1.8;
|
||||
uv.x *= resolution.x/resolution.y;
|
||||
uv.xy = uv.yx;
|
||||
|
||||
vec3 lineColor1 = vec3( 2.3, 0.5, .5 );
|
||||
vec3 lineColor2 = vec3( 0.3, 0.5, 2.5 );
|
||||
|
||||
vec3 finalColor = vec3(0.0);
|
||||
|
||||
|
||||
float t = sin( time ) * 0.5 + 0.5;
|
||||
float pulse = mix( 0.10, 0.20, t);
|
||||
|
||||
finalColor += drawLines( uv, vec3( 1.0, 1.0, 8.0), lineColor2, lineColor2 );
|
||||
|
||||
gl_FragColor = vec4( finalColor, 1.0 );
|
||||
layout(binding=1) uniform sampler2D source;
|
||||
|
||||
void main() {
|
||||
fragColor = texture(source, qt_TexCoord0) * ubuf.qt_Opacity;
|
||||
}
|
||||
|
@ -1,9 +1,92 @@
|
||||
uniform highp mat4 qt_Matrix;
|
||||
attribute highp vec4 qt_Vertex;
|
||||
attribute highp vec2 qt_MultiTexCoord0;
|
||||
varying highp vec2 coord;
|
||||
#version 440
|
||||
|
||||
void main() {
|
||||
coord = qt_MultiTexCoord0;
|
||||
gl_Position = qt_Matrix * qt_Vertex;
|
||||
layout(location=0) in vec2 qt_TexCoord0;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(binding = 1) uniform sampler2D source;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
float time;
|
||||
vec2 resolution;
|
||||
} ubuf;
|
||||
|
||||
|
||||
float hash( float n ) { return fract(sin(n)*753.5453123); }
|
||||
|
||||
// Slight modification of iq's noise function.
|
||||
float noise( in vec2 x )
|
||||
{
|
||||
vec2 p = floor(x);
|
||||
vec2 f = fract(x);
|
||||
f = f*f*(3.0-2.0*f);
|
||||
|
||||
float n = p.x + p.y*157.0;
|
||||
return mix(
|
||||
mix( hash(n+ 0.0), hash(n+ 1.0),f.x),
|
||||
mix( hash(n+157.0), hash(n+158.0),f.x),
|
||||
f.y);
|
||||
}
|
||||
|
||||
|
||||
float fbm(vec2 p, vec3 a)
|
||||
{
|
||||
float v = 0.0;
|
||||
v += noise(p*a.x)*1.20;
|
||||
v += noise(p*a.y)*1.20;
|
||||
v += noise(p*a.z)*.125;
|
||||
return v;
|
||||
}
|
||||
|
||||
vec3 drawLines( vec2 uv, vec3 fbmOffset, vec3 color1, vec3 color2, float time )
|
||||
{
|
||||
float timeVal = time * 0.1;
|
||||
vec3 finalColor = vec3( 0.0 );
|
||||
for( int i=0; i < 3; ++i )
|
||||
{
|
||||
float indexAsFloat = float(i);
|
||||
float amp = 40.0 + (indexAsFloat*10.0);
|
||||
float period = 2.0 + (indexAsFloat+2.0);
|
||||
float thickness = mix( 0.9, 1.0, noise(uv*10.0) );
|
||||
float t = abs( 0.9 / (sin(uv.x + fbm( uv + timeVal * period, fbmOffset )) * amp) * thickness );
|
||||
|
||||
finalColor += t * color1;
|
||||
}
|
||||
|
||||
for( int i=0; i < 0; ++i )
|
||||
{
|
||||
float indexAsFloat = float(i);
|
||||
float amp = 40.0 + (indexAsFloat*7.0);
|
||||
float period = 2.0 + (indexAsFloat+8.0);
|
||||
float thickness = mix( 0.7, 1.0, noise(uv*10.0) );
|
||||
float t = abs( 0.8 / (sin(uv.x + fbm( uv + timeVal * period, fbmOffset )) * amp) * thickness );
|
||||
|
||||
finalColor += t * color2 * 0.6;
|
||||
}
|
||||
|
||||
return finalColor;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//vec2 uv = ( coord.xy / resolution.xy ) * 1.0 - 1.8;
|
||||
//uv.x *= resolution.x/resolution.y;
|
||||
//uv.xy = uv.yx;
|
||||
|
||||
|
||||
vec3 lineColor1 = vec3( 2.3, 0.5, .5 );
|
||||
vec3 lineColor2 = vec3( 0.3, 0.5, 2.5 );
|
||||
|
||||
vec3 finalColor = vec3(0.0);
|
||||
|
||||
|
||||
float t = sin( ubuf.time ) * 0.5 + 0.5;
|
||||
float pulse = mix( 0.10, 0.20, t);
|
||||
|
||||
finalColor += drawLines( qt_TexCoord0, vec3( 1.0, 1.0, 8.0), lineColor2, lineColor2, ubuf.time );
|
||||
|
||||
fragColor = vec4( finalColor, 1.0 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QSurfaceFormat>
|
||||
#include <QtQml/qqmlextensionplugin.h>
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayShaderPlugin)
|
||||
@ -7,7 +8,6 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayShaderPlugin)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
// The first subfolder is the libraryName followed by the regular
|
||||
// folder strucutre: LibararyName/Subfolder
|
||||
|
@ -10,25 +10,67 @@ Window {
|
||||
visible: true
|
||||
title: qsTr("ScreenPlayShader")
|
||||
|
||||
Image {
|
||||
id: img
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
Image {
|
||||
id: img
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: "qrc:/ScreenPlayShader/assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg"
|
||||
// layer.enabled: true
|
||||
// layer.effect: ShaderEffect {
|
||||
// property real amplitude: 0.04 * .1
|
||||
// property real frequency: 2
|
||||
// property real time: 0
|
||||
// property real framerate: 60
|
||||
// property real updateInterval: Math.round(
|
||||
// (1000 / framerate) * 10) / 10
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: ShaderEffect {
|
||||
property real amplitude: 0.04 * 1
|
||||
property real frequency: 200
|
||||
property real time: 0
|
||||
NumberAnimation on time {
|
||||
loops: Animation.Infinite
|
||||
from: 0
|
||||
to: Math.PI * 2
|
||||
duration: 600
|
||||
}
|
||||
// Timer {
|
||||
// interval: updateInterval
|
||||
// onIntervalChanged: print(updateInterval)
|
||||
// running: true
|
||||
// repeat: true
|
||||
// onTriggered: {
|
||||
// if (parent.time > 600) {
|
||||
// parent.time = 0
|
||||
// }
|
||||
// parent.time += 1
|
||||
// }
|
||||
// }
|
||||
|
||||
fragmentShader: "/shaders/wobble.frag.qsb"
|
||||
// fragmentShader: "/shaders/water.frag.qsb"
|
||||
// }
|
||||
}
|
||||
source: "qrc:/assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg"
|
||||
}
|
||||
// Image {
|
||||
// id: img
|
||||
// anchors.fill: parent
|
||||
// fillMode: Image.PreserveAspectCrop
|
||||
|
||||
// layer.enabled: true
|
||||
// layer.effect: ShaderEffect {
|
||||
// property real amplitude: 0.04 * .1
|
||||
// property real frequency: 2
|
||||
// property real time: 0
|
||||
// property real framerate: 60
|
||||
// property size resolution: Qt.size(1920,1080)
|
||||
// property real updateInterval: Math.round(
|
||||
// (1000 / framerate) * 10) / 10
|
||||
|
||||
// Timer {
|
||||
// interval: updateInterval
|
||||
// onIntervalChanged: print(updateInterval)
|
||||
// running: true
|
||||
// repeat: true
|
||||
// onTriggered: {
|
||||
// if (parent.time > 600) {
|
||||
// parent.time = 0
|
||||
// }
|
||||
// parent.time += 1
|
||||
// }
|
||||
// }
|
||||
|
||||
// // fragmentShader: "/shaders/lightning.frag.qsb"
|
||||
// vertexShader: "/shaders/lightning.vert.qsb"
|
||||
// }
|
||||
// source: "qrc:/ScreenPlayWorkshop/assets/mask_01.png"
|
||||
// }
|
||||
}
|
||||
|
@ -9,6 +9,33 @@ find_package(
|
||||
COMPONENTS Core Quick
|
||||
REQUIRED)
|
||||
|
||||
set(QML
|
||||
qml/CloseIcon.qml
|
||||
qml/ColorPicker.qml
|
||||
qml/Dialog.qml
|
||||
qml/Dialogs/CriticalError.qml
|
||||
qml/Dialogs/MonitorConfiguration.qml
|
||||
qml/Dialogs/SteamNotAvailable.qml
|
||||
qml/FileSelector.qml
|
||||
qml/Grow.qml
|
||||
qml/GrowIconLink.qml
|
||||
qml/Headline.qml
|
||||
qml/HeadlineSection.qml
|
||||
qml/ImageSelector.qml
|
||||
qml/LicenseSelector.qml
|
||||
qml/ModalBackgroundBlur.qml
|
||||
qml/MouseHoverBlocker.qml
|
||||
qml/Popup.qml
|
||||
qml/RippleEffect.qml
|
||||
qml/Search.qml
|
||||
qml/Shake.qml
|
||||
qml/Slider.qml
|
||||
qml/Tag.qml
|
||||
qml/TagSelector.qml
|
||||
qml/TextField.qml
|
||||
qml/TrayIcon.qml
|
||||
qml/JSUtil.js)
|
||||
|
||||
set(SOURCES inc/public/ScreenPlayUtil/httpfileserver.cpp src/contenttypes.cpp src/util.cpp)
|
||||
|
||||
set(HEADER
|
||||
@ -31,6 +58,17 @@ qt_add_library(
|
||||
${SOURCES}
|
||||
${HEADER})
|
||||
|
||||
qt_add_qml_module(
|
||||
${PROJECT_NAME}
|
||||
OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}
|
||||
URI
|
||||
${PROJECT_NAME}
|
||||
VERSION
|
||||
1.0
|
||||
QML_FILES
|
||||
${QML})
|
||||
|
||||
find_path(CPP_HTTPLIB_INCLUDE_DIRS "httplib.h")
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CPP_HTTPLIB_INCLUDE_DIRS})
|
||||
|
||||
|
98
ScreenPlayUtil/qml/Background.qml
Normal file
@ -0,0 +1,98 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Particles
|
||||
|
||||
Rectangle {
|
||||
id: element
|
||||
|
||||
anchors.fill: parent
|
||||
color: Material.theme === Material.Light ? "white" : Qt.darker(Material.background)
|
||||
state: "init"
|
||||
|
||||
Rectangle {
|
||||
id: bgCommunity
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: bgWorkshop
|
||||
|
||||
color: "#161C1D"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "init"
|
||||
|
||||
PropertyChanges {
|
||||
target: bgCommunity
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: bgWorkshop
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "create"
|
||||
|
||||
PropertyChanges {
|
||||
target: bgCommunity
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: bgWorkshop
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "community"
|
||||
|
||||
PropertyChanges {
|
||||
target: bgCommunity
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: bgWorkshop
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "workshop"
|
||||
|
||||
PropertyChanges {
|
||||
target: bgCommunity
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: bgWorkshop
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "*"
|
||||
to: "*"
|
||||
|
||||
PropertyAnimation {
|
||||
targets: [bgCommunity, bgWorkshop]
|
||||
property: "opacity"
|
||||
duration: 400
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
84
ScreenPlayUtil/qml/CloseIcon.qml
Normal file
@ -0,0 +1,84 @@
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
/*!
|
||||
\qmltype Close Icon
|
||||
\brief A image selector with popup preview.
|
||||
|
||||
*/
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
/*!
|
||||
\qmlproperty color BackButtonIcon::color
|
||||
|
||||
Color if the icon.
|
||||
*/
|
||||
property color color: Material.iconColor
|
||||
/*!
|
||||
\qmlproperty string BackButtonIcon::icon
|
||||
|
||||
Icon image if the icon.
|
||||
*/
|
||||
property string icon: "qrc:/ScreenPlayWorkshop/assets/icons/icon_close.svg"
|
||||
|
||||
width: 32
|
||||
height: width
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: root.state = "hover"
|
||||
onExited: root.state = ""
|
||||
hoverEnabled: true
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
margins: 10
|
||||
}
|
||||
|
||||
Image {
|
||||
id: imgClose
|
||||
|
||||
source: root.icon
|
||||
visible: false
|
||||
width: 14
|
||||
height: 14
|
||||
smooth: true
|
||||
anchors.centerIn: parent
|
||||
sourceSize: Qt.size(width, width)
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
id: iconColorOverlay
|
||||
|
||||
anchors.fill: imgClose
|
||||
source: imgClose
|
||||
color: root.color
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
|
||||
PropertyChanges {
|
||||
target: iconColorOverlay
|
||||
color: Material.color(Material.Orange)
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "hover"
|
||||
reversible: true
|
||||
|
||||
ColorAnimation {
|
||||
target: iconColorOverlay
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
773
ScreenPlayUtil/qml/ColorPicker.qml
Normal file
@ -0,0 +1,773 @@
|
||||
/*
|
||||
Based on: https://github.com/albertino80/bppgrid
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Alberto Bignotti
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Shapes 1.12
|
||||
|
||||
Pane {
|
||||
property color hueColor: "blue"
|
||||
property int colorHandleRadius: 10
|
||||
property int marginsValue: 10
|
||||
property int chekerSide: 5
|
||||
property color currentColor: "black"
|
||||
property var commonColors: ['#FFFFFF', '#C0C0C0', '#808080', '#000000', '#FF0000', '#800000', '#FFFF00', '#808000', '#00FF00', '#008000', '#00FFFF', '#008080', '#0000FF', '#000080', '#FF00FF', '#800080']
|
||||
property bool updatingControls: false
|
||||
|
||||
function initColor(acolor) {
|
||||
initColorRGB(acolor.r * 255, acolor.g * 255, acolor.b * 255, acolor.a * 255);
|
||||
}
|
||||
|
||||
function setHueColor(hueValue) {
|
||||
var v = 1 - hueValue;
|
||||
if (0 <= v && v < 0.16) {
|
||||
return Qt.rgba(1, 0, v / 0.16, 1);
|
||||
} else if (0.16 <= v && v < 0.33) {
|
||||
return Qt.rgba(1 - (v - 0.16) / 0.17, 0, 1, 1);
|
||||
} else if (0.33 <= v && v < 0.5) {
|
||||
return Qt.rgba(0, ((v - 0.33) / 0.17), 1, 1);
|
||||
} else if (0.5 <= v && v < 0.76) {
|
||||
return Qt.rgba(0, 1, 1 - (v - 0.5) / 0.26, 1);
|
||||
} else if (0.76 <= v && v < 0.85) {
|
||||
return Qt.rgba((v - 0.76) / 0.09, 1, 0, 1);
|
||||
} else if (0.85 <= v && v <= 1) {
|
||||
return Qt.rgba(1, 1 - (v - 0.85) / 0.15, 0, 1);
|
||||
} else {
|
||||
console.log("Invalid hueValue [0, 1]", hueValue);
|
||||
return "white";
|
||||
}
|
||||
}
|
||||
|
||||
function hexToRgb(hex) {
|
||||
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
"r": parseInt(result[1], 16),
|
||||
"g": parseInt(result[2], 16),
|
||||
"b": parseInt(result[3], 16)
|
||||
} : null;
|
||||
}
|
||||
|
||||
function rgbToHex(r, g, b) {
|
||||
return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
||||
}
|
||||
|
||||
function drawChecker(ctx, width, height) {
|
||||
ctx.lineWidth = 0;
|
||||
//ctx.strokeStyle = 'blue'
|
||||
var numRows = Math.ceil(height / chekerSide);
|
||||
var numCols = Math.ceil(width / chekerSide);
|
||||
var lastWhite = false;
|
||||
var lastColWhite = false;
|
||||
for (var icol = 0; icol < numCols; icol++) {
|
||||
lastColWhite = lastWhite;
|
||||
for (var irow = 0; irow < numRows; irow++) {
|
||||
if (lastWhite)
|
||||
ctx.fillStyle = 'gray';
|
||||
else
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillRect(icol * chekerSide, irow * chekerSide, chekerSide, chekerSide);
|
||||
lastWhite = !lastWhite;
|
||||
}
|
||||
lastWhite = !lastColWhite;
|
||||
}
|
||||
}
|
||||
|
||||
function handleMouseVertSlider(mouse, ctrlCursor, ctrlHeight) {
|
||||
if (mouse.buttons & Qt.LeftButton) {
|
||||
ctrlCursor.y = Math.max(0, Math.min(ctrlHeight, mouse.y));
|
||||
setCurrentColor();
|
||||
}
|
||||
}
|
||||
|
||||
function setCurrentColor() {
|
||||
var alphaFactor = 1 - (shpAlpha.y / shpAlpha.parent.height);
|
||||
if (optHsv.checked) {
|
||||
var hueFactor = 1 - (shpHue.y / shpHue.parent.height);
|
||||
hueColor = setHueColor(hueFactor);
|
||||
var saturation = (pickerCursor.x + colorHandleRadius) / pickerCursor.parent.width;
|
||||
var colorValue = 1 - ((pickerCursor.y + colorHandleRadius) / pickerCursor.parent.height);
|
||||
currentColor = Qt.hsva(hueFactor, saturation, colorValue, alphaFactor);
|
||||
} else {
|
||||
currentColor = Qt.rgba(sliderRed.value / 255, sliderGreen.value / 255, sliderBlue.value / 255, alphaFactor);
|
||||
}
|
||||
hexColor.text = rgbToHex(currentColor.r * 255, currentColor.g * 255, currentColor.b * 255);
|
||||
optHsv.focus = true;
|
||||
}
|
||||
|
||||
function initColorRGB(ared, agreen, ablue, aalpha) {
|
||||
updatingControls = true;
|
||||
var acolor = Qt.rgba(ared / 255, agreen / 255, ablue / 255, aalpha / 255);
|
||||
var valHue = acolor.hsvHue;
|
||||
if (valHue < 0)
|
||||
valHue = 0;
|
||||
|
||||
//console.log("toset", acolor.r * 255, acolor.g * 255, acolor.b * 255, acolor.a * 255)
|
||||
shpHue.y = ((1 - valHue) * shpHue.parent.height);
|
||||
shpAlpha.y = ((1 - acolor.a) * shpAlpha.parent.height);
|
||||
pickerCursor.x = (acolor.hsvSaturation * pickerCursor.parent.width) - colorHandleRadius;
|
||||
pickerCursor.y = ((1 - acolor.hsvValue) * pickerCursor.parent.height) - colorHandleRadius;
|
||||
sliderRed.value = ared;
|
||||
sliderGreen.value = agreen;
|
||||
sliderBlue.value = ablue;
|
||||
setCurrentColor();
|
||||
updatingControls = false;
|
||||
}
|
||||
|
||||
width: 500
|
||||
height: 300
|
||||
Component.onCompleted: {
|
||||
initColorRGB(255, 0, 0, 255);
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
//anchors.margins: marginsValue
|
||||
anchors.margins: 0
|
||||
spacing: marginsValue
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
spacing: marginsValue
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
visible: optHsv.checked
|
||||
spacing: marginsValue
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Rectangle {
|
||||
x: 0
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
visible: true
|
||||
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#FFFFFF"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: hueColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: 0
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
border.color: BppMetrics.accentColor
|
||||
visible: true
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#FF000000"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: pickerCursor
|
||||
|
||||
width: colorHandleRadius * 2
|
||||
height: colorHandleRadius * 2
|
||||
radius: colorHandleRadius
|
||||
border.color: BppMetrics.windowBackground
|
||||
border.width: 2
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 2
|
||||
border.color: BppMetrics.accentColor
|
||||
border.width: 2
|
||||
radius: width / 2
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
function handleMouse(mouse) {
|
||||
if (mouse.buttons & Qt.LeftButton) {
|
||||
pickerCursor.x = Math.max(-colorHandleRadius, Math.min(width, mouse.x) - colorHandleRadius);
|
||||
pickerCursor.y = Math.max(-colorHandleRadius, Math.min(height, mouse.y) - colorHandleRadius);
|
||||
setCurrentColor();
|
||||
}
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
onPositionChanged: handleMouse(mouse)
|
||||
onPressed: handleMouse(mouse)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 30
|
||||
border.color: BppMetrics.accentColor
|
||||
|
||||
Shape {
|
||||
id: shpHue
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: 0
|
||||
y: 90
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 1
|
||||
strokeColor: "black"
|
||||
|
||||
PathSvg {
|
||||
path: "M0,0 L30,0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 2
|
||||
strokeColor: BppMetrics.accentColor
|
||||
fillColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "M0,-5 L30,-5 L30,4 L0,4z"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPositionChanged: handleMouseVertSlider(mouse, shpHue, height)
|
||||
onPressed: handleMouseVertSlider(mouse, shpHue, height)
|
||||
}
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#FF0000"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0.85
|
||||
color: "#FFFF00"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0.76
|
||||
color: "#00FF00"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0.5
|
||||
color: "#00FFFF"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0.33
|
||||
color: "#0000FF"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0.16
|
||||
color: "#FF00FF"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#FF0000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
visible: optRgb.checked
|
||||
|
||||
Label {
|
||||
text: qsTr("Red")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: sliderRed
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 255
|
||||
value: 0
|
||||
onValueChanged: {
|
||||
if (!updatingControls)
|
||||
setCurrentColor();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Green")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: sliderGreen
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 255
|
||||
value: 0
|
||||
onValueChanged: {
|
||||
if (!updatingControls)
|
||||
setCurrentColor();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Blue")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: sliderBlue
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 255
|
||||
value: 0
|
||||
onValueChanged: {
|
||||
if (!updatingControls)
|
||||
setCurrentColor();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: 25
|
||||
Layout.maximumHeight: 25
|
||||
border.color: BppMetrics.accentColor
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 1
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
model: commonColors
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: modelData
|
||||
border.color: "gray"
|
||||
border.width: 0
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onPressed: {
|
||||
initColorRGB(parent.color.r * 255, parent.color.g * 255, parent.color.b * 255, 255);
|
||||
}
|
||||
onEntered: {
|
||||
border.width = 1;
|
||||
var compColor = Qt.rgba(1, 1, 1, 1);
|
||||
if (color.hsvValue > 0.5)
|
||||
compColor = Qt.rgba(0, 0, 0, 1);
|
||||
|
||||
border.color = compColor;
|
||||
}
|
||||
onExited: {
|
||||
border.width = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Canvas {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 30
|
||||
onPaint: {
|
||||
var ctx = getContext('2d');
|
||||
drawChecker(ctx, width, height);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
border.color: BppMetrics.accentColor
|
||||
|
||||
Shape {
|
||||
id: shpAlpha
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.margins: 0
|
||||
y: 90
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 1
|
||||
strokeColor: "black"
|
||||
|
||||
PathSvg {
|
||||
path: "M0,0 L30,0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 2
|
||||
strokeColor: BppMetrics.accentColor
|
||||
fillColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "M0,-5 L30,-5 L30,4 L0,4z"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPositionChanged: handleMouseVertSlider(mouse, shpAlpha, height)
|
||||
onPressed: handleMouseVertSlider(mouse, shpAlpha, height)
|
||||
}
|
||||
|
||||
gradient: Gradient {
|
||||
//GradientStop { position: 0.0; color: "#FF000000" }
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: Qt.rgba(currentColor.r, currentColor.g, currentColor.b, 1)
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.minimumWidth: 70
|
||||
Layout.maximumWidth: 70
|
||||
|
||||
//spacing: 0
|
||||
Canvas {
|
||||
Layout.fillWidth: true
|
||||
height: 35
|
||||
onPaint: {
|
||||
var ctx = getContext('2d');
|
||||
drawChecker(ctx, width, height);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
border.color: BppMetrics.accentColor
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 1
|
||||
spacing: 0
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: Qt.rgba(currentColor.r, currentColor.g, currentColor.b, 1)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: currentColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
RadioButton {
|
||||
id: optRgb
|
||||
|
||||
padding: 0
|
||||
text: qsTr("RGB")
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
onCheckedChanged: initColorRGB(currentColor.r * 255, currentColor.g * 255, currentColor.b * 255, currentColor.a * 255)
|
||||
|
||||
contentItem: Text {
|
||||
text: optRgb.text
|
||||
color: BppMetrics.textColor
|
||||
font.bold: true
|
||||
leftPadding: optRgb.indicator.width + optRgb.spacing
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RadioButton {
|
||||
id: optHsv
|
||||
|
||||
padding: 0
|
||||
text: qsTr("HSV")
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
checked: true
|
||||
focus: true
|
||||
onCheckedChanged: initColorRGB(currentColor.r * 255, currentColor.g * 255, currentColor.b * 255, currentColor.a * 255)
|
||||
|
||||
contentItem: Text {
|
||||
text: optHsv.text
|
||||
color: BppMetrics.textColor
|
||||
font.bold: true
|
||||
leftPadding: optHsv.indicator.width + optHsv.spacing
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optRgb.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("R:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.r * 255)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optRgb.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("G:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.g * 255)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optRgb.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("B:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.b * 255)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optHsv.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("H:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.hsvHue * 360)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optHsv.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("S:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.hsvSaturation * 100)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: optHsv.checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("V:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.hsvValue * 100)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
//Label { text: qsTr("Alpha"); color: BppMetrics.textColor; font.bold: true; Layout.alignment: Qt.AlignLeft }
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
text: qsTr("Alpha:")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Math.floor(currentColor.a * 255)
|
||||
Layout.fillWidth: true
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 0
|
||||
|
||||
Label {
|
||||
text: qsTr("#")
|
||||
color: BppMetrics.textColor
|
||||
}
|
||||
|
||||
TextInput {
|
||||
id: hexColor
|
||||
|
||||
Layout.fillWidth: true
|
||||
text: "FF0099"
|
||||
inputMask: "HHHHHH"
|
||||
selectByMouse: true
|
||||
color: BppMetrics.textColor
|
||||
onTextChanged: {
|
||||
if (!hexColor.focus)
|
||||
return ;
|
||||
|
||||
if (!updatingControls && acceptableInput) {
|
||||
//console.log('updating', rgbColor.r, currentColor.r * 255, rgbColor.g, currentColor.g * 255, rgbColor.b, currentColor.b * 255)
|
||||
|
||||
var rgbColor = hexToRgb(text);
|
||||
if (rgbColor && rgbColor.r !== Math.floor(currentColor.r * 255) && rgbColor.g !== Math.floor(currentColor.g * 255) && rgbColor.b !== Math.floor(currentColor.b * 255))
|
||||
initColorRGB(rgbColor.r, rgbColor.g, rgbColor.b, currentColor.a * 255);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
29
ScreenPlayUtil/qml/Dialog.qml
Normal file
@ -0,0 +1,29 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Dialog {
|
||||
id: root
|
||||
property Item modalSource
|
||||
dim: true
|
||||
anchors.centerIn: Overlay.overlay
|
||||
modal: true
|
||||
focus: true
|
||||
|
||||
|
||||
|
||||
Overlay.modal: ModalBackgroundBlur {
|
||||
id: blurBg
|
||||
sourceItem: root.modalSource
|
||||
hideSource: root.hideSource
|
||||
}
|
||||
// Workaround for missing animation on hide
|
||||
// when using hideSource
|
||||
property bool hideSource: true
|
||||
onAboutToHide: root.hideSource = false
|
||||
onAboutToShow: root.hideSource = true
|
||||
}
|
69
ScreenPlayUtil/qml/Dialogs/CriticalError.qml
Normal file
@ -0,0 +1,69 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Window
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Common.Dialog {
|
||||
id: root
|
||||
|
||||
property ApplicationWindow window
|
||||
property string message
|
||||
standardButtons: Dialog.Ok | Dialog.Help
|
||||
onHelpRequested: {
|
||||
Qt.openUrlExternally(
|
||||
"https://forum.screen-play.app/category/7/troubleshooting")
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onDisplayErrorPopup(msg) {
|
||||
root.message = msg
|
||||
root.window.show()
|
||||
root.open()
|
||||
}
|
||||
|
||||
target: ScreenPlay.screenPlayManager
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
width: 600
|
||||
height: 400
|
||||
|
||||
ColumnLayout {
|
||||
anchors.margins: 20
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: 150
|
||||
Layout.preferredHeight: 150
|
||||
source: "qrc:/ScreenPlayWorkshop/assets/icons/exclamation-triangle-solid.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
layer {
|
||||
enabled: true
|
||||
|
||||
effect: ColorOverlay {
|
||||
color: Material.color(Material.DeepOrange)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: root.message
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.margins: 20
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 16
|
||||
color: Material.primaryTextColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
48
ScreenPlayUtil/qml/Dialogs/MonitorConfiguration.qml
Normal file
@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Common.Dialog {
|
||||
id: root
|
||||
|
||||
standardButtons: Dialog.Ok
|
||||
contentHeight: 250
|
||||
|
||||
Connections {
|
||||
function onMonitorConfigurationChanged() {
|
||||
root.open()
|
||||
}
|
||||
|
||||
target: ScreenPlay.monitorListModel
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
ColumnLayout {
|
||||
anchors.margins: 20
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: 150
|
||||
Layout.preferredHeight: 150
|
||||
source: "qrc:/assets/icons/monitor_setup.svg"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Your monitor setup changed!\n Please configure your wallpaper again.")
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 16
|
||||
color: Material.primaryTextColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
ScreenPlayUtil/qml/Dialogs/SteamNotAvailable.qml
Normal file
@ -0,0 +1,11 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayUtil 1.0 as Common
|
||||
|
||||
Common.Dialog {
|
||||
id: root
|
||||
|
||||
standardButtons: Dialog.Ok
|
||||
title: qsTr("Could not load steam integration!")
|
||||
}
|
199
ScreenPlayUtil/qml/FileSelector.qml
Normal file
@ -0,0 +1,199 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlay 1.0
|
||||
|
||||
/*!
|
||||
\qmltype Image Selector
|
||||
\brief A image selector with popup preview.
|
||||
|
||||
Test
|
||||
|
||||
\image rootPreview.png
|
||||
|
||||
\section1 Setting default text and capitalization
|
||||
|
||||
Test
|
||||
|
||||
\qml
|
||||
root {
|
||||
|
||||
}
|
||||
\endqml
|
||||
|
||||
*/
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string file
|
||||
property alias placeHolderText: txtPlaceholder.text
|
||||
property alias fileDialog: fileDialog
|
||||
|
||||
height: 65
|
||||
implicitWidth: 300
|
||||
state: "nothingSelected"
|
||||
onFileChanged: {
|
||||
if (file === "") {
|
||||
txtName.text = "";
|
||||
root.state = "nothingSelected";
|
||||
} else {
|
||||
root.state = "imageSelected";
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 3
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtPlaceholder
|
||||
|
||||
clip: true
|
||||
font.pointSize: 12
|
||||
font.family: ScreenPlay.settings.font
|
||||
wrapMode: Text.WordWrap
|
||||
color: Material.secondaryTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: btnClear.left
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtName
|
||||
|
||||
clip: true
|
||||
font.pointSize: 12
|
||||
font.family: ScreenPlay.settings.font
|
||||
wrapMode: Text.WordWrap
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: Material.secondaryTextColor
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: btnClear.left
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnClear
|
||||
|
||||
text: qsTr("Clear")
|
||||
Material.background: Material.theme === Material.Light ? Qt.lighter(Material.accent) : Qt.darker(Material.accent)
|
||||
Material.foreground: "white"
|
||||
onClicked: {
|
||||
root.file = "";
|
||||
fileDialog.file = "";
|
||||
}
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: btnOpen.left
|
||||
bottom: parent.bottom
|
||||
margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnOpen
|
||||
|
||||
text: qsTr("Select File")
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
onClicked: fileDialog.open()
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
bottom: parent.bottom
|
||||
margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
|
||||
title: qsTr("Please choose a file")
|
||||
onAccepted: {
|
||||
root.file = fileDialog.currentFile ;
|
||||
txtName.text = fileDialog.currentFile.toString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "imageSelected"
|
||||
|
||||
PropertyChanges {
|
||||
target: btnClear
|
||||
opacity: 1
|
||||
anchors.topMargin: 5
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: txtPlaceholder
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "nothingSelected"
|
||||
|
||||
PropertyChanges {
|
||||
target: btnClear
|
||||
opacity: 0
|
||||
anchors.topMargin: -40
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "imageSelected"
|
||||
to: "nothingSelected"
|
||||
reversible: true
|
||||
|
||||
PropertyAnimation {
|
||||
target: btnClear
|
||||
properties: "opacity, anchors.topMargin"
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: txtPlaceholder
|
||||
property: "opacity"
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
55
ScreenPlayUtil/qml/Grow.qml
Normal file
@ -0,0 +1,55 @@
|
||||
import QtQuick
|
||||
|
||||
Scale {
|
||||
id: root
|
||||
|
||||
property int offset: 0
|
||||
property int loopOffset: 1000
|
||||
property int loops: 1
|
||||
property real cScale: 1.5
|
||||
property alias centerX: root.origin.x
|
||||
property alias centerY: root.origin.y
|
||||
property SequentialAnimation grow
|
||||
|
||||
function start(offset = 0, loopOffset = 1000, scale = 1.5, loops = 1) {
|
||||
root.offset = offset;
|
||||
root.loopOffset = loopOffset;
|
||||
root.loops = loops;
|
||||
root.cScale = scale;
|
||||
grow.restart();
|
||||
}
|
||||
|
||||
grow: SequentialAnimation {
|
||||
loops: root.loops
|
||||
alwaysRunToEnd: true
|
||||
|
||||
PauseAnimation {
|
||||
duration: root.offset
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
properties: "xScale,yScale"
|
||||
from: 1
|
||||
to: root.cScale
|
||||
duration: 200
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
properties: "xScale,yScale"
|
||||
from: root.cScale
|
||||
to: 1
|
||||
duration: 300
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PauseAnimation {
|
||||
duration: root.loopOffset
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
72
ScreenPlayUtil/qml/GrowIconLink.qml
Normal file
@ -0,0 +1,72 @@
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property alias iconSource: icon.source
|
||||
property string url
|
||||
property alias color: overlay.color
|
||||
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
width: 42
|
||||
height: width
|
||||
radius: width
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
|
||||
sourceSize: Qt.size(28, 28)
|
||||
anchors.centerIn: parent
|
||||
visible: false
|
||||
smooth: true
|
||||
source: "qrc:/assets/icons/icon_info.svg"
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
id: overlay
|
||||
|
||||
anchors.fill: icon
|
||||
source: icon
|
||||
color: Material.accent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: Qt.openUrlExternally(url)
|
||||
onEntered: root.state = "hover"
|
||||
onExited: root.state = ""
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
|
||||
PropertyChanges {
|
||||
target: icon
|
||||
width: 34
|
||||
height: 34
|
||||
sourceSize: Qt.size(34, 34)
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "hover"
|
||||
reversible: true
|
||||
|
||||
PropertyAnimation {
|
||||
target: icon
|
||||
properties: "width,height,sourceSize"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
34
ScreenPlayUtil/qml/Headline.qml
Normal file
@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property alias text: txtHeadline.text
|
||||
|
||||
height: 40
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
|
||||
font.pointSize: 18
|
||||
color: Material.primaryTextColor
|
||||
text: "Headline"
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
height: 2
|
||||
width: parent.width
|
||||
color: Material.secondaryTextColor
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
10
ScreenPlayUtil/qml/HeadlineSection.qml
Normal file
@ -0,0 +1,10 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Text {
|
||||
text: qsTr("Headline Section")
|
||||
font.pointSize: 14
|
||||
color: Material.primaryTextColor
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
254
ScreenPlayUtil/qml/ImageSelector.qml
Normal file
@ -0,0 +1,254 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlay 1.0
|
||||
|
||||
/*!
|
||||
\qmltype Image Selector
|
||||
\brief A image selector with popup preview.
|
||||
|
||||
Test
|
||||
|
||||
\image rootPreview.png
|
||||
|
||||
\section1 Setting default text and capitalization
|
||||
|
||||
Test
|
||||
|
||||
\qml
|
||||
root {
|
||||
|
||||
}
|
||||
\endqml
|
||||
|
||||
*/
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string imageSource
|
||||
property alias placeHolderText: txtPlaceholder.text
|
||||
|
||||
height: 70
|
||||
width: parent.width
|
||||
state: "nothingSelected"
|
||||
onImageSourceChanged: {
|
||||
if (imageSource === "") {
|
||||
img.source = "";
|
||||
txtName.text = "";
|
||||
root.state = "nothingSelected";
|
||||
} else {
|
||||
img.source = imageSource;
|
||||
root.state = "imageSelected";
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 3
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: imgWrapper
|
||||
|
||||
width: 70
|
||||
radius: 3
|
||||
clip: true
|
||||
color: Material.color(Material.Grey, Material.Shade700)
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
Image {
|
||||
id: img
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if (imageSource !== "")
|
||||
popup.open();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Popup {
|
||||
id: popup
|
||||
|
||||
width: 902
|
||||
modal: true
|
||||
anchors.centerIn: Overlay.overlay
|
||||
height: 507
|
||||
|
||||
Image {
|
||||
source: imageSource
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: popup.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtPlaceholder
|
||||
|
||||
clip: true
|
||||
font.pointSize: 12
|
||||
font.capitalization: Font.Capitalize
|
||||
text: qsTr("Set your own preview image")
|
||||
font.family: ScreenPlay.settings.font
|
||||
wrapMode: Text.WordWrap
|
||||
color: Material.secondaryTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: imgWrapper.right
|
||||
right: btnClear.left
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtName
|
||||
|
||||
clip: true
|
||||
font.pointSize: 12
|
||||
font.family: ScreenPlay.settings.font
|
||||
wrapMode: Text.WordWrap
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: Material.secondaryTextColor
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: imgWrapper.right
|
||||
right: btnClear.left
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnClear
|
||||
|
||||
text: qsTr("Clear")
|
||||
Material.background: Material.theme === Material.Light ? Qt.lighter(Material.accent) : Qt.darker(Material.accent)
|
||||
Material.foreground: "white"
|
||||
onClicked: imageSource = ""
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: btnOpen.left
|
||||
bottom: parent.bottom
|
||||
margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnOpen
|
||||
|
||||
text: qsTr("Select Preview Image")
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
font.family: ScreenPlay.settings.font
|
||||
onClicked: fileDialog.open()
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
bottom: parent.bottom
|
||||
margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
|
||||
title: "Please choose a file"
|
||||
nameFilters: ["Images (*.png *.jpg)"]
|
||||
onAccepted: {
|
||||
imageSource = fileDialog.fileUrl;
|
||||
txtName.text = fileDialog.fileUrl.toString().replace(/^.*[\\\/]/, '');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "imageSelected"
|
||||
|
||||
PropertyChanges {
|
||||
target: btnClear
|
||||
opacity: 1
|
||||
anchors.topMargin: 5
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: txtPlaceholder
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "nothingSelected"
|
||||
|
||||
PropertyChanges {
|
||||
target: btnClear
|
||||
opacity: 0
|
||||
anchors.topMargin: -40
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "imageSelected"
|
||||
to: "nothingSelected"
|
||||
reversible: true
|
||||
|
||||
PropertyAnimation {
|
||||
target: btnClear
|
||||
properties: "opacity, anchors.topMargin"
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: txtPlaceholder
|
||||
property: "opacity"
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
25
ScreenPlayUtil/qml/JSUtil.js
Normal file
@ -0,0 +1,25 @@
|
||||
function isWallpaper(type) {
|
||||
return type === InstalledType.VideoWallpaper
|
||||
|| type === InstalledType.HTMLWallpaper
|
||||
|| type === InstalledType.QMLWallpaper
|
||||
|| type === InstalledType.GifWallpaper
|
||||
|| type === InstalledType.WebsiteWallpaper
|
||||
|| type === InstalledType.GodotWallpaper
|
||||
}
|
||||
|
||||
function isWidget(type) {
|
||||
return type === InstalledType.HTMLWidget || type === InstalledType.QMLWidget
|
||||
}
|
||||
|
||||
function isScene(type) {
|
||||
return type === InstalledType.HTMLWallpaper
|
||||
|| type === InstalledType.QMLWallpaper
|
||||
|| type === InstalledType.WebsiteWallpaper
|
||||
|| type === InstalledType.GodotWallpaper
|
||||
}
|
||||
|
||||
function isVideo(type) {
|
||||
return type === InstalledType.VideoWallpaper
|
||||
|| type === InstalledType.GifWallpaper
|
||||
}
|
||||
|
106
ScreenPlayUtil/qml/LicenseSelector.qml
Normal file
@ -0,0 +1,106 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
property string name: licenseModel.get(cb.currentIndex).name
|
||||
property string licenseFile: licenseModel.get(cb.currentIndex).licenseFile
|
||||
|
||||
Layout.preferredWidth: 250
|
||||
|
||||
HeadlineSection {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("License")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
spacing: 5
|
||||
|
||||
ComboBox {
|
||||
id: cb
|
||||
|
||||
Layout.fillWidth: true
|
||||
textRole: "name"
|
||||
|
||||
model: ListModel {
|
||||
id: licenseModel
|
||||
|
||||
ListElement {
|
||||
name: "Creative Commons - Attribution-ShareAlike 4.0"
|
||||
description: qsTr("Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material for any purpose, even commercially.")
|
||||
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-sharealike-4.0-international-(cc-by-sa-4.0)"
|
||||
licenseFile: "License_CC_Attribution-ShareAlike_4.0.txt"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Creative Commons - Attribution 4.0"
|
||||
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"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Creative Commons - Attribution-NonCommercial-ShareAlike 4.0"
|
||||
description: qsTr("Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material. You are not allowed to use it commercially! ")
|
||||
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-noncommercial-sharealike-4.0-international-(cc-by-nc-sa-4.0)"
|
||||
licenseFile: "License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Creative Commons - CC0 1.0 Universal Public Domain"
|
||||
description: qsTr("You allow everyone to do anything with your work.")
|
||||
tldrlegal: "https://tldrlegal.com/license/creative-commons-cc0-1.0-universal"
|
||||
licenseFile: "License_CC0_1.0.txt"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Open Source - Apache License 2.0"
|
||||
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"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Open Source - General Public License 3.0"
|
||||
description: qsTr("You grant other to remix your work but it must remain under the GPLv3. We recommend this license for all code wallpaper!")
|
||||
tldrlegal: "https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)"
|
||||
licenseFile: "License_GPL_3.0.txt"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "All rights reserved"
|
||||
description: qsTr("You do not share any rights and nobody is allowed to use or remix it (Not recommended). Can also used to credit work others.")
|
||||
tldrlegal: "License_All_Rights_Reserved_1.0.txt"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
icon.source: "qrc:/assets/icons/icon_help_center.svg"
|
||||
icon.color: Material.iconColor
|
||||
onClicked: toolTip.open()
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
icon.source: "qrc:/assets/icons/icon_open_in_new.svg"
|
||||
icon.color: Material.iconColor
|
||||
onClicked: Qt.openUrlExternally(licenseModel.get(cb.currentIndex).tldrlegal)
|
||||
}
|
||||
|
||||
ToolTip {
|
||||
id: toolTip
|
||||
|
||||
text: licenseModel.get(cb.currentIndex).description
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
27
ScreenPlayUtil/qml/ModalBackgroundBlur.qml
Normal file
@ -0,0 +1,27 @@
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
FastBlur {
|
||||
id: root
|
||||
property Item sourceItem
|
||||
property bool hideSource: true
|
||||
source: ShaderEffectSource {
|
||||
id: effectSource
|
||||
sourceItem: root.sourceItem
|
||||
live: false
|
||||
hideSource: root.hideSource
|
||||
}
|
||||
radius: 64
|
||||
transparentBorder: true
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
opacity: 0.5
|
||||
color: "black"
|
||||
}
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
opacity: 0.1
|
||||
source: "qrc:/assets/images/noisy-texture-3.png"
|
||||
fillMode: Image.Tile
|
||||
}
|
||||
}
|
8
ScreenPlayUtil/qml/MouseHoverBlocker.qml
Normal file
@ -0,0 +1,8 @@
|
||||
import QtQuick
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
enabled: true
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: false
|
||||
}
|
26
ScreenPlayUtil/qml/Popup.qml
Normal file
@ -0,0 +1,26 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
property Item modalSource
|
||||
// Workaround for missing animation on hide
|
||||
// when using hideSource
|
||||
property bool aboutToHide: false
|
||||
dim: true
|
||||
anchors.centerIn: Overlay.overlay
|
||||
modal: true
|
||||
focus: true
|
||||
|
||||
Overlay.modal: ModalBackgroundBlur {
|
||||
id: blurBg
|
||||
sourceItem: root.modalSource
|
||||
hideSource: root.aboutToHide
|
||||
}
|
||||
onAboutToHide: root.aboutToHide = false
|
||||
onClosed: root.aboutToHide = true
|
||||
}
|
120
ScreenPlayUtil/qml/RippleEffect.qml
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Based on:
|
||||
* https://github.com/rschiang/material
|
||||
* (THE BSD 2-CLAUSE LICENSE)
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property alias radius: mask.radius
|
||||
property color color: Material.accent
|
||||
property var target
|
||||
property int duration: 600
|
||||
|
||||
function trigger() {
|
||||
var wave = ripple.createObject(container, {
|
||||
"startX": root.width * 0.5,
|
||||
"startY": root.height * 0.5,
|
||||
"maxRadius": furthestDistance(root.width * 0.5, root.height * 0.5)
|
||||
});
|
||||
}
|
||||
|
||||
function distance(x1, y1, x2, y2) {
|
||||
return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
|
||||
}
|
||||
|
||||
function furthestDistance(x, y) {
|
||||
return Math.max(distance(x, y, 0, 0), distance(x, y, width, height), distance(x, y, 0, height), distance(x, y, width, 0));
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
id: mask
|
||||
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
visible: false
|
||||
}
|
||||
|
||||
Item {
|
||||
id: container
|
||||
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
anchors.fill: parent
|
||||
source: container
|
||||
maskSource: mask
|
||||
}
|
||||
|
||||
Component {
|
||||
id: ripple
|
||||
|
||||
Rectangle {
|
||||
id: ink
|
||||
|
||||
property int startX
|
||||
property int startY
|
||||
property int maxRadius: 150
|
||||
|
||||
function fadeIfApplicable() {
|
||||
if (!fadeAnimation.running)
|
||||
fadeAnimation.start();
|
||||
|
||||
}
|
||||
|
||||
radius: 0
|
||||
opacity: 0.25
|
||||
color: root.color
|
||||
x: startX - radius
|
||||
y: startY - radius
|
||||
width: radius * 2
|
||||
height: radius * 2
|
||||
Component.onCompleted: {
|
||||
growAnimation.start();
|
||||
if (!fadeAnimation.running)
|
||||
fadeAnimation.start();
|
||||
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
id: growAnimation
|
||||
|
||||
target: ink
|
||||
property: "radius"
|
||||
from: 0
|
||||
to: maxRadius
|
||||
duration: 550
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
id: fadeAnimation
|
||||
|
||||
NumberAnimation {
|
||||
target: ink
|
||||
property: "opacity"
|
||||
from: 0.8
|
||||
to: 0
|
||||
duration: root.duration
|
||||
}
|
||||
|
||||
ScriptAction {
|
||||
script: ink.destroy()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
51
ScreenPlayUtil/qml/Search.qml
Normal file
@ -0,0 +1,51 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material 2.0
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
width: 300
|
||||
|
||||
ToolButton {
|
||||
id: icnSearch
|
||||
|
||||
icon.source: "qrc:/assets/icons/icon_search.svg"
|
||||
height: 30
|
||||
width: 30
|
||||
icon.width: 30
|
||||
icon.height: 30
|
||||
icon.color: Material.iconColor
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: txtSearch
|
||||
placeholderTextColor: Material.secondaryTextColor
|
||||
width: 250
|
||||
height: 40
|
||||
color: Material.secondaryTextColor
|
||||
placeholderText: qsTr("Search for Wallpaper & Widgets")
|
||||
onTextChanged: {
|
||||
if (txtSearch.text.length === 0)
|
||||
ScreenPlay.installedListFilter.resetFilter();
|
||||
else
|
||||
ScreenPlay.installedListFilter.sortByName(txtSearch.text);
|
||||
}
|
||||
|
||||
anchors {
|
||||
right: icnSearch.left
|
||||
rightMargin: 10
|
||||
top: parent.top
|
||||
topMargin: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
87
ScreenPlayUtil/qml/Shake.qml
Normal file
@ -0,0 +1,87 @@
|
||||
import QtQuick
|
||||
|
||||
Translate {
|
||||
id: root
|
||||
|
||||
property int offset: 0
|
||||
property int loops: 3
|
||||
property int loopOffset: 1000
|
||||
property SequentialAnimation shake
|
||||
|
||||
function start(offset = 0, loopOffset = 1000, loops = 1) {
|
||||
root.offset = offset;
|
||||
root.loopOffset = loopOffset;
|
||||
root.loops = loops;
|
||||
shake.restart();
|
||||
}
|
||||
|
||||
shake: SequentialAnimation {
|
||||
loops: root.loops
|
||||
alwaysRunToEnd: true
|
||||
|
||||
PauseAnimation {
|
||||
duration: root.offset
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: 0
|
||||
to: 10
|
||||
duration: 50
|
||||
easing.type: Easing.InOutBounce
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: 10
|
||||
to: -10
|
||||
duration: 100
|
||||
easing.type: Easing.InOutBounce
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: -10
|
||||
to: 0
|
||||
duration: 50
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: 0
|
||||
to: 10
|
||||
duration: 50
|
||||
easing.type: Easing.InOutBounce
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: 10
|
||||
to: -10
|
||||
duration: 100
|
||||
easing.type: Easing.InOutBounce
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "x"
|
||||
from: -10
|
||||
to: 0
|
||||
duration: 50
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PauseAnimation {
|
||||
duration: root.loopOffset
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
77
ScreenPlayUtil/qml/Slider.qml
Normal file
@ -0,0 +1,77 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material 2.0 as QQCM
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as QQC
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string headline: "dummyHeandline"
|
||||
property string iconSource: "qrc:/assets/icons/icon_volume.svg"
|
||||
property alias slider: slider
|
||||
|
||||
height: 70
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
|
||||
text: headline
|
||||
height: 20
|
||||
font.pointSize: 14
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: QQCM.Material.primaryTextColor
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 30
|
||||
|
||||
anchors {
|
||||
top: txtHeadline.bottom
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
}
|
||||
|
||||
Image {
|
||||
id: imgIcon
|
||||
|
||||
width: 20
|
||||
height: 20
|
||||
source: iconSource
|
||||
sourceSize: Qt.size(20, 20)
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
QQC.Slider {
|
||||
id: slider
|
||||
|
||||
stepSize: 0.01
|
||||
from: 0
|
||||
value: 1
|
||||
to: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtValue
|
||||
|
||||
color: QQCM.Material.secondaryTextColor
|
||||
text: Math.round(slider.value * 100) / 100
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
font.pointSize: 12
|
||||
font.italic: true
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
98
ScreenPlayUtil/qml/Tag.qml
Normal file
@ -0,0 +1,98 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: tag
|
||||
|
||||
property int itemIndex
|
||||
property alias text: txt.text
|
||||
|
||||
signal removeThis(var index)
|
||||
|
||||
width: textMetrics.width + 20
|
||||
height: 45
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
|
||||
anchors.fill: parent
|
||||
radius: 3
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.background) : Material.background
|
||||
|
||||
Text {
|
||||
id: txt
|
||||
|
||||
text: _name
|
||||
color: Material.primaryTextColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.fill: parent
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: textField
|
||||
|
||||
enabled: false
|
||||
opacity: 0
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
anchors.bottomMargin: 0
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
||||
|
||||
TextMetrics {
|
||||
id: textMetrics
|
||||
|
||||
text: txt.text
|
||||
font.pointSize: 14
|
||||
font.family: ScreenPlay.settings.font
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: ma
|
||||
|
||||
width: 10
|
||||
height: width
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
tag.removeThis(itemIndex);
|
||||
}
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
margins: 5
|
||||
}
|
||||
|
||||
Image {
|
||||
id: name
|
||||
|
||||
anchors.fill: parent
|
||||
source: "qrc:/assets/icons/icon_close.svg"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "edit"
|
||||
|
||||
PropertyChanges {
|
||||
target: txt
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: textField
|
||||
opacity: 1
|
||||
enabled: true
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
207
ScreenPlayUtil/qml/TagSelector.qml
Normal file
@ -0,0 +1,207 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
function getTags() {
|
||||
var array = []
|
||||
for (var i = 0; i < listModel.count; i++) {
|
||||
array.push(listModel.get(i)._name)
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
height: 70
|
||||
implicitWidth: 200
|
||||
onStateChanged: {
|
||||
if (root.state === "add") {
|
||||
btnAdd.text = qsTr("Save")
|
||||
textField.focus = true
|
||||
} else {
|
||||
btnAdd.text = qsTr("Add tag")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||
Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 3
|
||||
}
|
||||
|
||||
ListView {
|
||||
orientation: ListView.Horizontal
|
||||
model: listModel
|
||||
spacing: 10
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: btnAdd.left
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
margins: 10
|
||||
}
|
||||
|
||||
delegate: Tag {
|
||||
id: delegate
|
||||
|
||||
text: _name
|
||||
itemIndex: index
|
||||
|
||||
Connections {
|
||||
function onRemoveThis() {
|
||||
listModel.remove(itemIndex)
|
||||
}
|
||||
|
||||
target: delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: listModel
|
||||
|
||||
onCountChanged: getTags()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: textFieldWrapper
|
||||
|
||||
opacity: 0
|
||||
enabled: false
|
||||
radius: 3
|
||||
height: parent.height - 20
|
||||
width: 200
|
||||
color: Material.theme
|
||||
=== Material.Light ? Qt.lighter(
|
||||
Material.background) : Material.background
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: -80
|
||||
right: btnCancel.left
|
||||
margins: 10
|
||||
}
|
||||
|
||||
Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#FF000000"
|
||||
}
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: textField
|
||||
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: Material.primaryTextColor
|
||||
onTextChanged: {
|
||||
if (textField.length >= 10)
|
||||
textField.text = textField.text
|
||||
}
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
rightMargin: 15
|
||||
leftMargin: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnCancel
|
||||
|
||||
text: qsTr("Cancel")
|
||||
opacity: 0
|
||||
height: parent.height - 20
|
||||
enabled: false
|
||||
Material.accent: Material.color(Material.Red)
|
||||
highlighted: true
|
||||
font.family: ScreenPlay.settings.font
|
||||
onClicked: {
|
||||
root.state = ""
|
||||
textField.clear()
|
||||
}
|
||||
|
||||
anchors {
|
||||
right: btnAdd.left
|
||||
rightMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnAdd
|
||||
|
||||
text: qsTr("Add Tag")
|
||||
height: parent.height - 20
|
||||
Material.accent: Material.color(Material.LightGreen)
|
||||
highlighted: true
|
||||
font.family: ScreenPlay.settings.font
|
||||
onClicked: {
|
||||
if (root.state === "add") {
|
||||
listModel.append({
|
||||
"_name": textField.text
|
||||
})
|
||||
textField.clear()
|
||||
root.state = ""
|
||||
} else {
|
||||
root.state = "add"
|
||||
}
|
||||
}
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "add"
|
||||
|
||||
PropertyChanges {
|
||||
target: textFieldWrapper
|
||||
anchors.topMargin: 10
|
||||
opacity: 1
|
||||
enabled: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: btnCancel
|
||||
opacity: 1
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "add"
|
||||
reversible: true
|
||||
|
||||
NumberAnimation {
|
||||
properties: "anchors.topMargin, opacity"
|
||||
duration: 200
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
179
ScreenPlayUtil/qml/TextField.qml
Normal file
@ -0,0 +1,179 @@
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls as QQC
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property bool required: false
|
||||
property bool dirty: false
|
||||
property alias text: textField.text
|
||||
property alias placeholderText: txtPlaceholder.text
|
||||
|
||||
signal editingFinished()
|
||||
|
||||
height: 55
|
||||
width: 150
|
||||
state: {
|
||||
if (textField.text.length > 0)
|
||||
return "containsTextEditingFinished";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
onEditingFinished: {
|
||||
if (!root.required)
|
||||
return ;
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
id: txtPlaceholder
|
||||
|
||||
text: qsTr("Label")
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: Material.primaryTextColor
|
||||
opacity: 0.4
|
||||
font.pointSize: 11
|
||||
font.weight: Font.Medium
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 15
|
||||
left: parent.left
|
||||
leftMargin: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timerSaveDelay
|
||||
|
||||
interval: 1000
|
||||
onTriggered: root.editingFinished()
|
||||
}
|
||||
|
||||
QQC.TextField {
|
||||
id: textField
|
||||
|
||||
function resetState() {
|
||||
if (textField.text.length === 0)
|
||||
root.state = "";
|
||||
|
||||
textField.focus = false;
|
||||
}
|
||||
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: Material.secondaryTextColor
|
||||
placeholderTextColor: Material.secondaryTextColor
|
||||
width: parent.width
|
||||
Keys.onEscapePressed: resetState()
|
||||
onTextEdited: {
|
||||
timerSaveDelay.start();
|
||||
root.dirty = true;
|
||||
}
|
||||
onEditingFinished: {
|
||||
resetState();
|
||||
if (textField.text.length > 0)
|
||||
root.state = "containsTextEditingFinished";
|
||||
|
||||
}
|
||||
onPressed: {
|
||||
root.state = "containsText";
|
||||
}
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
id: requiredText
|
||||
|
||||
text: qsTr("*Required")
|
||||
visible: root.required
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: Material.secondaryTextColor
|
||||
|
||||
anchors {
|
||||
top: textField.bottom
|
||||
right: textField.right
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: ""
|
||||
|
||||
PropertyChanges {
|
||||
target: txtPlaceholder
|
||||
font.pointSize: 11
|
||||
color: Material.secondaryTextColor
|
||||
anchors.topMargin: 15
|
||||
anchors.leftMargin: 10
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "containsText"
|
||||
|
||||
PropertyChanges {
|
||||
target: txtPlaceholder
|
||||
font.pointSize: 8
|
||||
opacity: 1
|
||||
color: Material.accentColor
|
||||
anchors.topMargin: 0
|
||||
anchors.leftMargin: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "containsTextEditingFinished"
|
||||
|
||||
PropertyChanges {
|
||||
target: txtPlaceholder
|
||||
font.pointSize: 8
|
||||
color: Material.secondaryTextColor
|
||||
opacity: 0.4
|
||||
anchors.topMargin: 0
|
||||
anchors.leftMargin: 0
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "containsText"
|
||||
reversible: true
|
||||
|
||||
PropertyAnimation {
|
||||
target: txtPlaceholder
|
||||
duration: 150
|
||||
easing.type: Easing.InOutQuart
|
||||
properties: "font.pointSize,anchors.topMargin,anchors.leftMargin,opacity,color"
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "containsText"
|
||||
to: "containsTextEditingFinished"
|
||||
reversible: true
|
||||
|
||||
PropertyAnimation {
|
||||
target: txtPlaceholder
|
||||
duration: 150
|
||||
easing.type: Easing.OutSine
|
||||
properties: "color,opacity"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
84
ScreenPlayUtil/qml/TrayIcon.qml
Normal file
@ -0,0 +1,84 @@
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import Qt.labs.platform
|
||||
import ScreenPlay 1.0
|
||||
|
||||
SystemTrayIcon {
|
||||
id: root
|
||||
|
||||
property Window window
|
||||
visible: true
|
||||
icon.source: "qrc:/assets/icons/app.ico"
|
||||
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
||||
onActivated: function (reason) {
|
||||
switch (reason) {
|
||||
case SystemTrayIcon.Unknown:
|
||||
break
|
||||
case SystemTrayIcon.Context:
|
||||
break
|
||||
case SystemTrayIcon.DoubleClick:
|
||||
window.show()
|
||||
break
|
||||
case SystemTrayIcon.Trigger:
|
||||
break
|
||||
case SystemTrayIcon.MiddleClick:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
menu: Menu {
|
||||
MenuItem {
|
||||
text: qsTr("Open ScreenPlay")
|
||||
onTriggered: {
|
||||
window.show()
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
id: miMuteAll
|
||||
|
||||
property bool isMuted: true
|
||||
|
||||
text: qsTr("Mute all")
|
||||
onTriggered: {
|
||||
if (miMuteAll.isMuted) {
|
||||
isMuted = false
|
||||
miMuteAll.text = qsTr("Mute all")
|
||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
||||
"true")
|
||||
} else {
|
||||
isMuted = true
|
||||
miMuteAll.text = qsTr("Unmute all")
|
||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
||||
"false")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
id: miStopAll
|
||||
|
||||
property bool isPlaying: false
|
||||
|
||||
text: qsTr("Pause all")
|
||||
onTriggered: {
|
||||
if (miStopAll.isPlaying) {
|
||||
isPlaying = false
|
||||
miStopAll.text = qsTr("Pause all")
|
||||
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
||||
"isPlaying", "true")
|
||||
} else {
|
||||
isPlaying = true
|
||||
miStopAll.text = qsTr("Play all")
|
||||
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
||||
"isPlaying", "false")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Quit")
|
||||
onTriggered: ScreenPlay.exit()
|
||||
}
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ int main(int argc, char* argv[])
|
||||
if (argumentList.length() == 1) {
|
||||
#if defined(Q_OS_WIN)
|
||||
// WinWindow window1({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
WinWindow window1({ 0, 1, 2 }, "C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/hordemp4", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
WinWindow window1({ 1 }, "C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/26092021185017", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
#elif defined(Q_OS_LINUX)
|
||||
LinuxWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", false, true);
|
||||
#elif defined(Q_OS_OSX)
|
||||
|
@ -23,7 +23,11 @@ find_package(
|
||||
WebChannel
|
||||
Positioning)
|
||||
|
||||
qt_add_resources(RESOURCES Resources.qrc)
|
||||
set(RESOURCES
|
||||
assets/icons/baseline-opacity-24px.svg
|
||||
assets/icons/baseline-settings-20px.svg
|
||||
assets/icons/baseline-close-24px.svg
|
||||
assets/image/noisy-texture-3.png)
|
||||
|
||||
qt_add_executable(
|
||||
${PROJECT_NAME}
|
||||
@ -59,7 +63,9 @@ qt_add_qml_module(
|
||||
OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}
|
||||
QML_FILES
|
||||
${QML})
|
||||
${QML}
|
||||
RESOURCES
|
||||
${RESOURCES})
|
||||
|
||||
if(WIN32)
|
||||
# Disable console window on Windows
|
||||
|
@ -1,8 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>assets/image/noisy-texture-3.png</file>
|
||||
<file>assets/icons/baseline-close-24px.svg</file>
|
||||
<file>assets/icons/baseline-opacity-24px.svg</file>
|
||||
<file>assets/icons/baseline-settings-20px.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -57,7 +57,7 @@ Item {
|
||||
Image {
|
||||
id: bg
|
||||
|
||||
source: "qrc:/assets/image/noisy-texture-3.png"
|
||||
source: "qrc:/ScreenPlayWidget/assets/image/noisy-texture-3.png"
|
||||
anchors.fill: parent
|
||||
opacity: 0.05
|
||||
fillMode: Image.Tile
|
||||
@ -152,7 +152,7 @@ Item {
|
||||
Image {
|
||||
id: imgClose
|
||||
|
||||
source: "qrc:/assets/icons/baseline-close-24px.svg"
|
||||
source: "qrc:/ScreenPlayWidget/assets/icons/baseline-close-24px.svg"
|
||||
anchors.centerIn: parent
|
||||
opacity: 0.15
|
||||
|
||||
|
@ -3,16 +3,34 @@ project(
|
||||
VERSION 0.1
|
||||
LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(
|
||||
Qt6
|
||||
COMPONENTS Quick Widgets Gui
|
||||
COMPONENTS Core Quick
|
||||
REQUIRED)
|
||||
|
||||
set(QML src/TestMain.qml)
|
||||
set(QML
|
||||
src/TestMain.qml
|
||||
qml/Background.qml
|
||||
qml/Forum.qml
|
||||
qml/Navigation.qml
|
||||
qml/PopupOffline.qml
|
||||
qml/ScreenPlayItem.qml
|
||||
qml/ScreenPlayItemImage.qml
|
||||
qml/Sidebar.qml
|
||||
qml/SteamProfile.qml
|
||||
qml/SteamWorkshop.qml
|
||||
qml/SteamWorkshopStartPage.qml
|
||||
qml/upload/PopupSteamWorkshopAgreement.qml
|
||||
qml/upload/UploadProject.qml
|
||||
qml/upload/UploadProjectBigItem.qml
|
||||
qml/upload/UploadProjectItem.qml
|
||||
qml/Workshop.qml
|
||||
qml/WorkshopInstalled.qml
|
||||
qml/WorkshopItem.qml)
|
||||
|
||||
set(SOURCES
|
||||
src/installedlistmodel.cpp
|
||||
@ -36,24 +54,40 @@ set(HEADER
|
||||
src/workshop.h
|
||||
src/workshopitem.h)
|
||||
|
||||
set(RESOURCES
|
||||
assets/icons/icon_download.svg
|
||||
assets/icons/icon_open_in_new.svg
|
||||
assets/icons/icon_plus.svg
|
||||
assets/icons/icon_steam.svg
|
||||
assets/icons/icon_thumb_down.svg
|
||||
assets/icons/icon_thumb_up.svg
|
||||
assets/icons/icon_arrow_left.svg
|
||||
assets/icons/icon_arrow_right.svg
|
||||
assets/icons/icon_search.svg
|
||||
assets/icons/icon_info.svg
|
||||
assets/images/steam_default_avatar.png
|
||||
assets/images/steam_offline.png
|
||||
assets/images/mask_workshop.png)
|
||||
|
||||
set(STEAM_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/SteamSDK/redistributable_bin/")
|
||||
|
||||
if(WIN32)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/Workshop)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME})
|
||||
set(STEAM_LIB "${STEAM_LIB_PATH}/win64/steam_api64.lib")
|
||||
set(STEAM_BIN "${STEAM_LIB_PATH}/win64/steam_api64.dll")
|
||||
elseif(APPLE)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/Workshop)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/${PROJECT_NAME})
|
||||
set(MACOS_FRAMEWORKS_DIR ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/Frameworks/)
|
||||
set(STEAM_LIB "${STEAM_LIB_PATH}/osx/libsteam_api.dylib")
|
||||
set(STEAM_BIN ${STEAM_LIB})
|
||||
elseif(UNIX)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/Workshop)
|
||||
set(WORKSHOP_PLUGIN_DIR ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME})
|
||||
set(STEAM_LIB "${STEAM_LIB_PATH}/linux64/libsteam_api.so")
|
||||
set(STEAM_BIN ${STEAM_LIB})
|
||||
endif()
|
||||
|
||||
qt_add_library(${PROJECT_NAME} STATIC)
|
||||
|
||||
qt_add_library(${PROJECT_NAME} STATIC ${RESOURCES})
|
||||
# Needed by the automatic generated target missing includes
|
||||
# https://github.com/qt/qtdeclarative/blob/7a7064e14f094e843e1ee832cc927e86f887621a/src/qml/Qt6QmlMacros.cmake#L2042
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC src/)
|
||||
@ -69,7 +103,7 @@ target_link_libraries(
|
||||
qt_add_qml_module(
|
||||
${PROJECT_NAME}
|
||||
URI
|
||||
"Workshop"
|
||||
${PROJECT_NAME}
|
||||
OUTPUT_DIRECTORY
|
||||
${WORKSHOP_PLUGIN_DIR}
|
||||
VERSION
|
||||
@ -78,7 +112,9 @@ qt_add_qml_module(
|
||||
${QML}
|
||||
SOURCES
|
||||
${SOURCES}
|
||||
${HEADER})
|
||||
${HEADER}
|
||||
RESOURCES
|
||||
${RESOURCES})
|
||||
|
||||
if(${SCREENPLAY_STEAM})
|
||||
if(APPLE)
|
||||
@ -94,8 +130,16 @@ if(${SCREENPLAY_STEAM})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/steam_appid.txt ${CMAKE_BINARY_DIR}/bin/steam_appid.txt COPYONLY)
|
||||
configure_file(${STEAM_BIN} ${CMAKE_BINARY_DIR}/bin/ COPYONLY)
|
||||
endif()
|
||||
|
||||
if(${SCREENPLAY_TESTS})
|
||||
qt_add_executable(tst_ScreenPlayWorkshop src/TestMain.cpp)
|
||||
target_link_libraries(tst_ScreenPlayWorkshop PRIVATE
|
||||
Qt6::Quick
|
||||
${PROJECT_NAME}plugin
|
||||
ScreenPlayUtilplugin
|
||||
SteamSDK
|
||||
SteamSDKQtEnums)
|
||||
target_compile_definitions(tst_ScreenPlayWorkshop PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if(${SCREENPLAY_TESTS}) qt_add_executable(tst_ScreenPlayWorkshop src/TestMain.cpp) target_link_libraries(tst_ScreenPlayWorkshop PRIVATE
|
||||
# Qt6::Quick ${PROJECT_NAME}plugin) target_compile_definitions(tst_ScreenPlayWorkshop PRIVATE
|
||||
# $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>) endif()
|
||||
|
1
ScreenPlayWorkshop/assets/icons/icon_arrow_left.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path id="ic_keyboard_arrow_right_24px" d="M18.703,20.798l-8.779,-8.798l8.779,-8.797l-2.703,-2.703l-11.5,11.5l11.5,11.5l2.703,-2.702Z" style="fill:#fff;fill-rule:nonzero;"/></svg>
|
After Width: | Height: | Size: 625 B |
1
ScreenPlayWorkshop/assets/icons/icon_arrow_right.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path id="ic_keyboard_arrow_right_24px" d="M4.5,20.798l8.778,-8.798l-8.778,-8.797l2.703,-2.703l11.5,11.5l-11.5,11.5l-2.703,-2.702Z" style="fill:#fff;fill-rule:nonzero;"/></svg>
|
After Width: | Height: | Size: 622 B |
1
ScreenPlayWorkshop/assets/icons/icon_download.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 10 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path id="download" d="M0,11l9.059,0l0,-1.294l-9.059,0m9.059,-5.824l-2.588,0l0,-3.882l-3.883,0l0,3.882l-2.588,0l4.529,4.53l4.53,-4.53Z" style="fill:#767676;fill-rule:nonzero;"/></svg>
|
After Width: | Height: | Size: 593 B |
4
ScreenPlayWorkshop/assets/icons/icon_info.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 320 B |
4
ScreenPlayWorkshop/assets/icons/icon_open_in_new.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 294 B |
9
ScreenPlayWorkshop/assets/icons/icon_plus.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-0.330952,-1.331)">
|
||||
<g id="fi-plus" transform="matrix(0.211563,0,0,0.211563,-2.57825,-1.57799)">
|
||||
<path d="M84.437,39.721L60.273,39.721L60.273,15.563C60.272,14.569 59.455,13.751 58.461,13.75L41.536,13.75C40.542,13.751 39.724,14.569 39.724,15.563L39.723,39.723L15.564,39.722C14.603,39.722 13.752,40.573 13.751,41.535L13.751,58.462C13.751,59.455 14.568,60.272 15.561,60.272L39.724,60.272L39.724,84.437C39.725,85.431 40.543,86.249 41.537,86.25L58.46,86.25C59.455,86.25 60.273,85.432 60.273,84.437L60.273,60.273L84.436,60.272C84.437,60.272 84.438,60.272 84.439,60.272C85.432,60.272 86.249,59.455 86.249,58.462C86.249,58.461 86.249,58.46 86.249,58.459L86.25,41.534C86.25,40.539 85.432,39.721 84.437,39.721Z" style="fill:rgb(190,190,190);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
11
ScreenPlayWorkshop/assets/icons/icon_search.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-776.26,-293.26)">
|
||||
<g transform="matrix(1,0,0,1,0,0.25)">
|
||||
<g id="ic_search_24px" transform="matrix(1,0,0,1,773.26,290.01)">
|
||||
<path d="M15.5,14L14.71,14L14.43,13.73C15.444,12.554 16.001,11.052 16,9.5C16,5.934 13.066,3 9.5,3C5.934,3 3,5.934 3,9.5C3,13.066 5.934,16 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71L14,15.5L19,20.49L20.49,19L15.5,14L15.5,14ZM9.5,14C7.01,14 5,11.99 5,9.5C5,7.01 7.01,5 9.5,5C11.99,5 14,7.01 14,9.5C14,11.99 11.99,14 9.5,14Z" style="fill:rgb(190,190,190);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
1
ScreenPlayWorkshop/assets/icons/icon_steam.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path id="steam-square" d="M413.982,173.02c0,-35.325 -28.99,-64.336 -64.656,-64.336c-35.326,0 -64.336,28.99 -64.336,64.336c0,35.667 28.989,64.336 64.336,64.336c35.666,0 64.656,-28.669 64.656,-64.336Zm-203.312,195.995c0,36.669 -29.33,65.999 -65.999,65.999c-25.342,0 -47.335,-14.334 -58.321,-35.325c11.007,4.331 21.673,8.661 32.659,13.333c26.664,10.665 57.339,-2.326 68.325,-29.331c10.666,-26.665 -2.325,-57.34 -29.331,-67.984l-27.326,-11.007c4.33,-1.003 9.343,-1.664 13.994,-1.664c36.669,0 65.999,29.331 65.999,66l0,-0.021Zm301.309,-272.98l0,319.973c0,52.988 -43.005,95.992 -95.992,95.992l-319.974,0c-52.987,0 -95.992,-43.004 -95.992,-95.992l0,-51.004l57.34,22.996c8.66,40.338 44.668,70.671 87.331,70.671c46.652,0 84.985,-35.666 89.336,-80.996l114.999,-84.003c66.661,0 120.331,-53.991 120.331,-119.99c0,-66.662 -53.67,-120.332 -120.331,-120.332c-65.659,0 -119.329,53.329 -119.99,118.988l-75.002,107.319c-3.008,-0.342 -5.994,-0.342 -9.343,-0.342c-16.66,0 -32.339,4.331 -45.671,12.33l-99,-39.655l0,-155.998c0,-52.988 43.005,-95.992 95.992,-95.992l319.974,0c52.987,0 95.992,43.004 95.992,95.992l0,0.043Zm-82.319,77.668c0,44.327 -35.986,80.334 -80.654,80.334c-44.327,0 -80.335,-35.986 -80.335,-80.334c0,-44.668 35.986,-80.655 80.335,-80.655c44.668,0 80.654,35.987 80.654,80.655Z" style="fill:#bebebe;fill-rule:nonzero;"/></svg>
|
After Width: | Height: | Size: 1.7 KiB |
1
ScreenPlayWorkshop/assets/icons/icon_thumb_down.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15z"/></svg>
|
After Width: | Height: | Size: 401 B |
1
ScreenPlayWorkshop/assets/icons/icon_thumb_up.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M24 24H0V0h24v24z" fill="none"/><path d="M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"/></svg>
|
After Width: | Height: | Size: 408 B |
BIN
ScreenPlayWorkshop/assets/images/mask_workshop.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
ScreenPlayWorkshop/assets/images/steam_default_avatar.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
ScreenPlayWorkshop/assets/images/steam_offline.png
Normal file
After Width: | Height: | Size: 56 KiB |
@ -37,7 +37,7 @@ Rectangle {
|
||||
id: maskSource
|
||||
|
||||
visible: false
|
||||
source: "qrc:/assets/images/mask_workshop.png"
|
||||
source: "qrc:/ScreenPlayWorkshop/assets/images/mask_workshop.png"
|
||||
}
|
||||
|
||||
Image {
|
@ -36,7 +36,6 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 10
|
||||
font.family: ScreenPlay.settings.font
|
||||
color: Material.secondaryTextColor
|
||||
}
|
||||
Button {
|
@ -3,8 +3,7 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlayWorkshop 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@ -33,7 +32,6 @@ Rectangle {
|
||||
|
||||
font.pointSize: 14
|
||||
color: Material.primaryTextColor
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.weight: Font.Thin
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
@ -80,14 +78,14 @@ Rectangle {
|
||||
Image {
|
||||
id: avatarPlaceholder
|
||||
anchors.fill: avatar
|
||||
source: "qrc:/assets/icons/steam_default_avatar.png"
|
||||
source: "qrc:/ScreenPlayWorkshop/assets/images/steam_default_avatar.png"
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnUplaod
|
||||
|
||||
text: qsTr("Upload to the Steam Workshop")
|
||||
icon.source: "qrc:/assets/icons/icon_plus.svg"
|
||||
icon.source: "qrc:/ScreenPlayWorkshop/assets/icons/icon_plus.svg"
|
||||
icon.color: "white"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
@ -3,9 +3,8 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
import "../Common"
|
||||
import ScreenPlayWorkshop 1.0
|
||||
|
||||
|
||||
Popup {
|
||||
id: popupOffline
|
||||
@ -23,9 +22,9 @@ Popup {
|
||||
required property ScreenPlayWorkshop workshop
|
||||
required property SteamWorkshop steam
|
||||
required property Item modalSource
|
||||
Overlay.modal: ModalBackgroundBlur {
|
||||
sourceItem: root.modalSource
|
||||
}
|
||||
// Overlay.modal: ModalBackgroundBlur {
|
||||
// sourceItem: root.modalSource
|
||||
// }
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
@ -37,12 +36,11 @@ Popup {
|
||||
}
|
||||
|
||||
Image {
|
||||
source: "qrc:/assets/images/steam_offline.png"
|
||||
source: "qrc:/ScreenPlayWorkshop/assets/images/steam_offline.png"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 16
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
@ -52,7 +50,6 @@ Popup {
|
||||
steam.steamErrorRestart).arg(steam.steamErrorAPIInit)
|
||||
}
|
||||
Text {
|
||||
font.family: ScreenPlay.settings.font
|
||||
font.pointSize: 12
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.alignment: Qt.AlignHCenter
|
@ -138,7 +138,7 @@ Item {
|
||||
Image {
|
||||
id: mask
|
||||
|
||||
source: "qrc:/assets/images/window.svg"
|
||||
source: "qrc:/ScreenPlayWorkshop/assets/images/window.svg"
|
||||
sourceSize: Qt.size(screenPlayItem.width, screenPlayItem.height)
|
||||
visible: false
|
||||
smooth: true
|