mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Formatting
This commit is contained in:
parent
a4aeccbd1f
commit
6b30e3f242
@ -12,5 +12,4 @@ Item {
|
||||
anchors.fill: parent
|
||||
color: "gray"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ Item {
|
||||
//Image
|
||||
property real imgOpacity: .75
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: gradient
|
||||
anchors.fill: parent
|
||||
@ -44,22 +43,23 @@ Item {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
Component.onCompleted: {
|
||||
attractor.pointX = parent.width * .5
|
||||
attractor.pointY = 0
|
||||
attractor.pointX = parent.width * .5;
|
||||
attractor.pointY = 0;
|
||||
}
|
||||
|
||||
onPressed: {
|
||||
onPressed:
|
||||
//attractor.enabled = true
|
||||
{
|
||||
}
|
||||
onPositionChanged: {
|
||||
attractor.pointX = mouseX
|
||||
attractor.pointY = mouseY
|
||||
rct.x = mouseX
|
||||
rct.y = mouseY
|
||||
|
||||
attractor.pointX = mouseX;
|
||||
attractor.pointY = mouseY;
|
||||
rct.x = mouseX;
|
||||
rct.y = mouseY;
|
||||
}
|
||||
onReleased: {
|
||||
onReleased:
|
||||
//attractor.enabled = false
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,6 @@ Item {
|
||||
color: "orange"
|
||||
width: 40
|
||||
height: 40
|
||||
|
||||
}
|
||||
|
||||
Attractor {
|
||||
@ -81,7 +80,6 @@ Item {
|
||||
top: parent.top
|
||||
topMargin: 100
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,20 +29,23 @@ Item {
|
||||
|
||||
function timeChanged() {
|
||||
var date = new Date;
|
||||
hours = internationalTime ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
|
||||
night = ( hours < 7 || hours > 19 )
|
||||
minutes = internationalTime ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
|
||||
hours = internationalTime ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours();
|
||||
night = (hours < 7 || hours > 19);
|
||||
minutes = internationalTime ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes();
|
||||
seconds = date.getUTCSeconds();
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 100; running: true; repeat: true;
|
||||
interval: 100
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: clock.timeChanged()
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.centerIn: parent
|
||||
width: 200; height: 240
|
||||
width: 200
|
||||
height: 240
|
||||
|
||||
Rectangle {
|
||||
width: 200
|
||||
@ -51,57 +54,78 @@ Item {
|
||||
radius: width
|
||||
}
|
||||
|
||||
|
||||
Image {
|
||||
x: 92.5; y: 27
|
||||
x: 92.5
|
||||
y: 27
|
||||
source: "hour.png"
|
||||
transform: Rotation {
|
||||
id: hourRotation
|
||||
origin.x: 7.5; origin.y: 73;
|
||||
origin.x: 7.5
|
||||
origin.y: 73
|
||||
angle: (clock.hours * 30) + (clock.minutes * 0.5)
|
||||
Behavior on angle {
|
||||
SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
|
||||
SpringAnimation {
|
||||
spring: 2
|
||||
damping: 0.2
|
||||
modulus: 360
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
x: 93.5; y: 17
|
||||
x: 93.5
|
||||
y: 17
|
||||
source: "minute.png"
|
||||
transform: Rotation {
|
||||
id: minuteRotation
|
||||
origin.x: 6.5; origin.y: 83;
|
||||
origin.x: 6.5
|
||||
origin.y: 83
|
||||
angle: clock.minutes * 6
|
||||
Behavior on angle {
|
||||
SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
|
||||
SpringAnimation {
|
||||
spring: 2
|
||||
damping: 0.2
|
||||
modulus: 360
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
x: 97.5; y: 20
|
||||
x: 97.5
|
||||
y: 20
|
||||
source: "second.png"
|
||||
transform: Rotation {
|
||||
id: secondRotation
|
||||
origin.x: 2.5; origin.y: 80;
|
||||
origin.x: 2.5
|
||||
origin.y: 80
|
||||
angle: clock.seconds * 6
|
||||
Behavior on angle {
|
||||
SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
|
||||
SpringAnimation {
|
||||
spring: 2
|
||||
damping: 0.2
|
||||
modulus: 360
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.centerIn: background; source: "center.png"
|
||||
anchors.centerIn: background
|
||||
source: "center.png"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: cityLabel
|
||||
y: 210; anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 210
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "white"
|
||||
font.family: "Helvetica"
|
||||
font.bold: true; font.pixelSize: 16
|
||||
style: Text.Raised; styleColor: "black"
|
||||
font.bold: true
|
||||
font.pixelSize: 16
|
||||
style: Text.Raised
|
||||
styleColor: "black"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,15 +19,39 @@ Item {
|
||||
snapMode: ListView.SnapOneItem
|
||||
highlightRangeMode: ListView.ApplyRange
|
||||
|
||||
delegate: Clock { city: cityName; shift: timeShift }
|
||||
delegate: Clock {
|
||||
city: cityName
|
||||
shift: timeShift
|
||||
}
|
||||
model: ListModel {
|
||||
ListElement { cityName: "New York"; timeShift: -4 }
|
||||
ListElement { cityName: "London"; timeShift: 0 }
|
||||
ListElement { cityName: "Oslo"; timeShift: 1 }
|
||||
ListElement { cityName: "Mumbai"; timeShift: 5.5 }
|
||||
ListElement { cityName: "Tokyo"; timeShift: 9 }
|
||||
ListElement { cityName: "Brisbane"; timeShift: 10 }
|
||||
ListElement { cityName: "Los Angeles"; timeShift: -8 }
|
||||
ListElement {
|
||||
cityName: "New York"
|
||||
timeShift: -4
|
||||
}
|
||||
ListElement {
|
||||
cityName: "London"
|
||||
timeShift: 0
|
||||
}
|
||||
ListElement {
|
||||
cityName: "Oslo"
|
||||
timeShift: 1
|
||||
}
|
||||
ListElement {
|
||||
cityName: "Mumbai"
|
||||
timeShift: 5.5
|
||||
}
|
||||
ListElement {
|
||||
cityName: "Tokyo"
|
||||
timeShift: 9
|
||||
}
|
||||
ListElement {
|
||||
cityName: "Brisbane"
|
||||
timeShift: 10
|
||||
}
|
||||
ListElement {
|
||||
cityName: "Los Angeles"
|
||||
timeShift: -8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +62,11 @@ Item {
|
||||
source: "arrow.png"
|
||||
rotation: -90
|
||||
opacity: clockview.atXBeginning ? 0 : 0.5
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 500
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
@ -48,6 +76,10 @@ Item {
|
||||
source: "arrow.png"
|
||||
rotation: 90
|
||||
opacity: clockview.atXEnd ? 0 : 0.5
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 500
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,37 +8,31 @@ Item {
|
||||
implicitHeight: 100
|
||||
|
||||
function timeChanged() {
|
||||
var date = new Date
|
||||
var hours = ""
|
||||
var minutes = ""
|
||||
var seconds = ""
|
||||
|
||||
var date = new Date;
|
||||
var hours = "";
|
||||
var minutes = "";
|
||||
var seconds = "";
|
||||
if (date.getHours() < 10) {
|
||||
hours = "0" + date.getHours().toString()
|
||||
hours = "0" + date.getHours().toString();
|
||||
} else {
|
||||
hours = date.getHours().toString()
|
||||
hours = date.getHours().toString();
|
||||
}
|
||||
|
||||
if (date.getMinutes() < 10) {
|
||||
minutes = "0" + date.getMinutes().toString()
|
||||
minutes = "0" + date.getMinutes().toString();
|
||||
} else {
|
||||
minutes = date.getMinutes().toString()
|
||||
minutes = date.getMinutes().toString();
|
||||
}
|
||||
|
||||
if (date.getSeconds() < 10) {
|
||||
seconds = "0" + date.getSeconds().toString()
|
||||
seconds = "0" + date.getSeconds().toString();
|
||||
} else {
|
||||
seconds = date.getSeconds().toString()
|
||||
seconds = date.getSeconds().toString();
|
||||
}
|
||||
|
||||
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
||||
|
||||
var day = days[date.getDay()];
|
||||
var month = months[date.getMonth()];
|
||||
|
||||
txtClock.text = hours + ":" + minutes + ":" + seconds
|
||||
txtDate.text = day + ", " +date.getDay() + " " + month + ", " + date.getFullYear()
|
||||
txtClock.text = hours + ":" + minutes + ":" + seconds;
|
||||
txtDate.text = day + ", " + date.getDay() + " " + month + ", " + date.getFullYear();
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
@ -40,8 +40,8 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
print(model.link)
|
||||
Qt.openUrlExternally(model.link)
|
||||
print(model.link);
|
||||
Qt.openUrlExternally(model.link);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,25 +17,46 @@ Item {
|
||||
source: "https://rss.dw.com/atom/rss-en-all"
|
||||
query: "/feed/entry"
|
||||
onCountChanged: {
|
||||
console.log("count ",count)
|
||||
console.log("count ", count);
|
||||
}
|
||||
onStatusChanged: {
|
||||
print("status ",status)
|
||||
console.log("count ",count)
|
||||
|
||||
print("status ", status);
|
||||
console.log("count ", count);
|
||||
if (status === XmlListModel.Error) {
|
||||
console.log("Error: " + errorString);
|
||||
}
|
||||
}
|
||||
|
||||
XmlListModelRole { name: "published"; elementName: "published" }
|
||||
XmlListModelRole { name: "rights"; elementName: "rights" }
|
||||
XmlListModelRole { name: "updated"; elementName: "updated" }
|
||||
XmlListModelRole { name: "category"; elementName: "category"; attributeName: "term" }
|
||||
XmlListModelRole { name: "title"; elementName: "title"}
|
||||
XmlListModelRole { name: "link"; elementName: "link"; attributeName: "href" }
|
||||
XmlListModelRole { name: "summary"; elementName: "summary"}
|
||||
|
||||
XmlListModelRole {
|
||||
name: "published"
|
||||
elementName: "published"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "rights"
|
||||
elementName: "rights"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "updated"
|
||||
elementName: "updated"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "category"
|
||||
elementName: "category"
|
||||
attributeName: "term"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "title"
|
||||
elementName: "title"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "link"
|
||||
elementName: "link"
|
||||
attributeName: "href"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "summary"
|
||||
elementName: "summary"
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
@ -20,8 +20,8 @@ Item {
|
||||
if (match != null) {
|
||||
var imageUrl = match[1];
|
||||
var href = match[2];
|
||||
img.source = "" + imageUrl
|
||||
root.href = "" + href
|
||||
img.source = "" + imageUrl;
|
||||
root.href = "" + href;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,13 +31,18 @@ Item {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
anchors.fill: img
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0; color: "#00333333" }
|
||||
GradientStop { position: 1; color: "#ff333333" }
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#00333333"
|
||||
}
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#ff333333"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,8 +62,8 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
print(model.link)
|
||||
Qt.openUrlExternally(model.link)
|
||||
print(model.link);
|
||||
Qt.openUrlExternally(model.link);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ Item {
|
||||
XmlListModel {
|
||||
id: feedModel
|
||||
onStatusChanged: {
|
||||
print("status ",status)
|
||||
|
||||
print("status ", status);
|
||||
if (status === XmlListModel.Error) {
|
||||
console.log("Error: " + errorString);
|
||||
}
|
||||
@ -27,12 +26,27 @@ Item {
|
||||
source: "https://www.reddit.com/r/" + root.subreddit + "/.rss"
|
||||
query: "/feed/entry"
|
||||
|
||||
XmlListModelRole { name: "updated"; elementName: "updated" }
|
||||
XmlListModelRole { name: "subtitle"; elementName: "subtitle"}
|
||||
XmlListModelRole { name: "content"; elementName: "content"}
|
||||
XmlListModelRole { name: "link"; elementName: "link"; attributeName: "href" }
|
||||
XmlListModelRole { name: "title"; elementName: "title"}
|
||||
|
||||
XmlListModelRole {
|
||||
name: "updated"
|
||||
elementName: "updated"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "subtitle"
|
||||
elementName: "subtitle"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "content"
|
||||
elementName: "content"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "link"
|
||||
elementName: "link"
|
||||
attributeName: "href"
|
||||
}
|
||||
XmlListModelRole {
|
||||
name: "title"
|
||||
elementName: "title"
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
@ -12,7 +12,6 @@ Item {
|
||||
implicitWidth: 1200
|
||||
implicitHeight: 600
|
||||
|
||||
|
||||
Material.theme: Material.Dark
|
||||
Material.accent: Material.DeepOrange
|
||||
|
||||
@ -36,7 +35,6 @@ Item {
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
RowLayout {
|
||||
id: wrapper
|
||||
spacing: 40
|
||||
|
@ -13,7 +13,6 @@ Item {
|
||||
implicitWidth: 900
|
||||
implicitHeight: 650
|
||||
|
||||
|
||||
Material.theme: Material.Dark
|
||||
Material.accent: Material.DeepOrange
|
||||
|
||||
|
@ -16,11 +16,11 @@ Item {
|
||||
anchors.fill: parent
|
||||
onStatusChanged: {
|
||||
if (img.status !== Image.Ready)
|
||||
return
|
||||
return;
|
||||
if (img.sourceSize.width === 0 || img.sourceSize.height === 0)
|
||||
return
|
||||
root.implicitHeight = img.sourceSize.height
|
||||
root.implicitWidth = img.sourceSize.width
|
||||
return;
|
||||
root.implicitHeight = img.sourceSize.height;
|
||||
root.implicitWidth = img.sourceSize.width;
|
||||
}
|
||||
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
@ -29,24 +29,24 @@ Item {
|
||||
Component.onCompleted: {
|
||||
request("http://xkcd.com/info.0.json", function (o) {
|
||||
if (o.status === 200) {
|
||||
var d = eval('new Object(' + o.responseText + ')')
|
||||
console.log(o.responseText)
|
||||
img.source = d.img
|
||||
var d = eval('new Object(' + o.responseText + ')');
|
||||
console.log(o.responseText);
|
||||
img.source = d.img;
|
||||
} else {
|
||||
console.log("Some error has occurred")
|
||||
console.log("Some error has occurred");
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function request(url, callback) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = (function (myxhr) {
|
||||
return function () {
|
||||
if (myxhr.readyState === 4)
|
||||
callback(myxhr)
|
||||
}
|
||||
})(xhr)
|
||||
xhr.open('GET', url)
|
||||
xhr.send('')
|
||||
callback(myxhr);
|
||||
};
|
||||
})(xhr);
|
||||
xhr.open('GET', url);
|
||||
xhr.send('');
|
||||
}
|
||||
}
|
||||
|
@ -97,8 +97,8 @@ set(QML
|
||||
qml/Settings/SettingsHeader.qml
|
||||
qml/Settings/SettingsHorizontalSeperator.qml
|
||||
qml/Settings/SettingsPage.qml
|
||||
qml/Workshop/Workshop.qml
|
||||
qml/TrayIcon.qml)
|
||||
qml/TrayIcon.qml
|
||||
qml/Workshop/Workshop.qml)
|
||||
|
||||
set(TS_FILES
|
||||
# cmake-format: sort
|
||||
@ -191,8 +191,8 @@ set(RESOURCES
|
||||
assets/images/noisy-texture.png
|
||||
assets/images/scale_window_indicator.png
|
||||
assets/images/steam_offline.png
|
||||
assets/images/trayIcon_windows.png
|
||||
assets/images/trayIcon_osx.png
|
||||
assets/images/trayIcon_windows.png
|
||||
assets/images/Window.svg
|
||||
assets/licenses/Apache2.txt
|
||||
assets/licenses/OFL.txt
|
||||
@ -397,7 +397,6 @@ install(
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE AND NOT OSX_BUNDLE)
|
||||
# Creates a ScreenPlay.app
|
||||
set_target_properties(
|
||||
|
@ -18,7 +18,6 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayAppPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(PlausiblePlugin)
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
|
@ -11,7 +11,6 @@ import Settings
|
||||
import ScreenPlayUtil as Util
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Plausible 1.0
|
||||
|
||||
import "qml/Monitors" as Monitors
|
||||
import "qml/Installed" as Installed
|
||||
import "qml/Navigation" as Navigation
|
||||
@ -68,8 +67,6 @@ ApplicationWindow {
|
||||
debug: false
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Partial workaround for
|
||||
// https://bugreports.qt.io/browse/QTBUG-86047
|
||||
Material.accent: Material.color(Material.Orange)
|
||||
@ -163,11 +160,11 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function onActiveWidgetsCounterChanged() {
|
||||
plausible.pageView("widget/count/" + App.screenPlayManager.activeWidgetsCounter)
|
||||
plausible.pageView("widget/count/" + App.screenPlayManager.activeWidgetsCounter);
|
||||
}
|
||||
|
||||
function onActiveWallpaperCounterChanged() {
|
||||
plausible.pageView("wallpaper/count/" + App.screenPlayManager.activeWallpaperCounter)
|
||||
plausible.pageView("wallpaper/count/" + App.screenPlayManager.activeWallpaperCounter);
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
|
@ -5,7 +5,6 @@ import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Particles
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "#333333"
|
||||
|
@ -49,7 +49,8 @@ Item {
|
||||
TabBar {
|
||||
height: parent.height
|
||||
|
||||
background: Item {}
|
||||
background: Item {
|
||||
}
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 5
|
||||
@ -117,7 +118,6 @@ Item {
|
||||
else
|
||||
App.installedListFilter.sortByName(txtSearch.text);
|
||||
}
|
||||
|
||||
}
|
||||
ToolButton {
|
||||
id: icnSearch
|
||||
@ -129,7 +129,6 @@ Item {
|
||||
icon.height: height
|
||||
icon.color: Material.iconColor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
|
@ -19,7 +19,8 @@ Util.Popup {
|
||||
id: root
|
||||
property ApplicationWindow applicationWindow
|
||||
contentItem: Pane {
|
||||
background: Item{}
|
||||
background: Item {
|
||||
}
|
||||
padding: 20
|
||||
bottomPadding: 10
|
||||
ColumnLayout {
|
||||
@ -40,10 +41,10 @@ Util.Popup {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
source: {
|
||||
if (Qt.platform.os === "windows") {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_windows.png"
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_windows.png";
|
||||
}
|
||||
if (Qt.platform.os === "osx") {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_osx.png"
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_osx.png";
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,7 +79,7 @@ Util.Popup {
|
||||
Layout.fillWidth: true
|
||||
Button {
|
||||
text: qsTr("Quit ScreenPlay now")
|
||||
onClicked: App.exit();
|
||||
onClicked: App.exit()
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Minimize ScreenPlay")
|
||||
@ -94,7 +95,7 @@ Util.Popup {
|
||||
onClicked: {
|
||||
settings.setValue("alwaysMinimize", true);
|
||||
settings.sync();
|
||||
print(settings.value("alwaysMinimize"))
|
||||
print(settings.value("alwaysMinimize"));
|
||||
App.showDockIcon(false);
|
||||
applicationWindow.hide();
|
||||
root.close();
|
||||
|
@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/qmetatype.h>
|
||||
#include <QObject>
|
||||
#include <QtCore/qmetatype.h>
|
||||
namespace ScreenPlay {
|
||||
/*!
|
||||
\namespace ScreenPlay::SearchType
|
||||
|
@ -98,10 +98,7 @@ if(APPLE)
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/index.html
|
||||
${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/)
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/"
|
||||
)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import QtQuick
|
||||
import ScreenPlayWallpaper
|
||||
|
||||
|
||||
AnimatedImage {
|
||||
Component.onCompleted: Wallpaper.requestFadeIn();
|
||||
Component.onCompleted: Wallpaper.requestFadeIn()
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ Item {
|
||||
id: mediaPlayer
|
||||
onPlaybackStateChanged: {
|
||||
if (mediaPlayer.playbackState == MediaPlayer.PlayingState && !fadeInDone) {
|
||||
fadeInDone = true
|
||||
fadeInDone = true;
|
||||
Wallpaper.requestFadeIn();
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ Rectangle {
|
||||
color: Material.color(Material.Grey, Material.Shade800)
|
||||
border.width: 10
|
||||
border.color: "orange"
|
||||
Component.onCompleted: Wallpaper.requestFadeIn();
|
||||
Component.onCompleted: Wallpaper.requestFadeIn()
|
||||
|
||||
MouseArea {
|
||||
|
||||
|
@ -131,14 +131,13 @@ Rectangle {
|
||||
imgCover.opacity = 0;
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: Wallpaper
|
||||
function onQmlStart() {
|
||||
root.start()
|
||||
root.start();
|
||||
}
|
||||
function onFadeIn() {
|
||||
root.fadeIn()
|
||||
root.fadeIn();
|
||||
}
|
||||
function onQmlExit() {
|
||||
if (canFadeByWallpaperFillMode && Wallpaper.canFade)
|
||||
@ -176,7 +175,6 @@ Rectangle {
|
||||
return;
|
||||
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml";
|
||||
}
|
||||
|
||||
}
|
||||
Loader {
|
||||
id: loader
|
||||
@ -191,17 +189,15 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
if (loader.status === Loader.Error) {
|
||||
print("ScreenPlayWallpaper encountered an error and will be terminated.")
|
||||
print("ScreenPlayWallpaper encountered an error and will be terminated.");
|
||||
// Must be callLater so we do not kill on startup
|
||||
// See emit window.qmlStart();
|
||||
Qt.callLater(function () {
|
||||
loader.source = ""
|
||||
loader.source = "";
|
||||
Qt.callLater(function () {
|
||||
Wallpaper.terminate()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Wallpaper.terminate();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -282,7 +278,6 @@ Rectangle {
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
FrameAnimation {
|
||||
id: frameAnimation
|
||||
property real fps: smoothFrameTime > 0 ? (1.0 / smoothFrameTime) : 0
|
||||
@ -314,7 +309,6 @@ Rectangle {
|
||||
text: "fps: " + frameAnimation.fps.toFixed(0) + " - Frame time:" + frameAnimation.ft + " ms"
|
||||
}
|
||||
|
||||
|
||||
Text {
|
||||
text: "appID " + Wallpaper.appID
|
||||
font.pointSize: 14
|
||||
|
@ -77,13 +77,9 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT OSX_BUNDLE)
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/"
|
||||
)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
|
||||
endif()
|
||||
|
||||
|
||||
# ##### USE CMAKE VARIABLES IN CODE #####
|
||||
include(GenerateCMakeVariableHeader)
|
||||
generate_cmake_variable_header(${PROJECT_NAME})
|
@ -1,11 +1,11 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
|
||||
#include "ScreenPlayWidget/CMakeVariables.h"
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQmlExtensionPlugin>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QQmlExtensionPlugin>
|
||||
#include "ScreenPlayWidget/CMakeVariables.h"
|
||||
|
||||
#include "src/widgetwindow.h"
|
||||
|
||||
@ -25,7 +25,6 @@ int main(int argc, char* argv[])
|
||||
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
|
||||
#endif
|
||||
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
const QStringList argumentList = app.arguments();
|
||||
|
14
ThirdParty/CMakeLists.txt
vendored
14
ThirdParty/CMakeLists.txt
vendored
@ -4,21 +4,17 @@ FetchContent_Populate(
|
||||
QArchive
|
||||
GIT_REPOSITORY https://github.com/antony-jr/QArchive.git
|
||||
GIT_TAG e587f30507c0e6d92f79a2dc1a6aa7ebb1f8e679
|
||||
# Workaround because:
|
||||
# 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
|
||||
# Workaround because: 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
|
||||
# https://bugreports.qt.io/browse/QTCREATORBUG-27083
|
||||
SOURCE_DIR ${THIRD_PARTY_PATH}/QArchive
|
||||
)
|
||||
#lol
|
||||
SOURCE_DIR ${THIRD_PARTY_PATH}/QArchive)
|
||||
|
||||
FetchContent_Populate(
|
||||
qml-plausible
|
||||
GIT_REPOSITORY https://gitlab.com/kelteseth/qml-plausible.git
|
||||
GIT_TAG 5069ba3bf25663ea06be8b94c398d6c61058d4d5
|
||||
# Workaround because:
|
||||
# 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
|
||||
# Workaround because: 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
|
||||
# https://bugreports.qt.io/browse/QTCREATORBUG-27083
|
||||
SOURCE_DIR ${THIRD_PARTY_PATH}/qml-plausible
|
||||
)
|
||||
SOURCE_DIR ${THIRD_PARTY_PATH}/qml-plausible)
|
||||
|
||||
add_subdirectory(qml-plausible)
|
||||
add_subdirectory(QArchive)
|
Loading…
Reference in New Issue
Block a user