mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 04:02:50 +01:00
Fix InstalledDrawer setWallpaperAtTimelineIndex incorrect index
Formatting
This commit is contained in:
parent
d88859927d
commit
59ce122225
@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
TabButton {
|
||||
id: control
|
||||
|
||||
@ -66,6 +65,5 @@ TabButton {
|
||||
}
|
||||
}
|
||||
|
||||
background: Item {
|
||||
}
|
||||
background: Item {}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -6,7 +6,6 @@ import QtQuick.Layouts
|
||||
import QtQml.XmlListModel
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -25,7 +25,6 @@ Item {
|
||||
return hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0');
|
||||
}
|
||||
|
||||
|
||||
property real lineMinimum: .5
|
||||
property real lineMaximum: .5
|
||||
property bool isLast: false
|
||||
@ -54,7 +53,7 @@ Item {
|
||||
text: root.timeString
|
||||
color: "white"
|
||||
visible: !root.isLast
|
||||
anchors{
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: -20
|
||||
@ -71,8 +70,8 @@ Item {
|
||||
minimum: root.lineMinimum
|
||||
maximum: root.lineMaximum
|
||||
onActiveValueChanged: delta => {
|
||||
root.handleMoved(root)
|
||||
}
|
||||
root.handleMoved(root);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ Rectangle {
|
||||
id: text
|
||||
color: "white"
|
||||
//text: root.index
|
||||
anchors{
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 10
|
||||
@ -27,15 +27,14 @@ Rectangle {
|
||||
color: "gold"
|
||||
anchors.fill: parent
|
||||
visible: root.selected
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: indicatorLineVertical
|
||||
width: 5
|
||||
height: 30
|
||||
color: root.selected ? "gold" : parent.color
|
||||
anchors{
|
||||
color: root.selected ? "gold" : parent.color
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.bottom
|
||||
topMargin: 0
|
||||
@ -50,7 +49,7 @@ Rectangle {
|
||||
border.width: root.selected ? 2 : 0
|
||||
border.color: "gold"
|
||||
color: parent.color
|
||||
anchors{
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: indicatorLineVertical.bottom
|
||||
topMargin: -1
|
||||
@ -58,27 +57,26 @@ Rectangle {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked:{
|
||||
root.lineSelected(root.index)
|
||||
onClicked: {
|
||||
root.lineSelected(root.index);
|
||||
}
|
||||
}
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: root.index + " - "+ root.identifier
|
||||
text: root.index + " - " + root.identifier
|
||||
}
|
||||
}
|
||||
ToolButton {
|
||||
text:"❌"
|
||||
text: "❌"
|
||||
visible: !root.isLast
|
||||
enabled: visible
|
||||
onClicked: root.remove(root.index)
|
||||
font.pointSize: 10
|
||||
|
||||
|
||||
anchors{
|
||||
anchors {
|
||||
left: background.right
|
||||
bottom: background.top
|
||||
margins: - 20
|
||||
margins: -20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ Dialog {
|
||||
id: txtHeadline
|
||||
|
||||
y: 80
|
||||
text: qsTr("✅ 3D Wallpaper\n✅ Wallpaper Timeline")
|
||||
text: qsTr("✅ 3D Wallpaper\n✅ Wallpaper Timeline")
|
||||
font.family: App.settings.font
|
||||
font.capitalization: Font.Capitalize
|
||||
wrapMode: Text.WordWrap
|
||||
@ -122,14 +122,14 @@ Dialog {
|
||||
font.pointSize: 16
|
||||
width: implicitWidth + 20
|
||||
height: implicitHeight + 10
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
|
||||
icon.width: 18
|
||||
icon.height: 18
|
||||
onClicked: {
|
||||
if (App.globalVariables.isSteamVersion()) {
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/")
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/");
|
||||
} else {
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/")
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/");
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +306,6 @@ Dialog {
|
||||
duration: 1500
|
||||
easing.type: Easing.OutBack
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
import ScreenPlayUtil
|
||||
|
||||
|
||||
Control {
|
||||
id: root
|
||||
height: 160
|
||||
@ -16,24 +15,19 @@ Control {
|
||||
|
||||
property int activeTimelineIndex: 0
|
||||
|
||||
function getActiveTimeline(){
|
||||
return timeLine.sectionsList[root.activeTimelineIndex]
|
||||
function getActiveTimeline() {
|
||||
return timeLine.sectionsList[root.activeTimelineIndex];
|
||||
}
|
||||
|
||||
function removeAll(){
|
||||
timeLine.removeAll()
|
||||
function removeAll() {
|
||||
timeLine.removeAll();
|
||||
}
|
||||
|
||||
function printTimelines(){
|
||||
print("################# qml:")
|
||||
function printTimelines() {
|
||||
print("################# qml:");
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
print(
|
||||
|
||||
timeLine.sectionsList[i].index,
|
||||
timeLine.sectionsList[i].identifier,
|
||||
timeLine.sectionsList[i].relativeLinePosition)
|
||||
print(timeLine.sectionsList[i].index, timeLine.sectionsList[i].identifier, timeLine.sectionsList[i].relativeLinePosition);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component {
|
||||
@ -41,7 +35,7 @@ Control {
|
||||
QtObject {
|
||||
property string identifier
|
||||
property int index: 0
|
||||
property real relativeLinePosition: lineHandle.linePosition
|
||||
property real relativeLinePosition: lineHandle.linePosition
|
||||
//onRelativeLinePositionChanged: print("relativelinepos: ", relativeLinePosition)
|
||||
property LineHandle lineHandle
|
||||
property LineIndicator lineIndicator
|
||||
@ -52,12 +46,12 @@ Control {
|
||||
id: timeLine
|
||||
|
||||
property var sectionsList: []
|
||||
property var lineColors: [ "#FFB300", "#FB8C00", "#F4511E","#E53935", "#D81B60", "#8E24AA", "#5E35B1", "#3949AB", "#1E88E5", "#00897B", "#43A047", "#C0CA33"]
|
||||
property var lineColors: ["#FFB300", "#FB8C00", "#F4511E", "#E53935", "#D81B60", "#8E24AA", "#5E35B1", "#3949AB", "#1E88E5", "#00897B", "#43A047", "#C0CA33"]
|
||||
onWidthChanged: timeLine.updatePositions()
|
||||
|
||||
Component.onCompleted: {
|
||||
const initialStopPositions = App.screenPlayManager.initialStopPositions()
|
||||
createAllSections(initialStopPositions)
|
||||
const initialStopPositions = App.screenPlayManager.initialStopPositions();
|
||||
createAllSections(initialStopPositions);
|
||||
}
|
||||
|
||||
function createAllSections(initialStopPositions) {
|
||||
@ -67,253 +61,229 @@ Control {
|
||||
}
|
||||
}
|
||||
|
||||
function removeAll(){
|
||||
print("removeAll",timeLine.sectionsList.length)
|
||||
|
||||
|
||||
function removeAll() {
|
||||
print("removeAll", timeLine.sectionsList.length);
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
// ORDER is important here! Destory the children first
|
||||
print("remove index ", i)
|
||||
let section = timeLine.sectionsList[i]
|
||||
section.lineHandle.destroy()
|
||||
section.lineIndicator.destroy()
|
||||
section.destroy()
|
||||
print("remove index ", i);
|
||||
let section = timeLine.sectionsList[i];
|
||||
section.lineHandle.destroy();
|
||||
section.lineIndicator.destroy();
|
||||
section.destroy();
|
||||
}
|
||||
timeLine.sectionsList = []
|
||||
|
||||
App.screenPlayManager.removeAllTimlineSections()
|
||||
|
||||
const position = 1.0
|
||||
timeLine.sectionsList = [];
|
||||
App.screenPlayManager.removeAllTimlineSections();
|
||||
const position = 1.0;
|
||||
const identifier = App.util.generateRandomString(4);
|
||||
const sectionObject = timeLine.addSection(identifier,position)
|
||||
App.screenPlayManager.addTimelineAt(
|
||||
sectionObject.index,
|
||||
sectionObject.relativeLinePosition,
|
||||
sectionObject.identifier)
|
||||
const sectionObject = timeLine.addSection(identifier, position);
|
||||
App.screenPlayManager.addTimelineAt(sectionObject.index, sectionObject.relativeLinePosition, sectionObject.identifier);
|
||||
}
|
||||
|
||||
|
||||
// IMPORTANT: The new element is always on the left. The first
|
||||
// handle always persists because the
|
||||
// user can never delete it. It only gets "pushed" further
|
||||
// to the right, by increasing the size.
|
||||
function addSection(identifier, stopPosition) {
|
||||
print("stopPosition", stopPosition)
|
||||
|
||||
print("stopPosition", stopPosition);
|
||||
|
||||
// Make sure to limit float precision
|
||||
const fixedStopPosition = stopPosition
|
||||
print("addSection at: ", fixedStopPosition)
|
||||
const fixedStopPosition = stopPosition;
|
||||
print("addSection at: ", fixedStopPosition);
|
||||
if (stopPosition < 0 || fixedStopPosition > 1) {
|
||||
console.error("Invalid position:", fixedStopPosition)
|
||||
return
|
||||
console.error("Invalid position:", fixedStopPosition);
|
||||
return;
|
||||
}
|
||||
let sectionObject = sectionComp.createObject(timeLine, {
|
||||
"identifier" : identifier,
|
||||
"relativeLinePosition": fixedStopPosition
|
||||
})
|
||||
timeLine.sectionsList.push(sectionObject)
|
||||
|
||||
"identifier": identifier,
|
||||
"relativeLinePosition": fixedStopPosition
|
||||
});
|
||||
timeLine.sectionsList.push(sectionObject);
|
||||
timeLine.sectionsList.sort(function (a, b) {
|
||||
return a.relativeLinePosition - b.relativeLinePosition
|
||||
})
|
||||
const index = timeLine.sectionsList.indexOf(sectionObject)
|
||||
console.log("Addsection:", index)
|
||||
createSection(index, fixedStopPosition, sectionObject,identifier)
|
||||
|
||||
updatePositions()
|
||||
return sectionObject
|
||||
return a.relativeLinePosition - b.relativeLinePosition;
|
||||
});
|
||||
const index = timeLine.sectionsList.indexOf(sectionObject);
|
||||
console.log("Addsection:", index);
|
||||
createSection(index, fixedStopPosition, sectionObject, identifier);
|
||||
updatePositions();
|
||||
return sectionObject;
|
||||
}
|
||||
|
||||
function createSection(index, stopPosition, section,identifier) {
|
||||
console.log("Adding at:", index, stopPosition, identifier)
|
||||
function createSection(index, stopPosition, section, identifier) {
|
||||
console.log("Adding at:", index, stopPosition, identifier);
|
||||
|
||||
//console.assert(isFloat(stopPosition))
|
||||
let haComponent = Qt.createComponent("LineHandle.qml")
|
||||
let haComponent = Qt.createComponent("LineHandle.qml");
|
||||
if (haComponent.status === Component.Error) {
|
||||
console.assert(haComponent.errorString())
|
||||
return
|
||||
console.assert(haComponent.errorString());
|
||||
return;
|
||||
}
|
||||
|
||||
section.lineHandle = haComponent.createObject(handleWrapper)
|
||||
section.lineHandle.lineWidth = timeLine.width
|
||||
section.lineHandle.x = Math.round(
|
||||
handleWrapper.width * timeLine.sectionsList[index].relativeLinePosition)
|
||||
section.lineHandle.y = -section.lineHandle.height / 2
|
||||
section.lineHandle = haComponent.createObject(handleWrapper);
|
||||
section.lineHandle.lineWidth = timeLine.width;
|
||||
section.lineHandle.x = Math.round(handleWrapper.width * timeLine.sectionsList[index].relativeLinePosition);
|
||||
section.lineHandle.y = -section.lineHandle.height / 2;
|
||||
// Will be set later
|
||||
section.lineHandle.lineMinimum = timeLine.x
|
||||
section.lineHandle.lineMaximum = timeLine.x
|
||||
section.lineHandle.handleMoved.connect(timeLine.onHandleMoved)
|
||||
|
||||
let liComponent = Qt.createComponent("LineIndicator.qml")
|
||||
section.lineHandle.lineMinimum = timeLine.x;
|
||||
section.lineHandle.lineMaximum = timeLine.x;
|
||||
section.lineHandle.handleMoved.connect(timeLine.onHandleMoved);
|
||||
let liComponent = Qt.createComponent("LineIndicator.qml");
|
||||
if (liComponent.status === Component.Error) {
|
||||
console.assert(liComponent.errorString())
|
||||
return
|
||||
console.assert(liComponent.errorString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Set color initially so we do not have a weird color animation at start
|
||||
const lineIndicatorProperties = {
|
||||
"color": getColorAtIndex(index)
|
||||
}
|
||||
section.lineIndicator = liComponent.createObject(
|
||||
lineIndicatorWrapper, lineIndicatorProperties)
|
||||
section.lineIndicator.height = lineIndicatorWrapper.height
|
||||
section.lineIndicator.index = index
|
||||
section.lineIndicator.identifier = identifier
|
||||
section.lineIndicator.color = getColorAtIndex(index)
|
||||
section.lineIndicator.remove.connect(timeLine.removeSection)
|
||||
section.lineIndicator.lineSelected.connect(
|
||||
timeLine.lineIndicatorSelected)
|
||||
};
|
||||
section.lineIndicator = liComponent.createObject(lineIndicatorWrapper, lineIndicatorProperties);
|
||||
section.lineIndicator.height = lineIndicatorWrapper.height;
|
||||
section.lineIndicator.index = index;
|
||||
section.lineIndicator.identifier = identifier;
|
||||
section.lineIndicator.color = getColorAtIndex(index);
|
||||
section.lineIndicator.remove.connect(timeLine.removeSection);
|
||||
section.lineIndicator.lineSelected.connect(timeLine.lineIndicatorSelected);
|
||||
}
|
||||
|
||||
function sectionFromHandle(lineHandle){
|
||||
function sectionFromHandle(lineHandle) {
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
if(timeLine.sectionsList[i].lineHandle === lineHandle)
|
||||
return timeLine.sectionsList[i]
|
||||
if (timeLine.sectionsList[i].lineHandle === lineHandle)
|
||||
return timeLine.sectionsList[i];
|
||||
}
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
|
||||
function onHandleMoved(lineHandle){
|
||||
updatePositions()
|
||||
|
||||
const section = sectionFromHandle(lineHandle)
|
||||
if (section === null){
|
||||
print(lineHandle.linePosition)
|
||||
console.error("Unable to match handle to section list")
|
||||
return
|
||||
function onHandleMoved(lineHandle) {
|
||||
updatePositions();
|
||||
const section = sectionFromHandle(lineHandle);
|
||||
if (section === null) {
|
||||
print(lineHandle.linePosition);
|
||||
console.error("Unable to match handle to section list");
|
||||
return;
|
||||
}
|
||||
|
||||
App.screenPlayManager.moveTimelineAt(section.index, section.identifier, lineHandle.linePosition, lineHandle.timeString)
|
||||
App.screenPlayManager.moveTimelineAt(section.index, section.identifier, lineHandle.linePosition, lineHandle.timeString);
|
||||
}
|
||||
|
||||
function lineIndicatorSelected(activeTimelineIndex) {
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
if (i === activeTimelineIndex) {
|
||||
timeLine.sectionsList[i].lineIndicator.selected = true
|
||||
continue
|
||||
timeLine.sectionsList[i].lineIndicator.selected = true;
|
||||
continue;
|
||||
}
|
||||
timeLine.sectionsList[i].lineIndicator.selected = false
|
||||
timeLine.sectionsList[i].lineIndicator.selected = false;
|
||||
}
|
||||
root.activeTimelineIndex = activeTimelineIndex
|
||||
root.activeTimelineIndex = activeTimelineIndex;
|
||||
}
|
||||
|
||||
// We must update all indexes when removing/adding an element
|
||||
function updateIndicatorIndexes() {
|
||||
if(timeLine.sectionsList === null || timeLine.sectionsList === undefined)
|
||||
return
|
||||
if (timeLine.sectionsList === null || timeLine.sectionsList === undefined)
|
||||
return;
|
||||
timeLine.sectionsList.sort(function (a, b) {
|
||||
return a.relativeLinePosition - b.relativeLinePosition
|
||||
})
|
||||
return a.relativeLinePosition - b.relativeLinePosition;
|
||||
});
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
timeLine.sectionsList[i].index = i
|
||||
timeLine.sectionsList[i].lineIndicator.index = i
|
||||
timeLine.sectionsList[i].index = i;
|
||||
timeLine.sectionsList[i].lineIndicator.index = i;
|
||||
//print("updateIndicatorIndexes:", timeLine.sectionsList[i].index, timeLine.sectionsList[i].relativeLinePosition)
|
||||
}
|
||||
}
|
||||
|
||||
function removeSection(index) {
|
||||
print(timeLine.stopPositionList)
|
||||
print(timeLine.sectionList)
|
||||
|
||||
const isLast = index === timeLine.sectionsList.length - 1
|
||||
print(timeLine.stopPositionList);
|
||||
print(timeLine.sectionList);
|
||||
const isLast = index === timeLine.sectionsList.length - 1;
|
||||
if (isLast)
|
||||
return
|
||||
return;
|
||||
// ORDER is important here! First destory the object
|
||||
// and then remove i f
|
||||
let section = timeLine.sectionsList[index]
|
||||
section.lineHandle.destroy()
|
||||
section.lineIndicator.destroy()
|
||||
section.destroy()
|
||||
timeLine.sectionsList.splice(index, 1)
|
||||
|
||||
updatePositions()
|
||||
App.screenPlayManager.removeTimelineAt(index)
|
||||
let section = timeLine.sectionsList[index];
|
||||
section.lineHandle.destroy();
|
||||
section.lineIndicator.destroy();
|
||||
section.destroy();
|
||||
timeLine.sectionsList.splice(index, 1);
|
||||
updatePositions();
|
||||
App.screenPlayManager.removeTimelineAt(index);
|
||||
}
|
||||
|
||||
function updatePositions() {
|
||||
// Iterate through each handle in the 'sectionList' array
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
let handle = timeLine.sectionsList[i].lineHandle
|
||||
let handle = timeLine.sectionsList[i].lineHandle;
|
||||
|
||||
// Determine the minimum position for the current handle
|
||||
let prevPos
|
||||
let prevPos;
|
||||
if (i === 0) {
|
||||
// If it's the first handle, its minimum is 0
|
||||
prevPos = 0
|
||||
prevPos = 0;
|
||||
} else {
|
||||
// Otherwise, it's directly the position of the previous handle
|
||||
prevPos = timeLine.sectionsList[i - 1].lineHandle.x
|
||||
prevPos = timeLine.sectionsList[i - 1].lineHandle.x;
|
||||
}
|
||||
|
||||
// Determine the maximum position for the current handle
|
||||
let nextPos
|
||||
let nextPos;
|
||||
if (i === timeLine.sectionsList.length - 1) {
|
||||
// If it's the last handle, its maximum is the width of the line
|
||||
nextPos = timeLine.width
|
||||
nextPos = timeLine.width;
|
||||
} else {
|
||||
// Otherwise, it's directly the position of the next handle
|
||||
nextPos = timeLine.sectionsList[i + 1].lineHandle.x
|
||||
nextPos = timeLine.sectionsList[i + 1].lineHandle.x;
|
||||
}
|
||||
|
||||
// Set the determined minimum and maximum positions for the current handle
|
||||
handle.lineMinimum = prevPos
|
||||
handle.lineMaximum = nextPos
|
||||
|
||||
handle.lineMinimum = prevPos;
|
||||
handle.lineMaximum = nextPos;
|
||||
|
||||
//timeLine.sectionsList[i].relativeLinePosition =prevPos / timeLine.width
|
||||
// print("sections: ", i, "prev minimum ",prevPos,"next maximum", nextPos, timeLine.sectionsList[i].relativeLinePosition)
|
||||
}
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
let section = timeLine.sectionsList[i]
|
||||
section.relativeLinePosition = section.lineHandle.linePosition
|
||||
let section = timeLine.sectionsList[i];
|
||||
section.relativeLinePosition = section.lineHandle.linePosition;
|
||||
// print(section.relativeLinePosition, section.lineHandle.lineMinimum, section.lineHandle.lineMaximum)
|
||||
}
|
||||
updateIndicatorPositions()
|
||||
updateLastHandle()
|
||||
updateIndicatorColor()
|
||||
updateIndicatorIndexes()
|
||||
|
||||
updateIndicatorPositions();
|
||||
updateLastHandle();
|
||||
updateIndicatorColor();
|
||||
updateIndicatorIndexes();
|
||||
}
|
||||
|
||||
function getColorAtIndex(index) {
|
||||
let i = index
|
||||
let i = index;
|
||||
// Start from the beginnging again
|
||||
if (index >= timeLine.lineColors.length) {
|
||||
i = index % timeLine.lineColors.length
|
||||
i = index % timeLine.lineColors.length;
|
||||
}
|
||||
return timeLine.lineColors[i]
|
||||
return timeLine.lineColors[i];
|
||||
}
|
||||
|
||||
function updateIndicatorColor() {
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
let lineIndicator = timeLine.sectionsList[i].lineIndicator
|
||||
lineIndicator.color = getColorAtIndex(i)
|
||||
let lineIndicator = timeLine.sectionsList[i].lineIndicator;
|
||||
lineIndicator.color = getColorAtIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
function updateLastHandle() {
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
timeLine.sectionsList[i].lineHandle.isLast = i === timeLine.sectionsList.length - 1
|
||||
timeLine.sectionsList[i].lineIndicator.isLast = i
|
||||
=== timeLine.sectionsList.length - 1
|
||||
timeLine.sectionsList[i].lineHandle.isLast = i === timeLine.sectionsList.length - 1;
|
||||
timeLine.sectionsList[i].lineIndicator.isLast = i === timeLine.sectionsList.length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
function updateIndicatorPositions() {
|
||||
for (let i = 0; i < timeLine.sectionsList.length; i++) {
|
||||
const lineIndicator = timeLine.sectionsList[i].lineIndicator
|
||||
const lineIndicator = timeLine.sectionsList[i].lineIndicator;
|
||||
//print(i, lineIndicator.x, lineIndicator.width, timeLine.sectionsList[i].relativeLinePosition)
|
||||
const handle = timeLine.sectionsList[i].lineHandle
|
||||
lineIndicator.x = handle.dragHandler.xAxis.minimum
|
||||
lineIndicator.width = (handle.linePosition * handle.lineWidth).toFixed(
|
||||
2) - lineIndicator.x
|
||||
const handle = timeLine.sectionsList[i].lineHandle;
|
||||
lineIndicator.x = handle.dragHandler.xAxis.minimum;
|
||||
lineIndicator.width = (handle.linePosition * handle.lineWidth).toFixed(2) - lineIndicator.x;
|
||||
}
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/3885844
|
||||
function isFloat(n) {
|
||||
return n === +n && n !== (n | 0)
|
||||
return n === +n && n !== (n | 0);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -330,7 +300,6 @@ Control {
|
||||
enabled: true
|
||||
}
|
||||
|
||||
|
||||
// Current time indicator
|
||||
Rectangle {
|
||||
id: currentTimeIndicator
|
||||
@ -367,7 +336,6 @@ Control {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
Repeater {
|
||||
@ -400,14 +368,11 @@ Control {
|
||||
ToolButton {
|
||||
text: "➕"
|
||||
onClicked: {
|
||||
const p = this.x / timeLine.width
|
||||
const position = p.toFixed(4)
|
||||
const p = this.x / timeLine.width;
|
||||
const position = p.toFixed(4);
|
||||
const identifier = App.util.generateRandomString(4);
|
||||
const sectionObject = timeLine.addSection(identifier,position)
|
||||
App.screenPlayManager.addTimelineAt(
|
||||
sectionObject.index,
|
||||
sectionObject.relativeLinePosition,
|
||||
sectionObject.identifier)
|
||||
const sectionObject = timeLine.addSection(identifier, position);
|
||||
App.screenPlayManager.addTimelineAt(sectionObject.index, sectionObject.relativeLinePosition, sectionObject.identifier);
|
||||
}
|
||||
|
||||
x: hoverHandler.point.position.x - width * .5
|
||||
|
@ -3,7 +3,6 @@ import QtQuick.Window
|
||||
import Qt.labs.platform
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
SystemTrayIcon {
|
||||
id: root
|
||||
|
||||
|
@ -36,13 +36,13 @@ Rectangle {
|
||||
id: loaderConnections
|
||||
|
||||
function onWizardStarted() {
|
||||
root.expanded = false
|
||||
root.expanded = false;
|
||||
}
|
||||
|
||||
function onWizardExited() {
|
||||
root.expanded = true
|
||||
App.util.setNavigation("Installed")
|
||||
App.util.setNavigationActive(true)
|
||||
root.expanded = true;
|
||||
App.util.setNavigation("Installed");
|
||||
App.util.setNavigationActive(true);
|
||||
}
|
||||
|
||||
ignoreUnknownSignals: true
|
||||
@ -145,15 +145,14 @@ Rectangle {
|
||||
text: headline
|
||||
onClicked: {
|
||||
if (proFeature && App.globalVariables.isBasicVersion())
|
||||
return screenPlayProView.open()
|
||||
|
||||
listView.currentIndex = index
|
||||
const item = stackView.push(source)
|
||||
loaderConnections.target = item
|
||||
return screenPlayProView.open();
|
||||
listView.currentIndex = index;
|
||||
const item = stackView.push(source);
|
||||
loaderConnections.target = item;
|
||||
}
|
||||
ToolButton {
|
||||
enabled: false
|
||||
visible: proFeature && App.globalVariables.isBasicVersion()
|
||||
visible: proFeature && App.globalVariables.isBasicVersion()
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/font-awsome/lock-solid.svg"
|
||||
icon.width: 10
|
||||
icon.height: 10
|
||||
|
@ -15,13 +15,9 @@ WizardPage {
|
||||
property bool ready: tfTitle.text.length >= 1 && root.file.length !== ""
|
||||
|
||||
function create() {
|
||||
App.wizards.createGifWallpaper(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text, root.file,
|
||||
tagSelector.getTags()).then(
|
||||
result => {
|
||||
wizardFinished(result.success, result.message)
|
||||
})
|
||||
App.wizards.createGifWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, root.file, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
onReadyChanged: root.ready = ready
|
||||
@ -60,18 +56,15 @@ WizardPage {
|
||||
|
||||
anchors.fill: parent
|
||||
onDropped: {
|
||||
root.file = drop.urls[0]
|
||||
leftWrapper.color = Qt.darker(
|
||||
Qt.darker(Material.backgroundColor))
|
||||
root.file = drop.urls[0];
|
||||
leftWrapper.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
}
|
||||
onExited: {
|
||||
leftWrapper.color = Qt.darker(
|
||||
Material.backgroundColor)
|
||||
leftWrapper.color = Qt.darker(Material.backgroundColor);
|
||||
}
|
||||
onEntered: {
|
||||
leftWrapper.color = Qt.darker(
|
||||
Qt.darker(Material.backgroundColor))
|
||||
drag.accept(Qt.LinkAction)
|
||||
leftWrapper.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
drag.accept(Qt.LinkAction);
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,34 +135,34 @@ WizardPage {
|
||||
required: true
|
||||
}
|
||||
|
||||
Util.TextField {
|
||||
id: tfCreatedBy
|
||||
Util.TextField {
|
||||
id: tfCreatedBy
|
||||
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("Created By")
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("Created By")
|
||||
}
|
||||
|
||||
Util.LicenseSelector {
|
||||
id: cbLicense
|
||||
Util.LicenseSelector {
|
||||
id: cbLicense
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Util.HeadlineSection {
|
||||
text: qsTr("Tags")
|
||||
}
|
||||
Util.HeadlineSection {
|
||||
text: qsTr("Tags")
|
||||
}
|
||||
|
||||
Util.TagSelector {
|
||||
id: tagSelector
|
||||
Util.TagSelector {
|
||||
id: tagSelector
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,14 +14,9 @@ WizardPage {
|
||||
id: rightWrapper
|
||||
|
||||
function create() {
|
||||
App.wizards.createGodotWallpaper(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text,
|
||||
previewSelector.imageSource,
|
||||
tagSelector.getTags()).then(
|
||||
result => {
|
||||
wizardFinished(result.success, result.message)
|
||||
})
|
||||
App.wizards.createGodotWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
|
@ -14,14 +14,9 @@ WizardPage {
|
||||
id: rightWrapper
|
||||
|
||||
function create() {
|
||||
App.wizards.createHTMLWallpaper(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text,
|
||||
previewSelector.imageSource,
|
||||
tagSelector.getTags()).then(
|
||||
result => {
|
||||
wizardFinished(result.success, result.message)
|
||||
})
|
||||
App.wizards.createHTMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
|
@ -11,15 +11,9 @@ WizardPage {
|
||||
|
||||
sourceComponent: ColumnLayout {
|
||||
function create() {
|
||||
App.wizards.createHTMLWidget(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text,
|
||||
previewSelector.imageSource,
|
||||
tagSelector.getTags()).then(result => {
|
||||
wizardFinished(
|
||||
result.success,
|
||||
result.message)
|
||||
})
|
||||
App.wizards.createHTMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
Util.Headline {
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
@ -21,18 +20,18 @@ Item {
|
||||
clip: true
|
||||
CreateWallpaperFileSelect {
|
||||
onNext: function (filePath) {
|
||||
createWallpaperVideoImportConvert.filePath = filePath
|
||||
swipeView.currentIndex = 1
|
||||
createWallpaperVideoImportConvert.filePath = filePath;
|
||||
swipeView.currentIndex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
CreateWallpaperSettings {
|
||||
id: createWallpaperSettings
|
||||
onNext: function (codec,quality) {
|
||||
root.wizardStarted()
|
||||
swipeView.currentIndex = 2
|
||||
createWallpaperVideoImportConvert.codec = codec
|
||||
App.create.createWallpaperStart(createWallpaperVideoImportConvert.filePath, codec, quality)
|
||||
onNext: function (codec, quality) {
|
||||
root.wizardStarted();
|
||||
swipeView.currentIndex = 2;
|
||||
createWallpaperVideoImportConvert.codec = codec;
|
||||
App.create.createWallpaperStart(createWallpaperVideoImportConvert.filePath, codec, quality);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,31 +49,28 @@ Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
onExited: {
|
||||
bg.color = Qt.darker(Material.backgroundColor)
|
||||
bg.color = Qt.darker(Material.backgroundColor);
|
||||
}
|
||||
onEntered: drag => {
|
||||
bg.color = Qt.darker(
|
||||
Qt.darker(Material.backgroundColor))
|
||||
drag.accept(Qt.LinkAction)
|
||||
}
|
||||
bg.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
drag.accept(Qt.LinkAction);
|
||||
}
|
||||
onDropped: drop => {
|
||||
let file = App.util.toLocal(drop.urls[0])
|
||||
bg.color = Qt.darker(
|
||||
Qt.darker(Material.backgroundColor))
|
||||
let found = false
|
||||
for (let ending in root.allowedVideoFileEndings) {
|
||||
if (file.endsWith(ending)) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
root.next(drop.urls[0])
|
||||
} else {
|
||||
txtFile.text = qsTr(
|
||||
"Invalid file type. Must be valid video!")
|
||||
}
|
||||
}
|
||||
let file = App.util.toLocal(drop.urls[0]);
|
||||
bg.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
let found = false;
|
||||
for (let ending in root.allowedVideoFileEndings) {
|
||||
if (file.endsWith(ending)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
root.next(drop.urls[0]);
|
||||
} else {
|
||||
txtFile.text = qsTr("Invalid file type. Must be valid video!");
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: bg
|
||||
@ -95,8 +92,7 @@ Item {
|
||||
Text {
|
||||
id: txtFile
|
||||
|
||||
text: qsTr("Drag and drop your video here. Supported video formats are:\n\n%1").arg(
|
||||
root.allowedVideoFileEndings.join(" "))
|
||||
text: qsTr("Drag and drop your video here. Supported video formats are:\n\n%1").arg(root.allowedVideoFileEndings.join(" "))
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
color: Material.primaryTextColor
|
||||
font.pointSize: 13
|
||||
@ -125,8 +121,7 @@ Item {
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
font.family: App.settings.font
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
@ -140,7 +135,7 @@ Item {
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
fileDialogImportVideo.open()
|
||||
fileDialogImportVideo.open();
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
@ -148,7 +143,7 @@ Item {
|
||||
|
||||
nameFilters: ["Video files (*.mp4)"]
|
||||
onAccepted: {
|
||||
root.next(fileDialogImportVideo.currentFile)
|
||||
root.next(fileDialogImportVideo.currentFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: wrapperError
|
||||
|
||||
|
@ -81,7 +81,6 @@ Item {
|
||||
value: Video.VideoCodec.VP8
|
||||
text: qsTr("VP8 (Better for older hardware)")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -111,8 +110,7 @@ Item {
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
font.family: App.settings.font
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
@ -126,7 +124,7 @@ Item {
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
root.next(comboBoxCodec.currentValue, sliderQuality.value)
|
||||
root.next(comboBoxCodec.currentValue, sliderQuality.value);
|
||||
}
|
||||
anchors {
|
||||
right: parent.right
|
||||
|
@ -335,14 +335,7 @@ Item {
|
||||
onClicked: {
|
||||
if (conversionFinishedSuccessful) {
|
||||
btnSave.enabled = false;
|
||||
App.create.saveWallpaper(
|
||||
textFieldName.text,
|
||||
textFieldDescription.text,
|
||||
root.filePath,
|
||||
previewSelector.imageSource,
|
||||
textFieldYoutubeURL.text,
|
||||
root.codec,
|
||||
textFieldTags.getTags());
|
||||
App.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, root.codec, textFieldTags.getTags());
|
||||
savePopup.open();
|
||||
}
|
||||
}
|
||||
|
@ -14,14 +14,9 @@ WizardPage {
|
||||
id: rightWrapper
|
||||
|
||||
function create() {
|
||||
App.wizards.createQMLWallpaper(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text,
|
||||
previewSelector.imageSource,
|
||||
tagSelector.getTags()).then(
|
||||
result => {
|
||||
wizardFinished(result.success, result.message)
|
||||
})
|
||||
App.wizards.createQMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
|
@ -11,15 +11,9 @@ WizardPage {
|
||||
|
||||
sourceComponent: ColumnLayout {
|
||||
function create() {
|
||||
App.wizards.createQMLWidget(tfTitle.text, cbLicense.name,
|
||||
cbLicense.licenseFile,
|
||||
tfCreatedBy.text,
|
||||
previewSelector.imageSource,
|
||||
tagSelector.getTags()).then(result => {
|
||||
wizardFinished(
|
||||
result.success,
|
||||
result.message)
|
||||
})
|
||||
App.wizards.createQMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
Util.Headline {
|
||||
|
@ -10,25 +10,19 @@ import ScreenPlayUtil as Util
|
||||
WizardPage {
|
||||
id: root
|
||||
function isValidURL(string) {
|
||||
var res = string.match(
|
||||
/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)
|
||||
return (res !== null)
|
||||
var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
||||
return (res !== null);
|
||||
}
|
||||
sourceComponent: ColumnLayout {
|
||||
id: layout
|
||||
function validate() {
|
||||
root.ready = tfTitle.text.length >= 1 && root.isValidURL(tfUrl.text)
|
||||
root.ready = tfTitle.text.length >= 1 && root.isValidURL(tfUrl.text);
|
||||
}
|
||||
|
||||
function create() {
|
||||
App.wizards.createWebsiteWallpaper(tfTitle.text,
|
||||
previewSelector.imageSource,
|
||||
tfUrl.text, tagSelector.getTags(
|
||||
)).then(result => {
|
||||
wizardFinished(
|
||||
result.success,
|
||||
result.message)
|
||||
})
|
||||
App.wizards.createWebsiteWallpaper(tfTitle.text, previewSelector.imageSource, tfUrl.text, tagSelector.getTags()).then(result => {
|
||||
wizardFinished(result.success, result.message);
|
||||
});
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
|
@ -6,7 +6,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
|
||||
@ -74,10 +73,10 @@ FocusScope {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
btnSave.enabled = false
|
||||
root.saveClicked()
|
||||
savePopup.open()
|
||||
loader.item.create()
|
||||
btnSave.enabled = false;
|
||||
root.saveClicked();
|
||||
savePopup.open();
|
||||
loader.item.create();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -86,12 +85,11 @@ FocusScope {
|
||||
target: root
|
||||
function onWizardFinished(success, message) {
|
||||
if (success) {
|
||||
timerSave.start()
|
||||
return
|
||||
timerSave.start();
|
||||
return;
|
||||
}
|
||||
|
||||
savePopup.title = message
|
||||
savePopup.standardButtons = Dialog.Ok
|
||||
savePopup.title = message;
|
||||
savePopup.standardButtons = Dialog.Ok;
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,8 +102,8 @@ FocusScope {
|
||||
height: 200
|
||||
anchors.centerIn: Overlay.overlay
|
||||
onAccepted: {
|
||||
savePopup.close()
|
||||
root.wizardExited()
|
||||
savePopup.close();
|
||||
root.wizardExited();
|
||||
}
|
||||
title: qsTr("Saving...")
|
||||
|
||||
@ -117,8 +115,8 @@ FocusScope {
|
||||
id: timerSave
|
||||
interval: 200 + Math.random() * 500
|
||||
onTriggered: {
|
||||
savePopup.close()
|
||||
root.wizardExited()
|
||||
savePopup.close();
|
||||
root.wizardExited();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,70 +19,66 @@ Drawer {
|
||||
property var type: ContentTypes.InstalledType.QMLWallpaper
|
||||
property string contentFolderName
|
||||
onClosed: {
|
||||
root.contentFolderName = ""
|
||||
root.type = ContentTypes.InstalledType.Unknown
|
||||
root.contentFolderName = "";
|
||||
root.type = ContentTypes.InstalledType.Unknown;
|
||||
}
|
||||
|
||||
function setInstalledDrawerItem(folderName, type) {
|
||||
|
||||
// Toggle sidebar if clicked on the same content twice
|
||||
if (root.contentFolderName === folderName)
|
||||
return
|
||||
|
||||
root.contentFolderName = folderName
|
||||
root.type = type
|
||||
return;
|
||||
root.contentFolderName = folderName;
|
||||
root.type = type;
|
||||
if (App.util.isWallpaper(root.type)) {
|
||||
if (type === ContentTypes.InstalledType.VideoWallpaper)
|
||||
installedDrawerWrapper.state = "wallpaper"
|
||||
installedDrawerWrapper.state = "wallpaper";
|
||||
else
|
||||
installedDrawerWrapper.state = "scene"
|
||||
btnLaunchContent.text = qsTr("Set Wallpaper")
|
||||
installedDrawerWrapper.state = "scene";
|
||||
btnLaunchContent.text = qsTr("Set Wallpaper");
|
||||
} else {
|
||||
installedDrawerWrapper.state = "widget"
|
||||
btnLaunchContent.text = qsTr("Set Widget")
|
||||
installedDrawerWrapper.state = "widget";
|
||||
btnLaunchContent.text = qsTr("Set Widget");
|
||||
}
|
||||
root.open()
|
||||
root.open();
|
||||
}
|
||||
|
||||
function indexOfValue(model, value) {
|
||||
for (var i = 0; i < model.length; i++) {
|
||||
let ourValue = model[i].value
|
||||
let ourValue = model[i].value;
|
||||
if (value === ourValue)
|
||||
return i
|
||||
return i;
|
||||
}
|
||||
return -1
|
||||
return -1;
|
||||
}
|
||||
|
||||
// This is used for removing wallpaper. We need to clear
|
||||
// the preview image/gif so we can release the file for deletion.
|
||||
function clear() {
|
||||
root.close()
|
||||
imagePreview.source = ""
|
||||
animatedImagePreview.source = ""
|
||||
txtHeadline.text = ""
|
||||
installedDrawerWrapper.state = "inactive"
|
||||
root.close();
|
||||
imagePreview.source = "";
|
||||
animatedImagePreview.source = "";
|
||||
txtHeadline.text = "";
|
||||
installedDrawerWrapper.state = "inactive";
|
||||
}
|
||||
|
||||
onContentFolderNameChanged: {
|
||||
const item = App.installedListModel.get(root.contentFolderName)
|
||||
const item = App.installedListModel.get(root.contentFolderName);
|
||||
//txtHeadline.text = item.m_title
|
||||
const previewGiFilePath = Qt.resolvedUrl(
|
||||
item.m_absoluteStoragePath + "/" + item.m_previewGIF)
|
||||
const previewImageFilePath = Qt.resolvedUrl(
|
||||
item.m_absoluteStoragePath + "/" + item.m_preview)
|
||||
root.hasPreviewGif = App.util.fileExists(previewGiFilePath)
|
||||
const previewGiFilePath = Qt.resolvedUrl(item.m_absoluteStoragePath + "/" + item.m_previewGIF);
|
||||
const previewImageFilePath = Qt.resolvedUrl(item.m_absoluteStoragePath + "/" + item.m_preview);
|
||||
root.hasPreviewGif = App.util.fileExists(previewGiFilePath);
|
||||
if (hasPreviewGif) {
|
||||
animatedImagePreview.source = previewGiFilePath
|
||||
animatedImagePreview.playing = true
|
||||
animatedImagePreview.source = previewGiFilePath;
|
||||
animatedImagePreview.playing = true;
|
||||
} else {
|
||||
imagePreview.source = previewImageFilePath
|
||||
imagePreview.source = previewImageFilePath;
|
||||
}
|
||||
if (App.util.isWidget(root.type)
|
||||
|| (monitorSelection.activeMonitors.length > 0)) {
|
||||
btnLaunchContent.enabled = true
|
||||
return
|
||||
if (App.util.isWidget(root.type) || (monitorSelection.activeMonitors.length > 0)) {
|
||||
btnLaunchContent.enabled = true;
|
||||
return;
|
||||
}
|
||||
btnLaunchContent.enabled = false
|
||||
btnLaunchContent.enabled = false;
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@ -118,8 +114,8 @@ Drawer {
|
||||
Layout.fillHeight: true
|
||||
Connections {
|
||||
target: App.screenPlayManager
|
||||
function onPrintQmlTimeline(){
|
||||
timeline.printTimelines()
|
||||
function onPrintQmlTimeline() {
|
||||
timeline.printTimelines();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -136,29 +132,29 @@ Drawer {
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
spacing: 10
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
spacing: 10
|
||||
|
||||
Text {
|
||||
text: qsTr("Select a Monitor to display the content")
|
||||
font.family: App.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 11
|
||||
color: Material.secondaryTextColor
|
||||
}
|
||||
|
||||
MonitorSelection {
|
||||
id: monitorSelection
|
||||
objectName: "monitorSelection"
|
||||
height: 200
|
||||
Layout.fillWidth: true
|
||||
availableWidth: width
|
||||
availableHeight: height
|
||||
fontSize: 11
|
||||
}
|
||||
Text {
|
||||
text: qsTr("Select a Monitor to display the content")
|
||||
font.family: App.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 11
|
||||
color: Material.secondaryTextColor
|
||||
}
|
||||
|
||||
MonitorSelection {
|
||||
id: monitorSelection
|
||||
objectName: "monitorSelection"
|
||||
height: 200
|
||||
Layout.fillWidth: true
|
||||
availableWidth: width
|
||||
availableHeight: height
|
||||
fontSize: 11
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@ -284,26 +280,30 @@ Drawer {
|
||||
textRole: "text"
|
||||
valueRole: "value"
|
||||
font.family: App.settings.font
|
||||
model: [{
|
||||
model: [
|
||||
{
|
||||
"value": Settings.FillMode.Stretch,
|
||||
"text": qsTr("Stretch")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Settings.FillMode.Fill,
|
||||
"text": qsTr("Fill")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Settings.FillMode.Contain,
|
||||
"text": qsTr("Contain")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Settings.FillMode.Cover,
|
||||
"text": qsTr("Cover")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Settings.FillMode.Scale_Down,
|
||||
"text": qsTr("Scale-Down")
|
||||
}]
|
||||
}
|
||||
]
|
||||
Component.onCompleted: {
|
||||
cbVideoFillMode.currentIndex = root.indexOfValue(
|
||||
cbVideoFillMode.model,
|
||||
App.settings.videoFillMode)
|
||||
cbVideoFillMode.currentIndex = root.indexOfValue(cbVideoFillMode.model, App.settings.videoFillMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -322,80 +322,55 @@ Drawer {
|
||||
Button {
|
||||
id: btnLaunchContent
|
||||
objectName: "btnLaunchContent"
|
||||
enabled: App.util.isWidget(
|
||||
root.type) ? true : monitorSelection.isSelected
|
||||
enabled: App.util.isWidget(root.type) ? true : monitorSelection.isSelected
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
|
||||
icon.color: "white"
|
||||
font.pointSize: 12
|
||||
onClicked: {
|
||||
const item = App.installedListModel.get(
|
||||
root.contentFolderName)
|
||||
const absoluteStoragePath = item.m_absoluteStoragePath
|
||||
const previewImage = item.m_preview
|
||||
const item = App.installedListModel.get(root.contentFolderName);
|
||||
const absoluteStoragePath = item.m_absoluteStoragePath;
|
||||
const previewImage = item.m_preview;
|
||||
if (App.util.isWallpaper(root.type)) {
|
||||
if (type === ContentTypes.InstalledType.GodotWallpaper) {
|
||||
if (App.globalVariables.isBasicVersion()) {
|
||||
installedDrawerWrapper.state = "inactive"
|
||||
return
|
||||
installedDrawerWrapper.state = "inactive";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let activeMonitors = monitorSelection.getActiveMonitors(
|
||||
)
|
||||
let activeMonitors = monitorSelection.getActiveMonitors();
|
||||
// TODO Alert user to choose a monitor
|
||||
if (activeMonitors.length === 0)
|
||||
return
|
||||
return;
|
||||
|
||||
// We only have sliderVolume if it is a VideoWallpaper
|
||||
let volume = 0
|
||||
let volume = 0;
|
||||
if (type === ContentTypes.InstalledType.VideoWallpaper)
|
||||
volume = Math.round(
|
||||
sliderVolume.slider.value * 100) / 100
|
||||
volume = Math.round(sliderVolume.slider.value * 100) / 100;
|
||||
if (type === ContentTypes.InstalledType.GodotWallpaper) {
|
||||
App.util.exportGodotProject(
|
||||
absoluteStoragePath,
|
||||
App.globalVariables.godotEditorExecutablePath).then(
|
||||
result => {
|
||||
if (!result.success) {
|
||||
dialog.title = ("Error exporting Godot")
|
||||
dialog.message = result.message
|
||||
dialog.open()
|
||||
} else {
|
||||
const screenFile = item.m_file
|
||||
let success = App.screenPlayManager.createWallpaper(
|
||||
root.type,
|
||||
cbVideoFillMode.currentValue,
|
||||
absoluteStoragePath,
|
||||
previewImage, screenFile,
|
||||
activeMonitors, volume,
|
||||
1, {}, true)
|
||||
}
|
||||
})
|
||||
root.close()
|
||||
return
|
||||
App.util.exportGodotProject(absoluteStoragePath, App.globalVariables.godotEditorExecutablePath).then(result => {
|
||||
if (!result.success) {
|
||||
dialog.title = ("Error exporting Godot");
|
||||
dialog.message = result.message;
|
||||
dialog.open();
|
||||
} else {
|
||||
const screenFile = item.m_file;
|
||||
let success = App.screenPlayManager.createWallpaper(root.type, cbVideoFillMode.currentValue, absoluteStoragePath, previewImage, screenFile, activeMonitors, volume, 1, {}, true);
|
||||
}
|
||||
});
|
||||
root.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const activeTimeline = timeline.getActiveTimeline()
|
||||
const screenFile = item.m_file
|
||||
const playbackRate = 1
|
||||
const jsonProperties = {}
|
||||
const activeTimeline = timeline.getActiveTimeline();
|
||||
const screenFile = item.m_file;
|
||||
const playbackRate = 1;
|
||||
const jsonProperties = {};
|
||||
let success = App.screenPlayManager.setWallpaperAtTimelineIndex(
|
||||
root.type, cbVideoFillMode.currentValue,
|
||||
absoluteStoragePath, previewImage, screenFile,
|
||||
activeMonitors, volume, playbackRate, jsonProperties,
|
||||
activeTimeline.activeTimelineIndex,
|
||||
activeTimeline.identifier,
|
||||
true)
|
||||
root.type, cbVideoFillMode.currentValue, absoluteStoragePath, previewImage, screenFile, activeMonitors, volume, playbackRate, jsonProperties, timeline.activeTimelineIndex, activeTimeline.identifier, true);
|
||||
}
|
||||
if (App.util.isWidget(root.type))
|
||||
App.screenPlayManager.startWidget(type,
|
||||
Qt.point(0, 0),
|
||||
absoluteStoragePath,
|
||||
previewImage, {},
|
||||
true)
|
||||
|
||||
root.close()
|
||||
monitorSelection.reset()
|
||||
App.screenPlayManager.startWidget(type, Qt.point(0, 0), absoluteStoragePath, previewImage, {}, true);
|
||||
root.close();
|
||||
monitorSelection.reset();
|
||||
}
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
@ -409,8 +384,8 @@ Drawer {
|
||||
icon.width: 15
|
||||
icon.height: 15
|
||||
onClicked: {
|
||||
root.close()
|
||||
installedDrawerWrapper.state = "inactive"
|
||||
root.close();
|
||||
installedDrawerWrapper.state = "inactive";
|
||||
}
|
||||
}
|
||||
states: [
|
||||
|
@ -34,8 +34,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Util.MouseHoverBlocker {
|
||||
}
|
||||
Util.MouseHoverBlocker {}
|
||||
|
||||
Item {
|
||||
height: nav.height
|
||||
@ -49,8 +48,7 @@ Item {
|
||||
TabBar {
|
||||
height: parent.height
|
||||
|
||||
background: Item {
|
||||
}
|
||||
background: Item {}
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 5
|
||||
@ -63,7 +61,7 @@ Item {
|
||||
text: qsTr("All")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
|
||||
onClicked: {
|
||||
root.installedDrawer.close()
|
||||
root.installedDrawer.close();
|
||||
App.installedListFilter.sortBySearchType(Util.ContentTypes.SearchType.All);
|
||||
}
|
||||
}
|
||||
@ -72,7 +70,7 @@ Item {
|
||||
text: qsTr("Scenes")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
|
||||
onClicked: {
|
||||
root.installedDrawer.close()
|
||||
root.installedDrawer.close();
|
||||
App.installedListFilter.sortBySearchType(Util.ContentTypes.SearchType.Scene);
|
||||
}
|
||||
}
|
||||
@ -81,7 +79,7 @@ Item {
|
||||
text: qsTr("Videos")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
|
||||
onClicked: {
|
||||
root.installedDrawer.close()
|
||||
root.installedDrawer.close();
|
||||
App.installedListFilter.sortBySearchType(Util.ContentTypes.SearchType.Wallpaper);
|
||||
}
|
||||
}
|
||||
@ -90,7 +88,7 @@ Item {
|
||||
text: qsTr("Widgets")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
|
||||
onClicked: {
|
||||
root.installedDrawer.close()
|
||||
root.installedDrawer.close();
|
||||
App.installedListFilter.sortBySearchType(Util.ContentTypes.SearchType.Widget);
|
||||
}
|
||||
}
|
||||
@ -162,8 +160,7 @@ Item {
|
||||
icon.width: 16
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {
|
||||
}
|
||||
background: Item {}
|
||||
font.capitalization: Font.MixedCase
|
||||
}
|
||||
|
||||
|
@ -21,15 +21,15 @@ Item {
|
||||
|
||||
function checkIsContentInstalled() {
|
||||
if (App.installedListModel.count === 0) {
|
||||
gridView.footerItem.isVisible = true
|
||||
gridView.visible = false
|
||||
navWrapper.visible = false
|
||||
gridView.footerItem.isVisible = true;
|
||||
gridView.visible = false;
|
||||
navWrapper.visible = false;
|
||||
} else {
|
||||
gridView.footerItem.isVisible = false
|
||||
refresh = false
|
||||
gridView.contentY = -82
|
||||
gridView.visible = true
|
||||
navWrapper.visible = true
|
||||
gridView.footerItem.isVisible = false;
|
||||
refresh = false;
|
||||
gridView.contentY = -82;
|
||||
gridView.visible = true;
|
||||
navWrapper.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,10 +39,9 @@ Item {
|
||||
width: root.width
|
||||
}
|
||||
|
||||
|
||||
StackView.onActivated: {
|
||||
navWrapper.state = "in"
|
||||
checkIsContentInstalled()
|
||||
navWrapper.state = "in";
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
Action {
|
||||
@ -52,12 +51,12 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onInstalledLoadingFinished() {
|
||||
checkIsContentInstalled()
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
function onCountChanged(count) {
|
||||
if (count === 0)
|
||||
checkIsContentInstalled()
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
target: App.installedListModel
|
||||
@ -69,7 +68,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onSortChanged() {
|
||||
gridView.positionViewAtBeginning()
|
||||
gridView.positionViewAtBeginning();
|
||||
}
|
||||
|
||||
target: App.installedListFilter
|
||||
@ -87,6 +86,7 @@ Item {
|
||||
cellHeight: 200
|
||||
cacheBuffer: 160
|
||||
interactive: root.enabled
|
||||
// flickDeceleration: 0.00001
|
||||
onDragStarted: isDragging = true
|
||||
onDragEnded: isDragging = false
|
||||
model: App.installedListFilter
|
||||
@ -122,12 +122,12 @@ Item {
|
||||
}
|
||||
onContentYChanged: {
|
||||
if (contentY <= -180)
|
||||
gridView.headerItem.isVisible = true
|
||||
gridView.headerItem.isVisible = true;
|
||||
else
|
||||
gridView.headerItem.isVisible = false
|
||||
gridView.headerItem.isVisible = false;
|
||||
//Pull to refresh
|
||||
if (contentY <= -180 && !refresh && !isDragging)
|
||||
App.installedListModel.reset()
|
||||
App.installedListModel.reset();
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -144,11 +144,11 @@ Item {
|
||||
opacity: 0
|
||||
onIsVisibleChanged: {
|
||||
if (isVisible) {
|
||||
txtHeader.color = Material.accent
|
||||
txtHeader.text = qsTr("Refreshing!")
|
||||
txtHeader.color = Material.accent;
|
||||
txtHeader.text = qsTr("Refreshing!");
|
||||
} else {
|
||||
txtHeader.color = "gray"
|
||||
txtHeader.text = qsTr("Pull to refresh!")
|
||||
txtHeader.color = "gray";
|
||||
txtHeader.text = qsTr("Pull to refresh!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ Item {
|
||||
interval: 150
|
||||
running: true
|
||||
onTriggered: {
|
||||
animFadeIn.start()
|
||||
animFadeIn.start();
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ Item {
|
||||
interval: 400
|
||||
running: true
|
||||
onTriggered: {
|
||||
animFadeInTxtFooter.start()
|
||||
animFadeInTxtFooter.start();
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,34 +228,33 @@ Item {
|
||||
publishedFileID: m_publishedFileID
|
||||
itemIndex: index
|
||||
isScrolling: gridView.isScrolling
|
||||
onClicked: function(folderName, type){
|
||||
installedDrawer.setInstalledDrawerItem( folderName, type)
|
||||
onClicked: function (folderName, type) {
|
||||
installedDrawer.setInstalledDrawerItem(folderName, type);
|
||||
}
|
||||
|
||||
onOpenOpenLicensePopup: function () {
|
||||
screenPlayProView.open()
|
||||
screenPlayProView.open();
|
||||
}
|
||||
|
||||
onOpenContextMenu: function (position) {
|
||||
// Set the menu to the current item informations
|
||||
contextMenu.publishedFileID = delegate.publishedFileID
|
||||
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath
|
||||
contextMenu.fileName = delegate.customTitle
|
||||
contextMenu.type = delegate.type
|
||||
print(delegate.publishedFileID)
|
||||
contextMenu.publishedFileID = delegate.publishedFileID;
|
||||
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath;
|
||||
contextMenu.fileName = delegate.customTitle;
|
||||
contextMenu.type = delegate.type;
|
||||
print(delegate.publishedFileID);
|
||||
if (contextMenu.godotItem)
|
||||
contextMenu.godotItem.destroy()
|
||||
const pos = delegate.mapToItem(root, position.x, position.y)
|
||||
contextMenu.godotItem.destroy();
|
||||
const pos = delegate.mapToItem(root, position.x, position.y);
|
||||
// Disable duplicate opening. The can happen if we
|
||||
// call popup when we are in the closing animtion.
|
||||
if (contextMenu.visible || contextMenu.opened)
|
||||
return
|
||||
return;
|
||||
if (delegate.type === Util.ContentTypes.InstalledType.GodotWallpaper) {
|
||||
contextMenu.godotItem = editGodotWallpaperComp.createObject(
|
||||
)
|
||||
contextMenu.insertItem(0, contextMenu.godotItem)
|
||||
contextMenu.godotItem = editGodotWallpaperComp.createObject();
|
||||
contextMenu.insertItem(0, contextMenu.godotItem);
|
||||
}
|
||||
contextMenu.popup(pos.x, pos.y)
|
||||
contextMenu.popup(pos.x, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,9 +271,7 @@ Item {
|
||||
enabled: contextMenu.type === Util.ContentTypes.InstalledType.GodotWallpaper
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_edit.svg"
|
||||
onClicked: {
|
||||
App.util.openGodotEditor(
|
||||
contextMenu.absoluteStoragePath,
|
||||
App.globalVariables.godotEditorExecutablePath)
|
||||
App.util.openGodotEditor(contextMenu.absoluteStoragePath, App.globalVariables.godotEditorExecutablePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -295,7 +292,7 @@ Item {
|
||||
objectName: "openFolder"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_folder_open.svg"
|
||||
onClicked: {
|
||||
App.util.openFolderInExplorer(contextMenu.absoluteStoragePath)
|
||||
App.util.openFolderInExplorer(contextMenu.absoluteStoragePath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,12 +301,10 @@ Item {
|
||||
objectName: enabled ? "removeItem" : "removeWorkshopItem"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_import_export_.svg"
|
||||
onClicked: {
|
||||
exportFileDialog.absoluteStoragePath = contextMenu.absoluteStoragePath
|
||||
let urlFileName = QCore.StandardPaths.writableLocation(
|
||||
QCore.StandardPaths.DesktopLocation) + "/"
|
||||
+ contextMenu.fileName + ".screenplay"
|
||||
exportFileDialog.currentFile = urlFileName
|
||||
exportFileDialog.open()
|
||||
exportFileDialog.absoluteStoragePath = contextMenu.absoluteStoragePath;
|
||||
let urlFileName = QCore.StandardPaths.writableLocation(QCore.StandardPaths.DesktopLocation) + "/" + contextMenu.fileName + ".screenplay";
|
||||
exportFileDialog.currentFile = urlFileName;
|
||||
exportFileDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
@ -317,21 +312,18 @@ Item {
|
||||
text: enabled ? qsTr("Remove Item") : qsTr("Remove via Workshop")
|
||||
objectName: enabled ? "removeItem" : "removeWorkshopItem"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_delete.svg"
|
||||
enabled: contextMenu.publishedFileID === 0
|
||||
|| !App.globalVariables.isSteamVersion()
|
||||
enabled: contextMenu.publishedFileID === 0 || !App.globalVariables.isSteamVersion()
|
||||
onClicked: {
|
||||
deleteDialog.open()
|
||||
deleteDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Open Workshop Page")
|
||||
enabled: contextMenu.publishedFileID !== 0
|
||||
&& App.globalVariables.isSteamVersion()
|
||||
enabled: contextMenu.publishedFileID !== 0 && App.globalVariables.isSteamVersion()
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(
|
||||
"steam://url/CommunityFilePage/" + contextMenu.publishedFileID)
|
||||
Qt.openUrlExternally("steam://url/CommunityFilePage/" + contextMenu.publishedFileID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -344,11 +336,9 @@ Item {
|
||||
modalSource: root.modalSource
|
||||
anchors.centerIn: Overlay.overlay
|
||||
onAccepted: {
|
||||
installedDrawer.close()
|
||||
if (!App.installedListModel.deinstallItemAt(
|
||||
contextMenu.absoluteStoragePath)) {
|
||||
console.error("Unable to uninstall item",
|
||||
contextMenu.absoluteStoragePath)
|
||||
installedDrawer.close();
|
||||
if (!App.installedListModel.deinstallItemAt(contextMenu.absoluteStoragePath)) {
|
||||
console.error("Unable to uninstall item", contextMenu.absoluteStoragePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -358,7 +348,7 @@ Item {
|
||||
fileMode: FileDialog.SaveFile
|
||||
property string absoluteStoragePath
|
||||
onAccepted: {
|
||||
exportFileProgressDialog.open()
|
||||
exportFileProgressDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
@ -371,9 +361,7 @@ Item {
|
||||
modalSource: root.modalSource
|
||||
closePolicy: Popup.NoAutoClose
|
||||
onOpened: {
|
||||
const success = archive.exportProject(
|
||||
exportFileDialog.absoluteStoragePath,
|
||||
exportFileDialog.currentFile)
|
||||
const success = archive.exportProject(exportFileDialog.absoluteStoragePath, exportFileDialog.currentFile);
|
||||
}
|
||||
|
||||
onClosed: exportProgressBar.value = 0
|
||||
@ -399,10 +387,10 @@ Item {
|
||||
id: exportConnections
|
||||
target: archive
|
||||
function onCompressionProgressChanged(file, proc, total, br, bt) {
|
||||
exportProgressBar.value = (br * 100 / bt)
|
||||
exportProgressBar.value = (br * 100 / bt);
|
||||
}
|
||||
function onCompressionFinished() {
|
||||
exportFileProgressDialog.close()
|
||||
exportFileProgressDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -427,31 +415,29 @@ Item {
|
||||
anchors.fill: parent
|
||||
property string filePath
|
||||
onEntered: function (drag) {
|
||||
dropPopup.open()
|
||||
dropPopup.open();
|
||||
}
|
||||
onDropped: function (drop) {
|
||||
dropPopup.close()
|
||||
dropArea.enabled = false
|
||||
dropPopup.close();
|
||||
dropArea.enabled = false;
|
||||
if (drop.urls.length > 1) {
|
||||
importProjectErrorDialog.title = qsTr(
|
||||
"We only support adding one item at once.")
|
||||
importProjectErrorDialog.open()
|
||||
return
|
||||
importProjectErrorDialog.title = qsTr("We only support adding one item at once.");
|
||||
importProjectErrorDialog.open();
|
||||
return;
|
||||
}
|
||||
var file = ""
|
||||
var file = "";
|
||||
// Convert url to string
|
||||
file = "" + drop.urls[0]
|
||||
file = "" + drop.urls[0];
|
||||
if (!file.endsWith('.screenplay')) {
|
||||
importProjectErrorDialog.title = qsTr(
|
||||
"File type not supported. We only support '.screenplay' files.")
|
||||
importProjectErrorDialog.open()
|
||||
return
|
||||
importProjectErrorDialog.title = qsTr("File type not supported. We only support '.screenplay' files.");
|
||||
importProjectErrorDialog.open();
|
||||
return;
|
||||
}
|
||||
importDialog.open()
|
||||
dropArea.filePath = file
|
||||
importDialog.open();
|
||||
dropArea.filePath = file;
|
||||
}
|
||||
onExited: {
|
||||
dropPopup.close()
|
||||
dropPopup.close();
|
||||
}
|
||||
|
||||
Util.Dialog {
|
||||
@ -472,11 +458,9 @@ Item {
|
||||
closePolicy: Popup.NoAutoClose
|
||||
onClosed: importProgressBar.value = 0
|
||||
onOpened: {
|
||||
const success = archive.importProject(
|
||||
dropArea.filePath,
|
||||
App.globalVariables.localStoragePath)
|
||||
print("finished", success)
|
||||
dropArea.filePath = ""
|
||||
const success = archive.importProject(dropArea.filePath, App.globalVariables.localStoragePath);
|
||||
print("finished", success);
|
||||
dropArea.filePath = "";
|
||||
}
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
@ -498,10 +482,10 @@ Item {
|
||||
id: importConnections
|
||||
target: archive
|
||||
function onExtractionProgressChanged(file, proc, total, br, bt) {
|
||||
importProgressBar.value = (br * 100 / bt)
|
||||
importProgressBar.value = (br * 100 / bt);
|
||||
}
|
||||
function onExtractionFinished() {
|
||||
importDialog.close()
|
||||
importDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -517,8 +501,8 @@ Item {
|
||||
modal: true
|
||||
onOpened: fileDropAnimation.state = "fileDrop"
|
||||
onClosed: {
|
||||
fileDropAnimation.state = ""
|
||||
dropArea.enabled = true
|
||||
fileDropAnimation.state = "";
|
||||
dropArea.enabled = true;
|
||||
}
|
||||
|
||||
Util.FileDropAnimation {
|
||||
|
@ -20,32 +20,30 @@ Item {
|
||||
property bool containsAudio: false
|
||||
property int version: App.globalVariables.version
|
||||
property bool hasLicense: {
|
||||
if ((root.version === GlobalVariables.OpenSourceStandalone
|
||||
|| root.version === GlobalVariables.OpenSourceSteam)
|
||||
&& root.type === Util.ContentTypes.InstalledType.GodotWallpaper) {
|
||||
return false
|
||||
if ((root.version === GlobalVariables.OpenSourceStandalone || root.version === GlobalVariables.OpenSourceSteam) && root.type === Util.ContentTypes.InstalledType.GodotWallpaper) {
|
||||
return false;
|
||||
}
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
|
||||
signal clicked(var screenId, var type)
|
||||
signal openContextMenu(var point)
|
||||
signal openOpenLicensePopup()
|
||||
signal openOpenLicensePopup
|
||||
|
||||
width: 320
|
||||
height: 180
|
||||
onTypeChanged: {
|
||||
if (App.util.isWidget(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg";
|
||||
return;
|
||||
}
|
||||
if (App.util.isScene(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg";
|
||||
return;
|
||||
}
|
||||
if (App.util.isVideo(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,10 +51,10 @@ Item {
|
||||
running: true
|
||||
onTriggered: showAnim.start()
|
||||
interval: {
|
||||
var itemIndexMax = itemIndex
|
||||
var itemIndexMax = itemIndex;
|
||||
if (itemIndex > 30)
|
||||
itemIndexMax = 3
|
||||
5 * itemIndexMax * Math.random()
|
||||
itemIndexMax = 3;
|
||||
5 * itemIndexMax * Math.random();
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,26 +255,25 @@ Item {
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onEntered: {
|
||||
if (!root.hasLicense)
|
||||
return
|
||||
root.state = "hover"
|
||||
screenPlayItemImage.state = "hover"
|
||||
screenPlayItemImage.enter()
|
||||
return;
|
||||
root.state = "hover";
|
||||
screenPlayItemImage.state = "hover";
|
||||
screenPlayItemImage.enter();
|
||||
}
|
||||
onExited: {
|
||||
root.state = ""
|
||||
screenPlayItemImage.state = "loaded"
|
||||
screenPlayItemImage.exit()
|
||||
root.state = "";
|
||||
screenPlayItemImage.state = "loaded";
|
||||
screenPlayItemImage.exit();
|
||||
}
|
||||
onClicked: function (mouse) {
|
||||
if (!root.hasLicense) {
|
||||
root.openOpenLicensePopup()
|
||||
return
|
||||
root.openOpenLicensePopup();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
root.clicked(root.screenId, root.type)
|
||||
root.clicked(root.screenId, root.type);
|
||||
else if (mouse.button === Qt.RightButton)
|
||||
root.openContextMenu(Qt.point(mouseX, mouseY))
|
||||
root.openContextMenu(Qt.point(mouseX, mouseY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,31 +11,28 @@ Item {
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
Component.onCompleted: {
|
||||
stackView.push(
|
||||
"qrc:/qml/ScreenPlayApp/qml/Installed/InstalledView.qml")
|
||||
startTimer.start()
|
||||
stackView.push("qrc:/qml/ScreenPlayApp/qml/Installed/InstalledView.qml");
|
||||
startTimer.start();
|
||||
}
|
||||
|
||||
function openExitDialog(){
|
||||
exitDialog.open()
|
||||
function openExitDialog() {
|
||||
exitDialog.open();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: startTimer
|
||||
interval: 10
|
||||
onTriggered: App.installedListModel.reset()
|
||||
onTriggered: App.installedListModel.reset()
|
||||
}
|
||||
|
||||
|
||||
function switchPage(name) {
|
||||
|
||||
if (nav.currentNavigationName === name) {
|
||||
if (name === "Installed")
|
||||
App.installedListModel.reset();
|
||||
}
|
||||
stackView.replace("qrc:/qml/ScreenPlayApp/qml/" + name + "/" + name + "View.qml", {
|
||||
"modalSource": content
|
||||
});
|
||||
"modalSource": content
|
||||
});
|
||||
nav.setNavigation(name);
|
||||
}
|
||||
|
||||
@ -94,7 +91,6 @@ Item {
|
||||
target: App.screenPlayManager
|
||||
}
|
||||
|
||||
|
||||
StackView {
|
||||
id: stackView
|
||||
objectName: "stackView"
|
||||
|
@ -79,22 +79,28 @@ ColumnLayout {
|
||||
textRole: "text"
|
||||
valueRole: "value"
|
||||
currentIndex: root.indexOfValue(settingsComboBox.model, App.settings.videoFillMode)
|
||||
model: [{
|
||||
model: [
|
||||
{
|
||||
"value": Util.Video.FillMode.Stretch,
|
||||
"text": qsTr("Stretch")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Video.FillMode.Fill,
|
||||
"text": qsTr("Fill")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Video.FillMode.Contain,
|
||||
"text": qsTr("Contain")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Video.FillMode.Cover,
|
||||
"text": qsTr("Cover")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Video.FillMode.Scale_Down,
|
||||
"text": qsTr("Scale_Down")
|
||||
}]
|
||||
}
|
||||
]
|
||||
onActivated: {
|
||||
App.screenPlayManager.setWallpaperFillModeAtMonitorIndex(activeMonitorIndex, settingsComboBox.currentValue);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
@ -69,7 +68,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
function resize() {
|
||||
print("resize")
|
||||
print("resize");
|
||||
var absoluteDesktopSize = App.monitorListModel.absoluteDesktopSize();
|
||||
var isWidthGreaterThanHeight = false;
|
||||
var windowsDelta = 0;
|
||||
|
@ -6,7 +6,6 @@ import QtQuick.Dialogs
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -17,7 +17,7 @@ Util.Popup {
|
||||
width: 1366
|
||||
height: 768
|
||||
onOpened: {
|
||||
monitorSelection.selectMonitorAt(0)
|
||||
monitorSelection.selectMonitorAt(0);
|
||||
}
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -31,7 +31,7 @@ Util.Popup {
|
||||
}
|
||||
Connections {
|
||||
function onRequestToggleWallpaperConfiguration() {
|
||||
root.open()
|
||||
root.open();
|
||||
}
|
||||
|
||||
target: App.util
|
||||
@ -73,7 +73,6 @@ Util.Popup {
|
||||
Timeline {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -127,21 +126,18 @@ Util.Popup {
|
||||
availableHeight: 150
|
||||
onRequestProjectSettings: function (index, installedType, appID) {
|
||||
if (installedType === Util.ContentTypes.InstalledType.VideoWallpaper) {
|
||||
videoControlWrapper.state = "visible"
|
||||
customPropertiesGridView.visible = false
|
||||
const wallpaper = App.screenPlayManager.getWallpaperByAppID(
|
||||
appID)
|
||||
videoControlWrapper.wallpaper = wallpaper
|
||||
videoControlWrapper.state = "visible";
|
||||
customPropertiesGridView.visible = false;
|
||||
const wallpaper = App.screenPlayManager.getWallpaperByAppID(appID);
|
||||
videoControlWrapper.wallpaper = wallpaper;
|
||||
} else {
|
||||
videoControlWrapper.state = "hidden"
|
||||
customPropertiesGridView.visible = true
|
||||
if (!App.screenPlayManager.requestProjectSettingsAtMonitorIndex(
|
||||
index)) {
|
||||
console.warn("Unable to get requested settings from index: ",
|
||||
index)
|
||||
videoControlWrapper.state = "hidden";
|
||||
customPropertiesGridView.visible = true;
|
||||
if (!App.screenPlayManager.requestProjectSettingsAtMonitorIndex(index)) {
|
||||
console.warn("Unable to get requested settings from index: ", index);
|
||||
}
|
||||
}
|
||||
activeMonitorIndex = index
|
||||
activeMonitorIndex = index;
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -153,7 +149,7 @@ Util.Popup {
|
||||
|
||||
Connections {
|
||||
function onProjectSettingsListModelResult(listModel) {
|
||||
customPropertiesGridView.projectSettingsListmodelRef = listModel
|
||||
customPropertiesGridView.projectSettingsListmodelRef = listModel;
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
@ -176,38 +172,31 @@ Util.Popup {
|
||||
highlighted: true
|
||||
text: qsTr("Remove selected")
|
||||
font.family: App.settings.font
|
||||
enabled: monitorSelection.activeMonitors.length == 1
|
||||
&& App.screenPlayManager.activeWallpaperCounter > 0
|
||||
enabled: monitorSelection.activeMonitors.length == 1 && App.screenPlayManager.activeWallpaperCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeWallpaperAt(
|
||||
monitorSelection.activeMonitors[0]))
|
||||
print("Unable to close singel wallpaper")
|
||||
if (!App.screenPlayManager.removeWallpaperAt(monitorSelection.activeMonitors[0]))
|
||||
print("Unable to close singel wallpaper");
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnRemoveAllWallpape
|
||||
|
||||
text: qsTr("Remove all ")
|
||||
+ App.screenPlayManager.activeWallpaperCounter + " " + qsTr(
|
||||
"Wallpapers")
|
||||
text: qsTr("Remove all ") + App.screenPlayManager.activeWallpaperCounter + " " + qsTr("Wallpapers")
|
||||
Material.background: Material.accent
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
enabled: App.screenPlayManager.activeWallpaperCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeAllWallpapers(
|
||||
true))
|
||||
print("Unable to close all wallpaper!")
|
||||
if (!App.screenPlayManager.removeAllWallpapers(true))
|
||||
print("Unable to close all wallpaper!");
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnRemoveAllWidgets
|
||||
|
||||
text: qsTr("Remove all ")
|
||||
+ App.screenPlayManager.activeWidgetsCounter + " " + qsTr(
|
||||
"Widgets")
|
||||
text: qsTr("Remove all ") + App.screenPlayManager.activeWidgetsCounter + " " + qsTr("Widgets")
|
||||
Material.background: Material.accent
|
||||
Material.foreground: Material.primaryTextColor
|
||||
highlighted: true
|
||||
@ -215,15 +204,14 @@ Util.Popup {
|
||||
enabled: App.screenPlayManager.activeWidgetsCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeAllWidgets())
|
||||
print("Unable to close all widgets!")
|
||||
print("Unable to close all widgets!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||
Material.background)
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
|
||||
@ -290,7 +278,7 @@ Util.Popup {
|
||||
Connections {
|
||||
function onProfilesSaved() {
|
||||
if (root.opened)
|
||||
saveNotification.open()
|
||||
saveNotification.open();
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
|
@ -6,12 +6,16 @@ Pane {
|
||||
|
||||
Component.onCompleted: {
|
||||
// Add the second handle at 100% after the component is fully created
|
||||
sliderHandles.append({"position": sliderLine.width});
|
||||
sliderHandles.append({
|
||||
"position": sliderLine.width
|
||||
});
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: sliderHandles
|
||||
ListElement { position: 0 } // Initial handle at 0%
|
||||
ListElement {
|
||||
position: 0
|
||||
} // Initial handle at 0%
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -25,7 +29,9 @@ Pane {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
var newHandlePosition = Math.max(0, Math.min(mouseX, sliderLine.width));
|
||||
sliderHandles.append({"position": newHandlePosition});
|
||||
sliderHandles.append({
|
||||
"position": newHandlePosition
|
||||
});
|
||||
// Sort handles after adding a new one
|
||||
sortHandles();
|
||||
}
|
||||
@ -51,7 +57,9 @@ Pane {
|
||||
drag.maximumX: getMaximumX(index)
|
||||
|
||||
onReleased: {
|
||||
sliderHandles.set(index, {"position": handle.x + width / 2});
|
||||
sliderHandles.set(index, {
|
||||
"position": handle.x + width / 2
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,9 +74,8 @@ Pane {
|
||||
}
|
||||
|
||||
function sortHandles() {
|
||||
sliderHandles.sort(function(a, b) {
|
||||
sliderHandles.sort(function (a, b) {
|
||||
return a.position - b.position;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ Util.Popup {
|
||||
id: root
|
||||
property ApplicationWindow applicationWindow
|
||||
contentItem: Pane {
|
||||
background: Item {
|
||||
}
|
||||
background: Item {}
|
||||
padding: 20
|
||||
bottomPadding: 10
|
||||
ColumnLayout {
|
||||
|
@ -22,29 +22,29 @@ Rectangle {
|
||||
signal changePage(string name)
|
||||
|
||||
function setActive(active) {
|
||||
navActive = active
|
||||
navActive = active;
|
||||
if (active)
|
||||
root.state = "enabled"
|
||||
root.state = "enabled";
|
||||
else
|
||||
root.state = "disabled"
|
||||
root.state = "disabled";
|
||||
}
|
||||
function setNavigation(name) {
|
||||
for (var i = 0; i < navArray.length; i++) {
|
||||
if (navArray[i].objectName === name) {
|
||||
navArray[i].state = "active"
|
||||
root.currentNavigationName = name
|
||||
tabBar.currentIndex = navArray[i].index
|
||||
navArray[i].state = "active";
|
||||
root.currentNavigationName = name;
|
||||
tabBar.currentIndex = navArray[i].index;
|
||||
} else {
|
||||
navArray[i].state = "inactive"
|
||||
navArray[i].state = "inactive";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPageChanged(name) {
|
||||
if (!navActive)
|
||||
return
|
||||
root.changePage(name)
|
||||
setNavigation(name)
|
||||
return;
|
||||
root.changePage(name);
|
||||
setNavigation(name);
|
||||
}
|
||||
|
||||
implicitWidth: 1366
|
||||
@ -58,11 +58,11 @@ Rectangle {
|
||||
|
||||
Connections {
|
||||
function onRequestNavigationActive(isActive) {
|
||||
setActive(isActive)
|
||||
setActive(isActive);
|
||||
}
|
||||
|
||||
function onRequestNavigation(nav) {
|
||||
onPageChanged(nav)
|
||||
onPageChanged(nav);
|
||||
}
|
||||
|
||||
target: App.util
|
||||
@ -90,7 +90,7 @@ Rectangle {
|
||||
objectName: "Create"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Create")
|
||||
root.onPageChanged("Create");
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ Rectangle {
|
||||
objectName: "Workshop"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Workshop")
|
||||
root.onPageChanged("Workshop");
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ Rectangle {
|
||||
objectName: "Installed"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Installed")
|
||||
root.onPageChanged("Installed");
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ Rectangle {
|
||||
objectName: "Community"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Community")
|
||||
root.onPageChanged("Community");
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ Rectangle {
|
||||
objectName: "Settings"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_settings.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Settings")
|
||||
root.onPageChanged("Settings");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,7 +163,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
SwipeView {
|
||||
id:premium
|
||||
id: premium
|
||||
clip: true
|
||||
anchors {
|
||||
top: parent.top
|
||||
@ -177,16 +177,16 @@ Rectangle {
|
||||
|
||||
currentIndex: {
|
||||
if (App.globalVariables.isBasicVersion())
|
||||
return 0
|
||||
return 0;
|
||||
if (App.globalVariables.isProVersion())
|
||||
return 1
|
||||
return 1;
|
||||
if (App.globalVariables.isUltraVersion())
|
||||
return 2
|
||||
return 0
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ScreenPlayProPopup {
|
||||
id:screenPlayProView
|
||||
id: screenPlayProView
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
@ -197,7 +197,6 @@ Rectangle {
|
||||
}
|
||||
ToolButton {
|
||||
text: qsTr("ScreenPlay Pro Active")
|
||||
|
||||
}
|
||||
ToolButton {
|
||||
text: qsTr("ScreenPlay ULTRA Active")
|
||||
@ -210,8 +209,7 @@ Rectangle {
|
||||
width: quickActionRow.width + 5
|
||||
height: quickActionRow.height - 16
|
||||
color: Material.theme === Material.Light ? Material.background : "#242424"
|
||||
border.color: Material.theme === Material.Light ? Material.iconDisabledColor : Qt.darker(
|
||||
Material.background)
|
||||
border.color: Material.theme === Material.Light ? Material.iconDisabledColor : Qt.darker(Material.background)
|
||||
border.width: 1
|
||||
radius: 3
|
||||
}
|
||||
@ -224,13 +222,12 @@ Rectangle {
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
property bool contentActive: App.screenPlayManager.activeWallpaperCounter > 0
|
||||
|| App.screenPlayManager.activeWidgetsCounter > 0
|
||||
property bool contentActive: App.screenPlayManager.activeWallpaperCounter > 0 || App.screenPlayManager.activeWidgetsCounter > 0
|
||||
|
||||
onContentActiveChanged: {
|
||||
if (!contentActive) {
|
||||
miMuteAll.soundEnabled = true
|
||||
miStopAll.isPlaying = true
|
||||
miMuteAll.soundEnabled = true;
|
||||
miStopAll.isPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,12 +243,11 @@ Rectangle {
|
||||
property bool soundEnabled: true
|
||||
onSoundEnabledChanged: {
|
||||
if (miMuteAll.soundEnabled) {
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "false")
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "false");
|
||||
} else {
|
||||
miMuteAll.icon.source
|
||||
= "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume_mute.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "true")
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume_mute.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "true");
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,13 +266,11 @@ Rectangle {
|
||||
property bool isPlaying: true
|
||||
onIsPlayingChanged: {
|
||||
if (miStopAll.isPlaying) {
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying",
|
||||
"true")
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying", "true");
|
||||
} else {
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_play.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying",
|
||||
"false")
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_play.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying", "false");
|
||||
}
|
||||
}
|
||||
hoverEnabled: true
|
||||
@ -291,10 +285,10 @@ Rectangle {
|
||||
icon.width: root.iconWidth
|
||||
icon.height: root.iconHeight
|
||||
onClicked: {
|
||||
App.screenPlayManager.removeAllWallpapers(true)
|
||||
App.screenPlayManager.removeAllWidgets(true)
|
||||
miStopAll.isPlaying = true
|
||||
miMuteAll.soundEnabled = true
|
||||
App.screenPlayManager.removeAllWallpapers(true);
|
||||
App.screenPlayManager.removeAllWidgets(true);
|
||||
miStopAll.isPlaying = true;
|
||||
miMuteAll.soundEnabled = true;
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: settingsBool
|
||||
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: settingsButton
|
||||
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -3,7 +3,6 @@ import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: settingsHeader
|
||||
|
||||
|
@ -75,8 +75,7 @@ Item {
|
||||
// }
|
||||
// }
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingBool {
|
||||
height: 70
|
||||
@ -88,8 +87,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Set save location")
|
||||
@ -133,8 +131,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsComboBox {
|
||||
id: settingsLanguage
|
||||
@ -199,15 +196,14 @@ Item {
|
||||
}
|
||||
}
|
||||
onActivated: {
|
||||
let language = settingsLanguage.comboBox.currentValue
|
||||
let language = settingsLanguage.comboBox.currentValue;
|
||||
App.settings.setLanguage(language);
|
||||
App.settings.retranslateUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsComboBox {
|
||||
id: settingsTheme
|
||||
@ -261,8 +257,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsComboBox {
|
||||
id: cbVideoFillMode
|
||||
@ -446,8 +441,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsButton {
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_launch.svg"
|
||||
@ -457,8 +451,7 @@ Item {
|
||||
onButtonPressed: Qt.openUrlExternally("https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Third Party Software")
|
||||
@ -482,8 +475,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Logs")
|
||||
@ -495,8 +487,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
SettingsHorizontalSeperator {}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Data Protection")
|
||||
|
@ -13,8 +13,8 @@ Item {
|
||||
Component.onCompleted: {
|
||||
if (App.globalVariables.isSteamVersion()) {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshop.qml", {
|
||||
"modalSource": modalSource
|
||||
});
|
||||
"modalSource": modalSource
|
||||
});
|
||||
} else {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/Forum.qml");
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import QtQuick.Controls.Material.impl
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Dialog {
|
||||
id: root
|
||||
property Item modalSource
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
/*!
|
||||
\qmltype Image Selector
|
||||
\brief A image selector with popup preview.
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Text {
|
||||
text: qsTr("Headline Section")
|
||||
font.pointSize: 14
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Dialogs
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
/*!
|
||||
\qmltype Image Selector
|
||||
\brief A image selector with popup preview.
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls as QQC
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
|
@ -17,10 +17,10 @@ Item {
|
||||
|
||||
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)
|
||||
});
|
||||
"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) {
|
||||
|
@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: tag
|
||||
|
||||
|
@ -4,7 +4,6 @@ import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
@ -154,8 +153,8 @@ Item {
|
||||
onClicked: {
|
||||
if (root.state === "add") {
|
||||
listModel.append({
|
||||
"_name": textField.text
|
||||
});
|
||||
"_name": textField.text
|
||||
});
|
||||
textField.clear();
|
||||
root.state = "";
|
||||
} else {
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
|
@ -45,8 +45,8 @@ Item {
|
||||
onLoadProgressChanged: {
|
||||
if (loadProgress === 100) {
|
||||
webView.runJavaScript(root.getSetVideoCommand(), function (result) {
|
||||
Wallpaper.requestFadeIn();
|
||||
});
|
||||
Wallpaper.requestFadeIn();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,8 +48,7 @@ Rectangle {
|
||||
onPositionChanged: {
|
||||
setPosition();
|
||||
}
|
||||
onClicked: {
|
||||
}
|
||||
onClicked: {}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -213,8 +212,8 @@ Rectangle {
|
||||
text: "Exit"
|
||||
onClicked: {
|
||||
Qt.callLater(function () {
|
||||
Wallpaper.terminate();
|
||||
});
|
||||
Wallpaper.terminate();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,21 +33,21 @@ Rectangle {
|
||||
break;
|
||||
case ContentTypes.InstalledType.HTMLWallpaper:
|
||||
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml", {
|
||||
"url": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
||||
});
|
||||
"url": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
||||
});
|
||||
break;
|
||||
case ContentTypes.InstalledType.QMLWallpaper:
|
||||
loader.source = Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute);
|
||||
break;
|
||||
case ContentTypes.InstalledType.WebsiteWallpaper:
|
||||
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml", {
|
||||
"url": Wallpaper.projectSourceFileAbsolute
|
||||
});
|
||||
"url": Wallpaper.projectSourceFileAbsolute
|
||||
});
|
||||
break;
|
||||
case ContentTypes.InstalledType.GifWallpaper:
|
||||
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/GifWallpaper.qml", {
|
||||
"source": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
||||
});
|
||||
"source": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -193,11 +193,11 @@ Rectangle {
|
||||
// Must be callLater so we do not kill on startup
|
||||
// See emit window.qmlStart();
|
||||
Qt.callLater(function () {
|
||||
loader.source = "";
|
||||
Qt.callLater(function () {
|
||||
Wallpaper.terminate();
|
||||
});
|
||||
loader.source = "";
|
||||
Qt.callLater(function () {
|
||||
Wallpaper.terminate();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
@ -200,7 +200,7 @@ Item {
|
||||
if (!screenPlayItem.hasMenuOpen)
|
||||
screenPlayItem.state = "visible";
|
||||
}
|
||||
onClicked: function(mouse) {
|
||||
onClicked: function (mouse) {
|
||||
checkBox.toggle();
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
itemClicked(screenPlayItem.folderName, type, checkBox.checkState === Qt.Checked);
|
||||
|
@ -54,8 +54,8 @@ Drawer {
|
||||
if (tags.length > 1) {
|
||||
for (var i in tags) {
|
||||
tagListModel.append({
|
||||
"name": tags[i]
|
||||
});
|
||||
"name": tags[i]
|
||||
});
|
||||
}
|
||||
rpTagList.model = tagListModel;
|
||||
} else {
|
||||
@ -284,7 +284,7 @@ Drawer {
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: 150
|
||||
Layout.fillHeight: true //txtDescription.paintedHeight > 100
|
||||
//txtDescription.paintedHeight > 100
|
||||
color: Material.backgroundColor
|
||||
radius: 3
|
||||
|
||||
|
@ -17,11 +17,11 @@ Item {
|
||||
Component.onCompleted: {
|
||||
if (screenPlayWorkshop.init()) {
|
||||
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshopStartPage.qml", {
|
||||
"stackView": stackView,
|
||||
"screenPlayWorkshop": screenPlayWorkshop,
|
||||
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
||||
"background": background
|
||||
});
|
||||
"stackView": stackView,
|
||||
"screenPlayWorkshop": screenPlayWorkshop,
|
||||
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
||||
"background": background
|
||||
});
|
||||
} else {
|
||||
popupOffline.open();
|
||||
}
|
||||
|
@ -252,10 +252,10 @@ Item {
|
||||
icon.source: "qrc:/qml/ScreenPlayWorkshop/assets/icons/icon_account_circle.svg"
|
||||
onClicked: {
|
||||
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/SteamProfile.qml", {
|
||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||
"steamWorkshop": root.steamWorkshop,
|
||||
"stackView": root.stackView
|
||||
});
|
||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||
"steamWorkshop": root.steamWorkshop,
|
||||
"stackView": root.stackView
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,10 +272,10 @@ Item {
|
||||
icon.source: "qrc:/qml/ScreenPlayWorkshop/assets/icons/icon_file_upload.svg"
|
||||
onClicked: {
|
||||
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/upload/UploadProject.qml", {
|
||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||
"steamWorkshop": root.steamWorkshop,
|
||||
"stackView": root.stackView
|
||||
});
|
||||
"screenPlayWorkshop": root.screenPlayWorkshop,
|
||||
"steamWorkshop": root.steamWorkshop,
|
||||
"stackView": root.stackView
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,13 +320,13 @@ Item {
|
||||
print("EDITING FINISHED", root.state);
|
||||
if (tiSearch.text === "") {
|
||||
Qt.callLater(function () {
|
||||
root.steamWorkshop.searchWorkshop(Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTrend);
|
||||
});
|
||||
root.steamWorkshop.searchWorkshop(Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTrend);
|
||||
});
|
||||
return;
|
||||
}
|
||||
Qt.callLater(function () {
|
||||
root.steamWorkshop.searchWorkshopByText(tiSearch.text);
|
||||
});
|
||||
root.steamWorkshop.searchWorkshopByText(tiSearch.text);
|
||||
});
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -346,14 +346,14 @@ Item {
|
||||
root.state = "searching";
|
||||
tiSearch.clear();
|
||||
Qt.callLater(function () {
|
||||
root.steamWorkshop.searchWorkshop(Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTrend);
|
||||
});
|
||||
root.steamWorkshop.searchWorkshop(Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTrend);
|
||||
});
|
||||
return;
|
||||
}
|
||||
root.state = "searching";
|
||||
Qt.callLater(function () {
|
||||
root.steamWorkshop.searchWorkshopByText(tiSearch.text);
|
||||
});
|
||||
root.steamWorkshop.searchWorkshopByText(tiSearch.text);
|
||||
});
|
||||
}
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
@ -401,37 +401,48 @@ Item {
|
||||
valueRole: "value"
|
||||
currentIndex: 2
|
||||
Layout.preferredHeight: searchWrapper.height
|
||||
model: [{
|
||||
model: [
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByVote,
|
||||
"text": qsTr("Ranked By Vote")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByPublicationDate,
|
||||
"text": qsTr("Publication Date")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTrend,
|
||||
"text": qsTr("Ranked By Trend")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_FavoritedByFriendsRankedByPublicationDate,
|
||||
"text": qsTr("Favorited By Friends")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_CreatedByFriendsRankedByPublicationDate,
|
||||
"text": qsTr("Created By Friends")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate,
|
||||
"text": qsTr("Created By Followed Users")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_NotYetRated,
|
||||
"text": qsTr("Not Yet Rated")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTotalVotesAsc,
|
||||
"text": qsTr("Total VotesAsc")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByVotesUp,
|
||||
"text": qsTr("Votes Up")
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"value": Util.Steam.EUGCQuery.K_EUGCQuery_RankedByTotalUniqueSubscriptions,
|
||||
"text": qsTr("Total Unique Subscriptions")
|
||||
}]
|
||||
}
|
||||
]
|
||||
onActivated: {
|
||||
root.state = "searching";
|
||||
root.steamWorkshop.searchWorkshop(cbQuerySort.currentValue);
|
||||
|
@ -20,11 +20,11 @@ Window {
|
||||
if (screenPlayWorkshop.init()) {
|
||||
print("init");
|
||||
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshopStartPage.qml", {
|
||||
"stackView": stackView,
|
||||
"screenPlayWorkshop": screenPlayWorkshop,
|
||||
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
||||
"background": background
|
||||
});
|
||||
"stackView": stackView,
|
||||
"screenPlayWorkshop": screenPlayWorkshop,
|
||||
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
||||
"background": background
|
||||
});
|
||||
} else {
|
||||
popupOffline.open();
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts
|
||||
import ScreenPlayApp
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
@ -14,8 +13,8 @@ Item {
|
||||
Component.onCompleted: {
|
||||
if (App.globalVariables.isSteamVersion()) {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayApp/qml/Workshop/SteamWorkshop.qml", {
|
||||
"modalSource": modalSource
|
||||
});
|
||||
"modalSource": modalSource
|
||||
});
|
||||
} else {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayApp/qml/Workshop/Forum.qml");
|
||||
}
|
||||
|
@ -497,8 +497,7 @@ Page {
|
||||
State {
|
||||
name: "uploading"
|
||||
|
||||
PropertyChanges {
|
||||
}
|
||||
PropertyChanges {}
|
||||
},
|
||||
State {
|
||||
name: "uploadComplete"
|
||||
|
Loading…
Reference in New Issue
Block a user