mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 04:02:50 +01:00
Add our own Dialog and Popup with blur background
Remove all => for now because the qml formatter does not like the new syntax Fix states auf mute/play all buttons Remove useless playback speed option
This commit is contained in:
parent
95f155c889
commit
c281ec5599
@ -72,9 +72,12 @@ set(QML
|
|||||||
qml/Navigation/Navigation.qml
|
qml/Navigation/Navigation.qml
|
||||||
qml/Navigation/NavigationItem.qml
|
qml/Navigation/NavigationItem.qml
|
||||||
qml/Navigation/WindowNavButton.qml
|
qml/Navigation/WindowNavButton.qml
|
||||||
|
qml/Navigation/WindowNavigation.qml
|
||||||
qml/Monitors/DefaultVideoControls.qml
|
qml/Monitors/DefaultVideoControls.qml
|
||||||
qml/Common/TagSelector.qml
|
qml/Common/TagSelector.qml
|
||||||
qml/Common/Tag.qml
|
qml/Common/Tag.qml
|
||||||
|
qml/Common/Popup.qml
|
||||||
|
qml/Common/Dialog.qml
|
||||||
qml/Common/ImageSelector.qml
|
qml/Common/ImageSelector.qml
|
||||||
qml/Common/Slider.qml
|
qml/Common/Slider.qml
|
||||||
qml/Common/RippleEffect.qml
|
qml/Common/RippleEffect.qml
|
||||||
|
@ -83,34 +83,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: content
|
id: noneContentItems
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 1
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
function onThemeChanged(theme) {
|
|
||||||
setTheme(theme)
|
|
||||||
}
|
|
||||||
|
|
||||||
target: ScreenPlay.settings
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
function onRequestNavigation(nav) {
|
|
||||||
switchPage(nav)
|
|
||||||
}
|
|
||||||
|
|
||||||
target: ScreenPlay.util
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
function onRequestRaise() {
|
|
||||||
root.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
target: ScreenPlay.screenPlayManager
|
|
||||||
}
|
|
||||||
|
|
||||||
Dialogs.SteamNotAvailable {
|
Dialogs.SteamNotAvailable {
|
||||||
id: dialogSteam
|
id: dialogSteam
|
||||||
modalSource: content
|
modalSource: content
|
||||||
@ -125,107 +98,151 @@ ApplicationWindow {
|
|||||||
modalSource: content
|
modalSource: content
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.TrayIcon {
|
|
||||||
window: root
|
|
||||||
}
|
|
||||||
|
|
||||||
StackView {
|
|
||||||
id: stackView
|
|
||||||
objectName: "stackView"
|
|
||||||
property int duration: 300
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
top: nav.bottom
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
|
|
||||||
replaceEnter: Transition {
|
|
||||||
OpacityAnimator {
|
|
||||||
from: 0
|
|
||||||
to: 1
|
|
||||||
duration: stackView.duration
|
|
||||||
easing.type: Easing.InOutQuart
|
|
||||||
}
|
|
||||||
|
|
||||||
ScaleAnimator {
|
|
||||||
from: 0.8
|
|
||||||
to: 1
|
|
||||||
duration: stackView.duration
|
|
||||||
easing.type: Easing.InOutQuart
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
replaceExit: Transition {
|
|
||||||
OpacityAnimator {
|
|
||||||
from: 1
|
|
||||||
to: 0
|
|
||||||
duration: stackView.duration
|
|
||||||
easing.type: Easing.InOutQuart
|
|
||||||
}
|
|
||||||
|
|
||||||
ScaleAnimator {
|
|
||||||
from: 1
|
|
||||||
to: 0.8
|
|
||||||
duration: stackView.duration
|
|
||||||
easing.type: Easing.InOutQuart
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
function onSetSidebarActive(active) {
|
|
||||||
if (active)
|
|
||||||
sidebar.state = "active"
|
|
||||||
else
|
|
||||||
sidebar.state = "inactive"
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSetNavigationItem(pos) {
|
|
||||||
if (pos === 0)
|
|
||||||
nav.onPageChanged("Create")
|
|
||||||
else
|
|
||||||
nav.onPageChanged("Workshop")
|
|
||||||
}
|
|
||||||
|
|
||||||
target: stackView.currentItem
|
|
||||||
ignoreUnknownSignals: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Installed.Sidebar {
|
|
||||||
id: sidebar
|
|
||||||
objectName: "installedSidebar"
|
|
||||||
navHeight: nav.height
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Navigation.Navigation {
|
|
||||||
id: nav
|
|
||||||
window: root
|
|
||||||
width: parent.width
|
|
||||||
modalSource: content
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
right: parent.right
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
|
|
||||||
onChangePage: function (name) {
|
|
||||||
monitors.close()
|
|
||||||
switchPage(name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Monitors.Monitors {
|
Monitors.Monitors {
|
||||||
id: monitors
|
id: monitors
|
||||||
modalSource: content
|
modalSource: content
|
||||||
}
|
}
|
||||||
|
Common.TrayIcon {
|
||||||
|
window: root
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 1
|
||||||
|
Navigation.WindowNavigation {
|
||||||
|
id: windowNav
|
||||||
|
z:5
|
||||||
|
modalSource: content
|
||||||
|
width: parent.width
|
||||||
|
window: root
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: content
|
||||||
|
anchors {
|
||||||
|
top: windowNav.bottom
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onThemeChanged(theme) {
|
||||||
|
setTheme(theme)
|
||||||
|
}
|
||||||
|
|
||||||
|
target: ScreenPlay.settings
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onRequestNavigation(nav) {
|
||||||
|
switchPage(nav)
|
||||||
|
}
|
||||||
|
|
||||||
|
target: ScreenPlay.util
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onRequestRaise() {
|
||||||
|
root.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
target: ScreenPlay.screenPlayManager
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView {
|
||||||
|
id: stackView
|
||||||
|
objectName: "stackView"
|
||||||
|
property int duration: 300
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: nav.bottom
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
replaceEnter: Transition {
|
||||||
|
OpacityAnimator {
|
||||||
|
from: 0
|
||||||
|
to: 1
|
||||||
|
duration: stackView.duration
|
||||||
|
easing.type: Easing.InOutQuart
|
||||||
|
}
|
||||||
|
|
||||||
|
ScaleAnimator {
|
||||||
|
from: 0.8
|
||||||
|
to: 1
|
||||||
|
duration: stackView.duration
|
||||||
|
easing.type: Easing.InOutQuart
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
replaceExit: Transition {
|
||||||
|
OpacityAnimator {
|
||||||
|
from: 1
|
||||||
|
to: 0
|
||||||
|
duration: stackView.duration
|
||||||
|
easing.type: Easing.InOutQuart
|
||||||
|
}
|
||||||
|
|
||||||
|
ScaleAnimator {
|
||||||
|
from: 1
|
||||||
|
to: 0.8
|
||||||
|
duration: stackView.duration
|
||||||
|
easing.type: Easing.InOutQuart
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onSetSidebarActive(active) {
|
||||||
|
if (active)
|
||||||
|
sidebar.state = "active"
|
||||||
|
else
|
||||||
|
sidebar.state = "inactive"
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSetNavigationItem(pos) {
|
||||||
|
if (pos === 0)
|
||||||
|
nav.onPageChanged("Create")
|
||||||
|
else
|
||||||
|
nav.onPageChanged("Workshop")
|
||||||
|
}
|
||||||
|
|
||||||
|
target: stackView.currentItem
|
||||||
|
ignoreUnknownSignals: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Installed.Sidebar {
|
||||||
|
id: sidebar
|
||||||
|
objectName: "installedSidebar"
|
||||||
|
navHeight: nav.height
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigation.Navigation {
|
||||||
|
id: nav
|
||||||
|
modalSource: content
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
right: parent.right
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
onChangePage: function (name) {
|
||||||
|
monitors.close()
|
||||||
|
switchPage(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
29
ScreenPlay/qml/Common/Dialog.qml
Normal file
29
ScreenPlay/qml/Common/Dialog.qml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
|
import QtQuick.Controls.Material.impl
|
||||||
|
import QtQuick.Controls.Material
|
||||||
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
|
Dialog {
|
||||||
|
id: root
|
||||||
|
property Item modalSource
|
||||||
|
dim: true
|
||||||
|
anchors.centerIn: Overlay.overlay
|
||||||
|
modal: true
|
||||||
|
focus: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Overlay.modal: ModalBackgroundBlur {
|
||||||
|
id: blurBg
|
||||||
|
sourceItem: root.modalSource
|
||||||
|
hideSource: root.hideSource
|
||||||
|
}
|
||||||
|
// Workaround for missing animation on hide
|
||||||
|
// when using hideSource
|
||||||
|
property bool hideSource: true
|
||||||
|
onAboutToHide: root.hideSource = false
|
||||||
|
onAboutToShow: root.hideSource = true
|
||||||
|
}
|
@ -5,29 +5,24 @@ import QtQuick.Controls.Material
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
import "../"
|
import "../" as Common
|
||||||
|
|
||||||
Dialog {
|
Common.Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property ApplicationWindow window
|
property ApplicationWindow window
|
||||||
property string message
|
property string message
|
||||||
property var modalSource
|
|
||||||
|
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
|
||||||
sourceItem: root.modalSource
|
|
||||||
}
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
standardButtons: Dialog.Ok | Dialog.Help
|
standardButtons: Dialog.Ok | Dialog.Help
|
||||||
onHelpRequested: {
|
onHelpRequested: {
|
||||||
Qt.openUrlExternally("https://forum.screen-play.app/category/7/troubleshooting");
|
Qt.openUrlExternally(
|
||||||
|
"https://forum.screen-play.app/category/7/troubleshooting")
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onDisplayErrorPopup(msg) {
|
function onDisplayErrorPopup(msg) {
|
||||||
root.message = msg;
|
root.message = msg
|
||||||
root.window.show();
|
root.window.show()
|
||||||
root.open();
|
root.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.screenPlayManager
|
target: ScreenPlay.screenPlayManager
|
||||||
@ -55,9 +50,7 @@ Dialog {
|
|||||||
effect: ColorOverlay {
|
effect: ColorOverlay {
|
||||||
color: Material.color(Material.DeepOrange)
|
color: Material.color(Material.DeepOrange)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -71,9 +64,6 @@ Dialog {
|
|||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
color: Material.primaryTextColor
|
color: Material.primaryTextColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,25 +3,17 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls.Material
|
import QtQuick.Controls.Material
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
import "../"
|
import "../" as Common
|
||||||
|
|
||||||
Dialog {
|
Common.Dialog {
|
||||||
id: dialogMonitorConfigurationChanged
|
id: root
|
||||||
|
|
||||||
property var modalSource
|
|
||||||
modal: true
|
|
||||||
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
standardButtons: Dialog.Ok
|
standardButtons: Dialog.Ok
|
||||||
contentHeight: 250
|
contentHeight: 250
|
||||||
|
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
|
||||||
sourceItem: root.modalSource
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onMonitorConfigurationChanged() {
|
function onMonitorConfigurationChanged() {
|
||||||
dialogMonitorConfigurationChanged.open();
|
root.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.monitorListModel
|
target: ScreenPlay.monitorListModel
|
||||||
@ -51,10 +43,6 @@ Dialog {
|
|||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
color: Material.primaryTextColor
|
color: Material.primaryTextColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import "../"
|
import "../" as Common
|
||||||
|
|
||||||
Dialog {
|
Common.Dialog {
|
||||||
id: root
|
id: root
|
||||||
property var modalSource
|
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
|
||||||
sourceItem: root.modalSource
|
|
||||||
}
|
|
||||||
|
|
||||||
modal: true
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
standardButtons: Dialog.Ok
|
standardButtons: Dialog.Ok
|
||||||
title: qsTr("Could not load steam integration!")
|
title: qsTr("Could not load steam integration!")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,13 @@ import Qt5Compat.GraphicalEffects
|
|||||||
|
|
||||||
FastBlur {
|
FastBlur {
|
||||||
id: root
|
id: root
|
||||||
property var sourceItem
|
property Item sourceItem
|
||||||
|
property bool hideSource: true
|
||||||
source: ShaderEffectSource {
|
source: ShaderEffectSource {
|
||||||
|
id: effectSource
|
||||||
sourceItem: root.sourceItem
|
sourceItem: root.sourceItem
|
||||||
live: false
|
live: false
|
||||||
|
hideSource: root.hideSource
|
||||||
}
|
}
|
||||||
radius: 64
|
radius: 64
|
||||||
transparentBorder: true
|
transparentBorder: true
|
||||||
|
26
ScreenPlay/qml/Common/Popup.qml
Normal file
26
ScreenPlay/qml/Common/Popup.qml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
|
import QtQuick.Controls.Material
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: root
|
||||||
|
property Item modalSource
|
||||||
|
// Workaround for missing animation on hide
|
||||||
|
// when using hideSource
|
||||||
|
property bool aboutToHide: false
|
||||||
|
dim: true
|
||||||
|
anchors.centerIn: Overlay.overlay
|
||||||
|
modal: true
|
||||||
|
focus: true
|
||||||
|
|
||||||
|
Overlay.modal: ModalBackgroundBlur {
|
||||||
|
id: blurBg
|
||||||
|
sourceItem: root.modalSource
|
||||||
|
hideSource: root.aboutToHide
|
||||||
|
}
|
||||||
|
onAboutToHide: root.aboutToHide = false
|
||||||
|
onClosed: root.aboutToHide = true
|
||||||
|
}
|
@ -27,9 +27,10 @@ Item {
|
|||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: txtSearch
|
id: txtSearch
|
||||||
|
placeholderTextColor: Material.secondaryTextColor
|
||||||
width: 250
|
width: 250
|
||||||
height: 40
|
height: 40
|
||||||
|
color: Material.secondaryTextColor
|
||||||
placeholderText: qsTr("Search for Wallpaper & Widgets")
|
placeholderText: qsTr("Search for Wallpaper & Widgets")
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (txtSearch.text.length === 0)
|
if (txtSearch.text.length === 0)
|
||||||
|
@ -68,6 +68,7 @@ Item {
|
|||||||
|
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
color: Material.secondaryTextColor
|
color: Material.secondaryTextColor
|
||||||
|
placeholderTextColor: Material.secondaryTextColor
|
||||||
width: parent.width
|
width: parent.width
|
||||||
Keys.onEscapePressed: resetState()
|
Keys.onEscapePressed: resetState()
|
||||||
onTextEdited: {
|
onTextEdited: {
|
||||||
|
@ -10,19 +10,19 @@ SystemTrayIcon {
|
|||||||
visible: true
|
visible: true
|
||||||
icon.source: "qrc:/assets/icons/app.ico"
|
icon.source: "qrc:/assets/icons/app.ico"
|
||||||
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
||||||
onActivated: (reason)=>{
|
onActivated: function (reason) {
|
||||||
switch (reason) {
|
switch (reason) {
|
||||||
case SystemTrayIcon.Unknown:
|
case SystemTrayIcon.Unknown:
|
||||||
break;
|
break
|
||||||
case SystemTrayIcon.Context:
|
case SystemTrayIcon.Context:
|
||||||
break;
|
break
|
||||||
case SystemTrayIcon.DoubleClick:
|
case SystemTrayIcon.DoubleClick:
|
||||||
window.show();
|
window.show()
|
||||||
break;
|
break
|
||||||
case SystemTrayIcon.Trigger:
|
case SystemTrayIcon.Trigger:
|
||||||
break;
|
break
|
||||||
case SystemTrayIcon.MiddleClick:
|
case SystemTrayIcon.MiddleClick:
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ SystemTrayIcon {
|
|||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Open ScreenPlay")
|
text: qsTr("Open ScreenPlay")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
window.show();
|
window.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,13 +42,15 @@ SystemTrayIcon {
|
|||||||
text: qsTr("Mute all")
|
text: qsTr("Mute all")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (miMuteAll.isMuted) {
|
if (miMuteAll.isMuted) {
|
||||||
isMuted = false;
|
isMuted = false
|
||||||
miMuteAll.text = qsTr("Mute all");
|
miMuteAll.text = qsTr("Mute all")
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted", "true");
|
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
||||||
|
"true")
|
||||||
} else {
|
} else {
|
||||||
isMuted = true;
|
isMuted = true
|
||||||
miMuteAll.text = qsTr("Unmute all");
|
miMuteAll.text = qsTr("Unmute all")
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted", "false");
|
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
||||||
|
"false")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,13 +63,15 @@ SystemTrayIcon {
|
|||||||
text: qsTr("Pause all")
|
text: qsTr("Pause all")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (miStopAll.isPlaying) {
|
if (miStopAll.isPlaying) {
|
||||||
isPlaying = false;
|
isPlaying = false
|
||||||
miStopAll.text = qsTr("Pause all");
|
miStopAll.text = qsTr("Pause all")
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("isPlaying", "true");
|
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
||||||
|
"isPlaying", "true")
|
||||||
} else {
|
} else {
|
||||||
isPlaying = true;
|
isPlaying = true
|
||||||
miStopAll.text = qsTr("Play all");
|
miStopAll.text = qsTr("Play all")
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("isPlaying", "false");
|
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
||||||
|
"isPlaying", "false")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +80,5 @@ SystemTrayIcon {
|
|||||||
text: qsTr("Quit")
|
text: qsTr("Quit")
|
||||||
onTriggered: ScreenPlay.exit()
|
onTriggered: ScreenPlay.exit()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import ScreenPlay 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
|
|
||||||
XMLNewsfeed {
|
XMLNewsfeed {
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -12,7 +12,7 @@ import ScreenPlay.QMLUtilities 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
wizardContentWrapper.state = "in";
|
wizardContentWrapper.state = "in";
|
||||||
|
@ -21,25 +21,25 @@ Item {
|
|||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
CreateWallpaperInit {
|
CreateWallpaperInit {
|
||||||
onNext: (filePath, codec) => {
|
onNext: function (filePath, codec) {
|
||||||
startConvert(filePath, codec)
|
startConvert(filePath, codec)
|
||||||
}
|
}
|
||||||
|
|
||||||
function startConvert(filePath, codec) {
|
function startConvert(filePath, codec) {
|
||||||
root.wizardStarted()
|
root.wizardStarted()
|
||||||
swipeView.currentIndex = 1
|
swipeView.currentIndex = 1
|
||||||
createWallpaperVideoImportConvert.codec = codec
|
createWallpaperVideoImportConvert.codec = codec
|
||||||
createWallpaperVideoImportConvert.filePath = filePath
|
createWallpaperVideoImportConvert.filePath = filePath
|
||||||
ScreenPlay.create.createWallpaperStart(filePath, codec, quality)
|
ScreenPlay.create.createWallpaperStart(filePath, codec, quality)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CreateWallpaperVideoImportConvert {
|
||||||
|
id: createWallpaperVideoImportConvert
|
||||||
|
|
||||||
|
onAbort: root.wizardExited()
|
||||||
|
}
|
||||||
|
|
||||||
|
CreateWallpaperResult {}
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateWallpaperVideoImportConvert {
|
|
||||||
id: createWallpaperVideoImportConvert
|
|
||||||
|
|
||||||
onAbort: root.wizardExited()
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateWallpaperResult {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@ import ScreenPlay.Create 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
signal wizardStarted()
|
signal wizardStarted
|
||||||
signal wizardExited()
|
signal wizardExited
|
||||||
signal next()
|
signal next
|
||||||
|
|
||||||
SwipeView {
|
SwipeView {
|
||||||
id: swipeView
|
id: swipeView
|
||||||
@ -21,12 +21,12 @@ Item {
|
|||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
ImportWebmInit {
|
ImportWebmInit {
|
||||||
onNext: (filePath) =>{
|
onNext: function (filePath) {
|
||||||
root.wizardStarted();
|
root.wizardStarted()
|
||||||
swipeView.currentIndex = 1;
|
swipeView.currentIndex = 1
|
||||||
createWallpaperVideoImportConvert.filePath = filePath;
|
createWallpaperVideoImportConvert.filePath = filePath
|
||||||
ScreenPlay.util.setNavigationActive(false);
|
ScreenPlay.util.setNavigationActive(false)
|
||||||
ScreenPlay.create.createWallpaperStart(filePath);
|
ScreenPlay.create.createWallpaperStart(filePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,5 @@ Item {
|
|||||||
|
|
||||||
onExit: root.wizardExited()
|
onExit: root.wizardExited()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@ import ScreenPlay.Create 1.0
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
signal wizardStarted()
|
signal wizardStarted
|
||||||
signal wizardExited()
|
signal wizardExited
|
||||||
signal next()
|
signal next
|
||||||
|
|
||||||
SwipeView {
|
SwipeView {
|
||||||
id: swipeView
|
id: swipeView
|
||||||
@ -21,12 +21,12 @@ Item {
|
|||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Importh264Init {
|
Importh264Init {
|
||||||
onNext: (filePath) =>{
|
onNext: function (filePath) {
|
||||||
root.wizardStarted();
|
root.wizardStarted()
|
||||||
swipeView.currentIndex = 1;
|
swipeView.currentIndex = 1
|
||||||
createWallpaperVideoImportConvert.filePath = filePath;
|
createWallpaperVideoImportConvert.filePath = filePath
|
||||||
ScreenPlay.util.setNavigationActive(false);
|
ScreenPlay.util.setNavigationActive(false)
|
||||||
ScreenPlay.create.importH264(filePath);
|
ScreenPlay.create.importH264(filePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,5 @@ Item {
|
|||||||
|
|
||||||
onExit: root.wizardExited()
|
onExit: root.wizardExited()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ Item {
|
|||||||
id: btnOpenDocs
|
id: btnOpenDocs
|
||||||
|
|
||||||
text: qsTr("Open Documentation")
|
text: qsTr("Open Documentation")
|
||||||
Material.background: Material.LightGreen
|
Material.accent: Material.color(Material.LightGreen)
|
||||||
highlighted: true
|
highlighted: true
|
||||||
icon.source: "qrc:/assets/icons/icon_document.svg"
|
icon.source: "qrc:/assets/icons/icon_document.svg"
|
||||||
icon.color: "white"
|
icon.color: "white"
|
||||||
|
@ -6,6 +6,7 @@ import QtQuick.Controls.Material.impl
|
|||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
import ScreenPlay.Enums.InstalledType 1.0
|
import ScreenPlay.Enums.InstalledType 1.0
|
||||||
import ScreenPlay.Enums.SearchType 1.0
|
import ScreenPlay.Enums.SearchType 1.0
|
||||||
|
import "../Common" as Common
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
@ -20,24 +21,24 @@ Item {
|
|||||||
|
|
||||||
function checkIsContentInstalled() {
|
function checkIsContentInstalled() {
|
||||||
if (ScreenPlay.installedListModel.count === 0) {
|
if (ScreenPlay.installedListModel.count === 0) {
|
||||||
loaderHelp.active = true;
|
loaderHelp.active = true
|
||||||
gridView.footerItem.isVisible = true;
|
gridView.footerItem.isVisible = true
|
||||||
gridView.visible = false;
|
gridView.visible = false
|
||||||
navWrapper.visible = false;
|
navWrapper.visible = false
|
||||||
} else {
|
} else {
|
||||||
loaderHelp.active = false;
|
loaderHelp.active = false
|
||||||
gridView.footerItem.isVisible = false;
|
gridView.footerItem.isVisible = false
|
||||||
refresh = false;
|
refresh = false
|
||||||
gridView.contentY = -82;
|
gridView.contentY = -82
|
||||||
gridView.visible = true;
|
gridView.visible = true
|
||||||
navWrapper.visible = true;
|
navWrapper.visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
navWrapper.state = "in";
|
navWrapper.state = "in"
|
||||||
ScreenPlay.installedListFilter.sortBySearchType(SearchType.All);
|
ScreenPlay.installedListFilter.sortBySearchType(SearchType.All)
|
||||||
checkIsContentInstalled();
|
checkIsContentInstalled()
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
@ -47,7 +48,7 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onHelperButtonPressed(pos) {
|
function onHelperButtonPressed(pos) {
|
||||||
setNavigationItem(pos);
|
setNavigationItem(pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
target: loaderHelp.item
|
target: loaderHelp.item
|
||||||
@ -55,13 +56,12 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onInstalledLoadingFinished() {
|
function onInstalledLoadingFinished() {
|
||||||
checkIsContentInstalled();
|
checkIsContentInstalled()
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCountChanged(count) {
|
function onCountChanged(count) {
|
||||||
if (count === 0)
|
if (count === 0)
|
||||||
checkIsContentInstalled();
|
checkIsContentInstalled()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.installedListModel
|
target: ScreenPlay.installedListModel
|
||||||
@ -78,7 +78,7 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onSortChanged() {
|
function onSortChanged() {
|
||||||
gridView.positionViewAtBeginning();
|
gridView.positionViewAtBeginning()
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.installedListFilter
|
target: ScreenPlay.installedListFilter
|
||||||
@ -135,13 +135,12 @@ Item {
|
|||||||
}
|
}
|
||||||
onContentYChanged: {
|
onContentYChanged: {
|
||||||
if (contentY <= -180)
|
if (contentY <= -180)
|
||||||
gridView.headerItem.isVisible = true;
|
gridView.headerItem.isVisible = true
|
||||||
else
|
else
|
||||||
gridView.headerItem.isVisible = false;
|
gridView.headerItem.isVisible = false
|
||||||
//Pull to refresh
|
//Pull to refresh
|
||||||
if (contentY <= -180 && !refresh && !isDragging)
|
if (contentY <= -180 && !refresh && !isDragging)
|
||||||
ScreenPlay.installedListModel.reset();
|
ScreenPlay.installedListModel.reset()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -158,11 +157,11 @@ Item {
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
onIsVisibleChanged: {
|
onIsVisibleChanged: {
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
txtHeader.color = Material.accent;
|
txtHeader.color = Material.accent
|
||||||
txtHeader.text = qsTr("Refreshing!");
|
txtHeader.text = qsTr("Refreshing!")
|
||||||
} else {
|
} else {
|
||||||
txtHeader.color = "gray";
|
txtHeader.color = "gray"
|
||||||
txtHeader.text = qsTr("Pull to refresh!");
|
txtHeader.text = qsTr("Pull to refresh!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +169,7 @@ Item {
|
|||||||
interval: 150
|
interval: 150
|
||||||
running: true
|
running: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
animFadeIn.start();
|
animFadeIn.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +191,6 @@ Item {
|
|||||||
running: false
|
running: false
|
||||||
duration: 1000
|
duration: 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: Item {
|
footer: Item {
|
||||||
@ -215,7 +213,7 @@ Item {
|
|||||||
interval: 400
|
interval: 400
|
||||||
running: true
|
running: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
animFadeInTxtFooter.start();
|
animFadeInTxtFooter.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,9 +225,7 @@ Item {
|
|||||||
running: false
|
running: false
|
||||||
duration: 1000
|
duration: 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ScreenPlayItem {
|
delegate: ScreenPlayItem {
|
||||||
@ -244,24 +240,23 @@ Item {
|
|||||||
publishedFileID: m_publishedFileID
|
publishedFileID: m_publishedFileID
|
||||||
itemIndex: index
|
itemIndex: index
|
||||||
isScrolling: gridView.isScrolling
|
isScrolling: gridView.isScrolling
|
||||||
onOpenContextMenu: (position)=>{
|
onOpenContextMenu: function (position) {
|
||||||
// Set the menu to the current item informations
|
// Set the menu to the current item informations
|
||||||
contextMenu.publishedFileID = delegate.publishedFileID;
|
contextMenu.publishedFileID = delegate.publishedFileID
|
||||||
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath;
|
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath
|
||||||
const pos = delegate.mapToItem(root, position.x, position.y);
|
const pos = delegate.mapToItem(root, position.x, position.y)
|
||||||
// Disable duplicate opening. The can happen if we
|
// Disable duplicate opening. The can happen if we
|
||||||
// call popup when we are in the closing animtion.
|
// call popup when we are in the closing animtion.
|
||||||
if (contextMenu.visible || contextMenu.opened)
|
if (contextMenu.visible || contextMenu.opened)
|
||||||
return ;
|
return
|
||||||
|
|
||||||
contextMenu.popup(pos.x, pos.y);
|
contextMenu.popup(pos.x, pos.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
@ -302,7 +297,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog {
|
Common.Dialog {
|
||||||
id: deleteDialog
|
id: deleteDialog
|
||||||
title: qsTr("Are you sure you want to delete this item?")
|
title: qsTr("Are you sure you want to delete this item?")
|
||||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
@ -173,14 +173,13 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
||||||
width: 120
|
width: 120
|
||||||
height: 20
|
height: 20
|
||||||
anchors{
|
anchors {
|
||||||
top:parent.top
|
top: parent.top
|
||||||
right:parent.right
|
right: parent.right
|
||||||
rightMargin: -60
|
rightMargin: -60
|
||||||
topMargin: -20
|
topMargin: -20
|
||||||
}
|
}
|
||||||
@ -224,7 +223,7 @@ Item {
|
|||||||
screenPlayItemImage.state = "loaded"
|
screenPlayItemImage.state = "loaded"
|
||||||
screenPlayItemImage.exit()
|
screenPlayItemImage.exit()
|
||||||
}
|
}
|
||||||
onClicked: (mouse)=> {
|
onClicked: function (mouse) {
|
||||||
if (mouse.button === Qt.LeftButton)
|
if (mouse.button === Qt.LeftButton)
|
||||||
ScreenPlay.util.setSidebarItem(root.screenId, root.type)
|
ScreenPlay.util.setSidebarItem(root.screenId, root.type)
|
||||||
else if (mouse.button === Qt.RightButton)
|
else if (mouse.button === Qt.RightButton)
|
||||||
|
@ -48,17 +48,6 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SP.Slider {
|
|
||||||
id: slPlaybackRate
|
|
||||||
|
|
||||||
headline: qsTr("Playback rate")
|
|
||||||
slider.onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(activeMonitorIndex, "playbackRate", (Math.round(slPlaybackRate.slider.value * 100) / 100))
|
|
||||||
Layout.fillWidth: true
|
|
||||||
slider.stepSize: 0.1
|
|
||||||
slider.to: 1
|
|
||||||
Layout.leftMargin: 10
|
|
||||||
Layout.rightMargin: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
SP.Slider {
|
SP.Slider {
|
||||||
id: slCurrentVideoTime
|
id: slCurrentVideoTime
|
||||||
@ -118,6 +107,11 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
|
@ -22,96 +22,96 @@ Rectangle {
|
|||||||
function selectOnly(index) {
|
function selectOnly(index) {
|
||||||
for (var i = 0; i < rp.count; i++) {
|
for (var i = 0; i < rp.count; i++) {
|
||||||
if (i === index) {
|
if (i === index) {
|
||||||
rp.itemAt(i).isSelected = true;
|
rp.itemAt(i).isSelected = true
|
||||||
continue;
|
continue
|
||||||
}
|
}
|
||||||
rp.itemAt(i).isSelected = false;
|
rp.itemAt(i).isSelected = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
for (var i = 0; i < rp.count; i++) {
|
for (var i = 0; i < rp.count; i++) {
|
||||||
rp.itemAt(i).isSelected = false;
|
rp.itemAt(i).isSelected = false
|
||||||
}
|
}
|
||||||
rp.itemAt(0).isSelected = true;
|
rp.itemAt(0).isSelected = true
|
||||||
getActiveMonitors();
|
getActiveMonitors()
|
||||||
}
|
}
|
||||||
|
|
||||||
function getActiveMonitors() {
|
function getActiveMonitors() {
|
||||||
root.activeMonitors = [];
|
root.activeMonitors = []
|
||||||
for (var i = 0; i < rp.count; i++) {
|
for (var i = 0; i < rp.count; i++) {
|
||||||
if (rp.itemAt(i).isSelected)
|
if (rp.itemAt(i).isSelected)
|
||||||
root.activeMonitors.push(rp.itemAt(i).index);
|
root.activeMonitors.push(rp.itemAt(i).index)
|
||||||
|
|
||||||
}
|
}
|
||||||
// Must be called manually. When QML properties are getting altered in js the
|
// Must be called manually. When QML properties are getting altered in js the
|
||||||
// property binding breaks
|
// property binding breaks
|
||||||
root.activeMonitorsChanged();
|
root.activeMonitorsChanged()
|
||||||
return root.activeMonitors;
|
return root.activeMonitors
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectMonitorAt(index) {
|
function selectMonitorAt(index) {
|
||||||
if (!multipleMonitorsSelectable)
|
if (!multipleMonitorsSelectable)
|
||||||
selectOnly(index);
|
selectOnly(index)
|
||||||
else
|
else
|
||||||
rp.itemAt(index).isSelected = !rp.itemAt(index).isSelected;
|
rp.itemAt(index).isSelected = !rp.itemAt(index).isSelected
|
||||||
getActiveMonitors();
|
getActiveMonitors()
|
||||||
if (rp.itemAt(index).hasContent)
|
if (rp.itemAt(index).hasContent)
|
||||||
root.requestProjectSettings(index, rp.itemAt(index).installedType, rp.itemAt(index).appID);
|
root.requestProjectSettings(index, rp.itemAt(index).installedType,
|
||||||
|
rp.itemAt(index).appID)
|
||||||
}
|
}
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
var absoluteDesktopSize = ScreenPlay.monitorListModel.absoluteDesktopSize();
|
var absoluteDesktopSize = ScreenPlay.monitorListModel.absoluteDesktopSize()
|
||||||
var isWidthGreaterThanHeight = false;
|
var isWidthGreaterThanHeight = false
|
||||||
var windowsDelta = 0;
|
var windowsDelta = 0
|
||||||
if (absoluteDesktopSize.width < absoluteDesktopSize.height) {
|
if (absoluteDesktopSize.width < absoluteDesktopSize.height) {
|
||||||
windowsDelta = absoluteDesktopSize.width / absoluteDesktopSize.height;
|
windowsDelta = absoluteDesktopSize.width / absoluteDesktopSize.height
|
||||||
isWidthGreaterThanHeight = false;
|
isWidthGreaterThanHeight = false
|
||||||
} else {
|
} else {
|
||||||
windowsDelta = absoluteDesktopSize.height / absoluteDesktopSize.width;
|
windowsDelta = absoluteDesktopSize.height / absoluteDesktopSize.width
|
||||||
isWidthGreaterThanHeight = true;
|
isWidthGreaterThanHeight = true
|
||||||
}
|
}
|
||||||
if (rp.count === 1)
|
if (rp.count === 1)
|
||||||
availableWidth = availableWidth * 0.66;
|
availableWidth = availableWidth * 0.66
|
||||||
|
|
||||||
var dynamicHeight = availableWidth * windowsDelta;
|
var dynamicHeight = availableWidth * windowsDelta
|
||||||
var dynamicWidth = availableHeight * windowsDelta;
|
var dynamicWidth = availableHeight * windowsDelta
|
||||||
// Delta (height/width)
|
// Delta (height/width)
|
||||||
var monitorHeightRationDelta = 0;
|
var monitorHeightRationDelta = 0
|
||||||
var monitorWidthRationDelta = 0;
|
var monitorWidthRationDelta = 0
|
||||||
if (isWidthGreaterThanHeight) {
|
if (isWidthGreaterThanHeight) {
|
||||||
monitorHeightRationDelta = dynamicHeight / absoluteDesktopSize.height;
|
monitorHeightRationDelta = dynamicHeight / absoluteDesktopSize.height
|
||||||
monitorWidthRationDelta = availableWidth / absoluteDesktopSize.width;
|
monitorWidthRationDelta = availableWidth / absoluteDesktopSize.width
|
||||||
} else {
|
} else {
|
||||||
monitorHeightRationDelta = availableHeight / absoluteDesktopSize.height;
|
monitorHeightRationDelta = availableHeight / absoluteDesktopSize.height
|
||||||
monitorWidthRationDelta = dynamicWidth / absoluteDesktopSize.width;
|
monitorWidthRationDelta = dynamicWidth / absoluteDesktopSize.width
|
||||||
}
|
}
|
||||||
for (var i = 0; i < rp.count; i++) {
|
for (var i = 0; i < rp.count; i++) {
|
||||||
rp.itemAt(i).index = i;
|
rp.itemAt(i).index = i
|
||||||
rp.itemAt(i).height = rp.itemAt(i).height * monitorHeightRationDelta;
|
rp.itemAt(i).height = rp.itemAt(i).height * monitorHeightRationDelta
|
||||||
rp.itemAt(i).width = rp.itemAt(i).width * monitorWidthRationDelta;
|
rp.itemAt(i).width = rp.itemAt(i).width * monitorWidthRationDelta
|
||||||
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta;
|
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta
|
||||||
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta;
|
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta
|
||||||
rp.contentWidth += rp.itemAt(i).width;
|
rp.contentWidth += rp.itemAt(i).width
|
||||||
rp.contentHeight += rp.itemAt(i).height;
|
rp.contentHeight += rp.itemAt(i).height
|
||||||
}
|
}
|
||||||
rp.contentWidth += 200;
|
rp.contentWidth += 200
|
||||||
rp.contentHeight += 200;
|
rp.contentHeight += 200
|
||||||
}
|
}
|
||||||
|
|
||||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||||
|
Material.background)
|
||||||
height: availableHeight
|
height: availableHeight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
clip: true
|
clip: true
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
resize();
|
resize()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onMonitorReloadCompleted() {
|
function onMonitorReloadCompleted() {
|
||||||
resize();
|
resize()
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.monitorListModel
|
target: ScreenPlay.monitorListModel
|
||||||
@ -142,9 +142,10 @@ Rectangle {
|
|||||||
previewImage: m_previewImage
|
previewImage: m_previewImage
|
||||||
installedType: m_installedType
|
installedType: m_installedType
|
||||||
monitorWithoutContentSelectable: root.monitorWithoutContentSelectable
|
monitorWithoutContentSelectable: root.monitorWithoutContentSelectable
|
||||||
onMonitorSelected: (index) => root.selectMonitorAt(index)
|
onMonitorSelected: function (index) {
|
||||||
|
root.selectMonitorAt(index)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
@ -156,8 +157,5 @@ Rectangle {
|
|||||||
policy: ScrollBar.AlwaysOff
|
policy: ScrollBar.AlwaysOff
|
||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,32 +6,23 @@ import QtQuick.Layouts
|
|||||||
import QtQuick.Controls.Material.impl
|
import QtQuick.Controls.Material.impl
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
import ScreenPlay.Enums.InstalledType 1.0
|
import ScreenPlay.Enums.InstalledType 1.0
|
||||||
import "../Common/" as SP
|
import "../Common/" as Common
|
||||||
|
|
||||||
Popup {
|
Common.Popup {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string activeMonitorName: ""
|
property string activeMonitorName: ""
|
||||||
property int activeMonitorIndex
|
property int activeMonitorIndex
|
||||||
property var modalSource
|
|
||||||
|
|
||||||
Overlay.modal: SP.ModalBackgroundBlur {
|
|
||||||
sourceItem: root.modalSource
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 1000
|
width: 1000
|
||||||
height: 500
|
height: 500
|
||||||
dim: true
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
modal: true
|
|
||||||
focus: true
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
monitorSelection.selectMonitorAt(0);
|
monitorSelection.selectMonitorAt(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onRequestToggleWallpaperConfiguration() {
|
function onRequestToggleWallpaperConfiguration() {
|
||||||
root.open();
|
root.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.util
|
target: ScreenPlay.util
|
||||||
@ -75,7 +66,6 @@ Popup {
|
|||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MonitorSelection {
|
MonitorSelection {
|
||||||
@ -88,20 +78,23 @@ Popup {
|
|||||||
monitorWithoutContentSelectable: false
|
monitorWithoutContentSelectable: false
|
||||||
availableWidth: width - 20
|
availableWidth: width - 20
|
||||||
availableHeight: 150
|
availableHeight: 150
|
||||||
onRequestProjectSettings: ( index, installedType, appID) => {
|
onRequestProjectSettings: function (index, installedType, appID) {
|
||||||
if (installedType === InstalledType.VideoWallpaper) {
|
if (installedType === InstalledType.VideoWallpaper) {
|
||||||
videoControlWrapper.state = "visible";
|
videoControlWrapper.state = "visible"
|
||||||
customPropertiesGridView.visible = false;
|
customPropertiesGridView.visible = false
|
||||||
const wallpaper = ScreenPlay.screenPlayManager.getWallpaperByAppID(appID);
|
const wallpaper = ScreenPlay.screenPlayManager.getWallpaperByAppID(
|
||||||
videoControlWrapper.wallpaper = wallpaper;
|
appID)
|
||||||
|
videoControlWrapper.wallpaper = wallpaper
|
||||||
} else {
|
} else {
|
||||||
videoControlWrapper.state = "hidden";
|
videoControlWrapper.state = "hidden"
|
||||||
customPropertiesGridView.visible = true;
|
customPropertiesGridView.visible = true
|
||||||
if(!ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(index)){
|
if (!ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(
|
||||||
console.warn("Unable to get requested settings from index: ", index)
|
index)) {
|
||||||
|
console.warn("Unable to get requested settings from index: ",
|
||||||
|
index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
activeMonitorIndex = index;
|
activeMonitorIndex = index
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -113,12 +106,11 @@ Popup {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onProjectSettingsListModelResult(listModel) {
|
function onProjectSettingsListModelResult(listModel) {
|
||||||
customPropertiesGridView.projectSettingsListmodelRef = listModel;
|
customPropertiesGridView.projectSettingsListmodelRef = listModel
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.screenPlayManager
|
target: ScreenPlay.screenPlayManager
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@ -137,34 +129,39 @@ Popup {
|
|||||||
highlighted: true
|
highlighted: true
|
||||||
text: qsTr("Remove selected")
|
text: qsTr("Remove selected")
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
enabled: monitorSelection.activeMonitors.length == 1 && ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|
enabled: monitorSelection.activeMonitors.length == 1
|
||||||
|
&& ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!ScreenPlay.screenPlayManager.removeWallpaperAt(monitorSelection.activeMonitors[0]))
|
if (!ScreenPlay.screenPlayManager.removeWallpaperAt(
|
||||||
print("Unable to close singel wallpaper");
|
monitorSelection.activeMonitors[0]))
|
||||||
|
print("Unable to close singel wallpaper")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: btnRemoveAllWallpape
|
id: btnRemoveAllWallpape
|
||||||
|
|
||||||
text: qsTr("Remove all ") + ScreenPlay.screenPlayManager.activeWallpaperCounter + " " + qsTr("Wallpapers")
|
text: qsTr("Remove all ")
|
||||||
|
+ ScreenPlay.screenPlayManager.activeWallpaperCounter + " " + qsTr(
|
||||||
|
"Wallpapers")
|
||||||
Material.background: Material.accent
|
Material.background: Material.accent
|
||||||
highlighted: true
|
highlighted: true
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|
enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!ScreenPlay.screenPlayManager.removeAllWallpapers())
|
if (!ScreenPlay.screenPlayManager.removeAllWallpapers())
|
||||||
print("Unable to close all wallpaper!");
|
print("Unable to close all wallpaper!")
|
||||||
|
|
||||||
root.close();
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: btnRemoveAllWidgets
|
id: btnRemoveAllWidgets
|
||||||
|
|
||||||
text: qsTr("Remove all ") + ScreenPlay.screenPlayManager.activeWidgetsCounter + " " + qsTr("Widgets")
|
text: qsTr("Remove all ")
|
||||||
|
+ ScreenPlay.screenPlayManager.activeWidgetsCounter + " " + qsTr(
|
||||||
|
"Widgets")
|
||||||
Material.background: Material.accent
|
Material.background: Material.accent
|
||||||
Material.foreground: Material.primaryTextColor
|
Material.foreground: Material.primaryTextColor
|
||||||
highlighted: true
|
highlighted: true
|
||||||
@ -172,18 +169,17 @@ Popup {
|
|||||||
enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
|
enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!ScreenPlay.screenPlayManager.removeAllWidgets())
|
if (!ScreenPlay.screenPlayManager.removeAllWidgets())
|
||||||
print("Unable to close all widgets!");
|
print("Unable to close all widgets!")
|
||||||
|
|
||||||
root.close();
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
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
|
radius: 3
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
@ -239,9 +235,7 @@ Popup {
|
|||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
policy: ScrollBar.AlwaysOn
|
policy: ScrollBar.AlwaysOn
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
@ -257,7 +251,6 @@ Popup {
|
|||||||
top: parent.top
|
top: parent.top
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveNotification {
|
SaveNotification {
|
||||||
@ -268,15 +261,12 @@ Popup {
|
|||||||
Connections {
|
Connections {
|
||||||
function onProfilesSaved() {
|
function onProfilesSaved() {
|
||||||
if (root.opened)
|
if (root.opened)
|
||||||
saveNotification.open();
|
saveNotification.open()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.screenPlayManager
|
target: ScreenPlay.screenPlayManager
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
@ -288,7 +278,5 @@ Popup {
|
|||||||
layer.effect: ElevationEffect {
|
layer.effect: ElevationEffect {
|
||||||
elevation: 6
|
elevation: 6
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,10 @@ Rectangle {
|
|||||||
property string currentNavigationName: "Installed"
|
property string currentNavigationName: "Installed"
|
||||||
property var navArray: [navCreate, navWorkshop, navInstalled, navSettings, navCommunity]
|
property var navArray: [navCreate, navWorkshop, navInstalled, navSettings, navCommunity]
|
||||||
property bool navActive: true
|
property bool navActive: true
|
||||||
property ApplicationWindow window
|
property Item modalSource
|
||||||
property var modalSource
|
|
||||||
property int iconWidth: 16
|
property int iconWidth: 16
|
||||||
property int iconHeight: iconWidth
|
property int iconHeight: iconWidth
|
||||||
|
|
||||||
|
|
||||||
signal changePage(string name)
|
signal changePage(string name)
|
||||||
|
|
||||||
function setActive(active) {
|
function setActive(active) {
|
||||||
@ -51,78 +49,13 @@ Rectangle {
|
|||||||
setNavigation(name)
|
setNavigation(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
height: 89
|
implicitWidth: 1366
|
||||||
|
height: 60
|
||||||
width: 1366
|
width: 1366
|
||||||
color: Material.theme === Material.Light ? "white" : Material.background
|
color: Material.theme === Material.Light ? "white" : Material.background
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
|
layer.effect: ElevationEffect {
|
||||||
Rectangle {
|
elevation: 2
|
||||||
id:navBg
|
|
||||||
height:29
|
|
||||||
width:parent.width
|
|
||||||
color: Material.theme === Material.Light ? Material.background : "#242424"
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: title
|
|
||||||
text: qsTr("ScreenPlay Alpha %1 - Open Source Wallpaper And Widgets").arg(ScreenPlay.version())
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
anchors{
|
|
||||||
left:parent.left
|
|
||||||
leftMargin: 20
|
|
||||||
verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: mouseArea
|
|
||||||
|
|
||||||
property var clickPos
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onPressed: (mouse)=>{
|
|
||||||
clickPos = {
|
|
||||||
"x": mouse.x,
|
|
||||||
"y": mouse.y
|
|
||||||
};
|
|
||||||
}
|
|
||||||
onPositionChanged: {
|
|
||||||
if (mouseArea.pressed){
|
|
||||||
let pos = ScreenPlay.cursorPos();
|
|
||||||
window.setX(pos.x - clickPos.x)
|
|
||||||
window.setY(pos.y - clickPos.y)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
anchors {
|
|
||||||
top:navBg.top
|
|
||||||
right: navBg.right
|
|
||||||
bottom: navBg.bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
WindowNavButton {
|
|
||||||
id: miMinimize
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
icon.source: "qrc:/assets/icons/icon_minimize.svg"
|
|
||||||
onClicked: root.window.hide()
|
|
||||||
}
|
|
||||||
WindowNavButton {
|
|
||||||
id: miquit
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
icon.source: "qrc:/assets/icons/icon_close.svg"
|
|
||||||
onClicked: {
|
|
||||||
if(ScreenPlay.screenPlayManager.activeWallpaperCounter === 0
|
|
||||||
&& ScreenPlay.screenPlayManager.activeWidgetsCounter === 0){
|
|
||||||
Qt.quit()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@ -137,16 +70,12 @@ Rectangle {
|
|||||||
target: ScreenPlay.util
|
target: ScreenPlay.util
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: row
|
id: row
|
||||||
height: 60
|
height: 60
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top:parent.top
|
top: parent.top
|
||||||
topMargin: navBg.height
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
@ -161,7 +90,9 @@ Rectangle {
|
|||||||
name: "Create"
|
name: "Create"
|
||||||
text: qsTr("Create")
|
text: qsTr("Create")
|
||||||
iconSource: "qrc:/assets/icons/icon_plus.svg"
|
iconSource: "qrc:/assets/icons/icon_plus.svg"
|
||||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
onPageClicked: function (name) {
|
||||||
|
root.onPageChanged(name)
|
||||||
|
}
|
||||||
objectName: "createTab"
|
objectName: "createTab"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +103,9 @@ Rectangle {
|
|||||||
name: "Workshop"
|
name: "Workshop"
|
||||||
text: qsTr("Workshop")
|
text: qsTr("Workshop")
|
||||||
iconSource: "qrc:/assets/icons/icon_steam.svg"
|
iconSource: "qrc:/assets/icons/icon_steam.svg"
|
||||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
onPageClicked: function (name) {
|
||||||
|
root.onPageChanged(name)
|
||||||
|
}
|
||||||
objectName: "workshopTab"
|
objectName: "workshopTab"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +117,9 @@ Rectangle {
|
|||||||
text: qsTr("Installed")
|
text: qsTr("Installed")
|
||||||
amount: ScreenPlay.installedListModel.count
|
amount: ScreenPlay.installedListModel.count
|
||||||
iconSource: "qrc:/assets/icons/icon_installed.svg"
|
iconSource: "qrc:/assets/icons/icon_installed.svg"
|
||||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
onPageClicked: function (name) {
|
||||||
|
root.onPageChanged(name)
|
||||||
|
}
|
||||||
objectName: "installedTab"
|
objectName: "installedTab"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +130,9 @@ Rectangle {
|
|||||||
name: "Community"
|
name: "Community"
|
||||||
text: qsTr("Community")
|
text: qsTr("Community")
|
||||||
iconSource: "qrc:/assets/icons/icon_community.svg"
|
iconSource: "qrc:/assets/icons/icon_community.svg"
|
||||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
onPageClicked: function (name) {
|
||||||
|
root.onPageChanged(name)
|
||||||
|
}
|
||||||
objectName: "communityTab"
|
objectName: "communityTab"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,27 +143,28 @@ Rectangle {
|
|||||||
name: "Settings"
|
name: "Settings"
|
||||||
text: qsTr("Settings")
|
text: qsTr("Settings")
|
||||||
iconSource: "qrc:/assets/icons/icon_settings.svg"
|
iconSource: "qrc:/assets/icons/icon_settings.svg"
|
||||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
onPageClicked: function (name) {
|
||||||
|
root.onPageChanged(name)
|
||||||
|
}
|
||||||
objectName: "settingsTab"
|
objectName: "settingsTab"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id:quickActionRowBackground
|
id: quickActionRowBackground
|
||||||
anchors.centerIn: quickActionRow
|
anchors.centerIn: quickActionRow
|
||||||
width: quickActionRow.width + 5
|
width: quickActionRow.width + 5
|
||||||
height: quickActionRow.height - 16
|
height: quickActionRow.height - 16
|
||||||
color: Material.theme === Material.Light ? Material.background : "#242424"
|
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
|
border.width: 1
|
||||||
radius: 3
|
radius: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: navBg.height
|
|
||||||
right: quickActionRow.left
|
right: quickActionRow.left
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
@ -235,7 +173,8 @@ Rectangle {
|
|||||||
ToolButton {
|
ToolButton {
|
||||||
icon.source: "qrc:/assets/icons/font-awsome/patreon-brands.svg"
|
icon.source: "qrc:/assets/icons/font-awsome/patreon-brands.svg"
|
||||||
text: qsTr("Support me on Patreon!")
|
text: qsTr("Support me on Patreon!")
|
||||||
onClicked: Qt.openUrlExternally("https://www.patreon.com/ScreenPlayApp")
|
onClicked: Qt.openUrlExternally(
|
||||||
|
"https://www.patreon.com/ScreenPlayApp")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +182,6 @@ Rectangle {
|
|||||||
id: quickActionRow
|
id: quickActionRow
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: navBg.height
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 10
|
rightMargin: 10
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
@ -253,9 +191,9 @@ Rectangle {
|
|||||||
|| ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
|
|| ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
|
||||||
|
|
||||||
onContentActiveChanged: {
|
onContentActiveChanged: {
|
||||||
if(!contentActive){
|
if (!contentActive) {
|
||||||
miMuteAll.isMuted = false
|
miMuteAll.soundEnabled = true
|
||||||
miStopAll.isPlaying = false
|
miStopAll.isPlaying = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,10 +205,10 @@ Rectangle {
|
|||||||
icon.height: root.iconHeight
|
icon.height: root.iconHeight
|
||||||
enabled: quickActionRow.contentActive
|
enabled: quickActionRow.contentActive
|
||||||
|
|
||||||
onClicked: isMuted = !isMuted
|
onClicked: soundEnabled = !soundEnabled
|
||||||
property bool isMuted: false
|
property bool soundEnabled: true
|
||||||
onIsMutedChanged: {
|
onSoundEnabledChanged: {
|
||||||
if (miMuteAll.isMuted) {
|
if (miMuteAll.soundEnabled) {
|
||||||
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume.svg"
|
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume.svg"
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
|
||||||
"false")
|
"false")
|
||||||
@ -294,7 +232,7 @@ Rectangle {
|
|||||||
icon.height: root.iconHeight
|
icon.height: root.iconHeight
|
||||||
onClicked: isPlaying = !isPlaying
|
onClicked: isPlaying = !isPlaying
|
||||||
property bool isPlaying: true
|
property bool isPlaying: true
|
||||||
onIsPlayingChanged:{
|
onIsPlayingChanged: {
|
||||||
if (miStopAll.isPlaying) {
|
if (miStopAll.isPlaying) {
|
||||||
miStopAll.icon.source = "qrc:/assets/icons/icon_pause.svg"
|
miStopAll.icon.source = "qrc:/assets/icons/icon_pause.svg"
|
||||||
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
ScreenPlay.screenPlayManager.setAllWallpaperValue(
|
||||||
@ -321,6 +259,8 @@ Rectangle {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
ScreenPlay.screenPlayManager.removeAllWallpapers()
|
ScreenPlay.screenPlayManager.removeAllWallpapers()
|
||||||
ScreenPlay.screenPlayManager.removeAllWidgets()
|
ScreenPlay.screenPlayManager.removeAllWidgets()
|
||||||
|
miStopAll.isPlaying = true
|
||||||
|
miMuteAll.soundEnabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@ -329,39 +269,16 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: miConfig
|
id: miConfig
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
icon.source: "qrc:/assets/icons/icon_video_settings_black_24dp.svg"
|
icon.source: "qrc:/assets/icons/icon_video_settings_black_24dp.svg"
|
||||||
icon.width: root.iconWidth
|
icon.width: root.iconWidth
|
||||||
icon.height: root.iconHeight
|
icon.height: root.iconHeight
|
||||||
onClicked: ScreenPlay.util.setToggleWallpaperConfiguration()
|
onClicked: ScreenPlay.util.setToggleWallpaperConfiguration()
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ToolTip.text: qsTr("Configure Wallpaper")
|
ToolTip.text: qsTr("Configure Wallpaper")
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
id: dialog
|
|
||||||
anchors.centerIn: Overlay.overlay
|
|
||||||
|
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
|
||||||
sourceItem: root.modalSource
|
|
||||||
}
|
|
||||||
title: qsTr("Are you sure you want to exit ScreenPlay? \nThis will shut down all Wallpaper and Widgets.")
|
|
||||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
|
||||||
onAccepted: Qt.quit()
|
|
||||||
modal: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
layer.effect: ElevationEffect {
|
|
||||||
elevation: 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
|
92
ScreenPlay/qml/Navigation/WindowNavigation.qml
Normal file
92
ScreenPlay/qml/Navigation/WindowNavigation.qml
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Window
|
||||||
|
import QtQuick.Controls.Material
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
|
import QtQuick.Controls.Material.impl
|
||||||
|
import ScreenPlay 1.0
|
||||||
|
import "../Workshop"
|
||||||
|
import "../Common" as Common
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
height: 29
|
||||||
|
implicitWidth: 1366
|
||||||
|
color: Material.theme === Material.Light ? Material.background : "#242424"
|
||||||
|
property Item modalSource
|
||||||
|
property ApplicationWindow window
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: title
|
||||||
|
text: qsTr("ScreenPlay Alpha %1 - Open Source Wallpaper And Widgets").arg(
|
||||||
|
ScreenPlay.version())
|
||||||
|
color: Material.primaryTextColor
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 10
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
|
||||||
|
property var clickPos
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onPressed: function (mouse) {
|
||||||
|
clickPos = {
|
||||||
|
"x": mouse.x,
|
||||||
|
"y": mouse.y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onPositionChanged: {
|
||||||
|
if (mouseArea.pressed) {
|
||||||
|
let pos = ScreenPlay.cursorPos()
|
||||||
|
window.setX(pos.x - clickPos.x)
|
||||||
|
window.setY(pos.y - clickPos.y)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors {
|
||||||
|
top: root.top
|
||||||
|
right: root.right
|
||||||
|
bottom: root.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
WindowNavButton {
|
||||||
|
id: miMinimize
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
icon.source: "qrc:/assets/icons/icon_minimize.svg"
|
||||||
|
onClicked: root.window.hide()
|
||||||
|
}
|
||||||
|
WindowNavButton {
|
||||||
|
id: miquit
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
icon.source: "qrc:/assets/icons/icon_close.svg"
|
||||||
|
onClicked: {
|
||||||
|
if (ScreenPlay.screenPlayManager.activeWallpaperCounter === 0
|
||||||
|
&& ScreenPlay.screenPlayManager.activeWidgetsCounter === 0) {
|
||||||
|
Qt.quit()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Common.Dialog {
|
||||||
|
id: dialog
|
||||||
|
modalSource: root.modalSource
|
||||||
|
title: qsTr("Are you sure you want to exit ScreenPlay? \nThis will shut down all Wallpaper and Widgets.")
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
onAccepted: Qt.quit()
|
||||||
|
}
|
||||||
|
}
|
@ -18,11 +18,11 @@ Item {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
onAvailableChanged: {
|
onAvailableChanged: {
|
||||||
if (!available) {
|
if (!available) {
|
||||||
settingsBool.opacity = 0.5;
|
settingsBool.opacity = 0.5
|
||||||
radioButton.enabled = false;
|
radioButton.enabled = false
|
||||||
} else {
|
} else {
|
||||||
settingsButton.opacity = 1;
|
settingsButton.opacity = 1
|
||||||
radioButton.enabled = true;
|
radioButton.enabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,6 @@ Item {
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -54,8 +53,13 @@ Item {
|
|||||||
text: settingsBool.description
|
text: settingsBool.description
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
linkColor: Material.color(Material.Orange)
|
linkColor: Material.color(Material.Orange)
|
||||||
onLinkActivated: (link) => Qt.openUrlExternally(link)
|
onLinkActivated: function (link) {
|
||||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
|
||||||
|
color: Material.theme === Material.Light ? Qt.lighter(
|
||||||
|
Material.foreground) : Qt.darker(
|
||||||
|
Material.foreground)
|
||||||
font.family: ScreenPlay.settings.font
|
font.family: ScreenPlay.settings.font
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
@ -69,7 +73,6 @@ Item {
|
|||||||
right: radioButton.left
|
right: radioButton.left
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
@ -78,9 +81,9 @@ Item {
|
|||||||
checked: settingsBool.isChecked
|
checked: settingsBool.isChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (radioButton.checkState === Qt.Checked)
|
if (radioButton.checkState === Qt.Checked)
|
||||||
checkboxChanged(true);
|
checkboxChanged(true)
|
||||||
else
|
else
|
||||||
checkboxChanged(false);
|
checkboxChanged(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -88,7 +91,5 @@ Item {
|
|||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,16 +12,15 @@ import "../Common"
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
|
|
||||||
function indexOfValue(model, value) {
|
function indexOfValue(model, value) {
|
||||||
for (var i = 0; i < model.length; i++) {
|
for (var i = 0; i < model.length; i++) {
|
||||||
let ourValue = model[i].value;
|
let ourValue = model[i].value
|
||||||
if (value === ourValue)
|
if (value === ourValue)
|
||||||
return i;
|
return i
|
||||||
|
|
||||||
}
|
}
|
||||||
return -1;
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
@ -74,13 +73,12 @@ Item {
|
|||||||
headline: qsTr("Autostart")
|
headline: qsTr("Autostart")
|
||||||
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
||||||
isChecked: ScreenPlay.settings.autostart
|
isChecked: ScreenPlay.settings.autostart
|
||||||
onCheckboxChanged: (checked) => {
|
onCheckboxChanged: function (checked) {
|
||||||
ScreenPlay.settings.setAutostart(checked);
|
ScreenPlay.settings.setAutostart(checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingBool {
|
SettingBool {
|
||||||
headline: qsTr("High priority Autostart")
|
headline: qsTr("High priority Autostart")
|
||||||
@ -88,49 +86,47 @@ Item {
|
|||||||
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
|
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
|
||||||
isChecked: ScreenPlay.settings.highPriorityStart
|
isChecked: ScreenPlay.settings.highPriorityStart
|
||||||
onCheckboxChanged: {
|
onCheckboxChanged: {
|
||||||
ScreenPlay.settings.setHighPriorityStart(checked);
|
ScreenPlay.settings.setHighPriorityStart(checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingBool {
|
SettingBool {
|
||||||
height: 70
|
height: 70
|
||||||
headline: qsTr("Send anonymous crash reports and statistics")
|
headline: qsTr("Send anonymous crash reports and statistics")
|
||||||
description: qsTr("Help us make ScreenPlay faster and more stable. All collected data is purely anonymous and only used for development purposes! We use <a href=\"https://sentry.io\">sentry.io</a> to collect and analyze this data. A <b>big thanks to them</b> for providing us with free premium support for open source projects!")
|
description: qsTr("Help us make ScreenPlay faster and more stable. All collected data is purely anonymous and only used for development purposes! We use <a href=\"https://sentry.io\">sentry.io</a> to collect and analyze this data. A <b>big thanks to them</b> for providing us with free premium support for open source projects!")
|
||||||
isChecked: ScreenPlay.settings.anonymousTelemetry
|
isChecked: ScreenPlay.settings.anonymousTelemetry
|
||||||
onCheckboxChanged: (checked) => {
|
onCheckboxChanged: function (checked) {
|
||||||
ScreenPlay.settings.setAnonymousTelemetry(checked);
|
ScreenPlay.settings.setAnonymousTelemetry(checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsButton {
|
SettingsButton {
|
||||||
headline: qsTr("Set save location")
|
headline: qsTr("Set save location")
|
||||||
buttonText: qsTr("Set location")
|
buttonText: qsTr("Set location")
|
||||||
description: {
|
description: {
|
||||||
// Remove file:/// so the used does not get confused
|
// Remove file:/// so the used does not get confused
|
||||||
let path = ScreenPlay.globalVariables.localStoragePath + "";
|
let path = ScreenPlay.globalVariables.localStoragePath + ""
|
||||||
if (path.length === 0)
|
if (path.length === 0)
|
||||||
return qsTr("Your storage path is empty!");
|
return qsTr("Your storage path is empty!")
|
||||||
else
|
else
|
||||||
return path.replace('file:///', '');
|
return path.replace('file:///', '')
|
||||||
}
|
}
|
||||||
onButtonPressed: {
|
onButtonPressed: {
|
||||||
folderDialogSaveLocation.open();
|
folderDialogSaveLocation.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
FolderDialog {
|
FolderDialog {
|
||||||
id: folderDialogSaveLocation
|
id: folderDialogSaveLocation
|
||||||
folder: ScreenPlay.globalVariables.localStoragePath
|
folder: ScreenPlay.globalVariables.localStoragePath
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
ScreenPlay.settings.setLocalStoragePath(folderDialogSaveLocation.currentFolder);
|
ScreenPlay.settings.setLocalStoragePath(
|
||||||
|
folderDialogSaveLocation.currentFolder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -149,11 +145,9 @@ Item {
|
|||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: settingsLanguage
|
id: settingsLanguage
|
||||||
@ -161,60 +155,61 @@ Item {
|
|||||||
headline: qsTr("Language")
|
headline: qsTr("Language")
|
||||||
description: qsTr("Set the ScreenPlay UI Language")
|
description: qsTr("Set the ScreenPlay UI Language")
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
settingsLanguage.comboBox.currentIndex = root.indexOfValue(settingsLanguage.comboBox.model, ScreenPlay.settings.language);
|
settingsLanguage.comboBox.currentIndex = root.indexOfValue(
|
||||||
|
settingsLanguage.comboBox.model,
|
||||||
|
ScreenPlay.settings.language)
|
||||||
}
|
}
|
||||||
|
|
||||||
comboBox {
|
comboBox {
|
||||||
model: [{
|
model: [{
|
||||||
"value": Settings.En_US,
|
"value": Settings.En_US,
|
||||||
"text": "English"
|
"text": "English"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.De_DE,
|
"value": Settings.De_DE,
|
||||||
"text": "German"
|
"text": "German"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Pl_PL,
|
"value": Settings.Pl_PL,
|
||||||
"text": "Polish"
|
"text": "Polish"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.It_IT,
|
"value": Settings.It_IT,
|
||||||
"text": "Italian"
|
"text": "Italian"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Zh_CN,
|
"value": Settings.Zh_CN,
|
||||||
"text": "Chinese - Simplified"
|
"text": "Chinese - Simplified"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Ru_RU,
|
"value": Settings.Ru_RU,
|
||||||
"text": "Russian"
|
"text": "Russian"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Fr_FR,
|
"value": Settings.Fr_FR,
|
||||||
"text": "French"
|
"text": "French"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Es_ES,
|
"value": Settings.Es_ES,
|
||||||
"text": "Spanish"
|
"text": "Spanish"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Ko_KR,
|
"value": Settings.Ko_KR,
|
||||||
"text": "Korean"
|
"text": "Korean"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Vi_VN,
|
"value": Settings.Vi_VN,
|
||||||
"text": "Vietnamese"
|
"text": "Vietnamese"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Pt_BR,
|
"value": Settings.Pt_BR,
|
||||||
"text": "Portuguese (Brazil)"
|
"text": "Portuguese (Brazil)"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Tr_TR,
|
"value": Settings.Tr_TR,
|
||||||
"text": "Turkish"
|
"text": "Turkish"
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Nl_NL,
|
"value": Settings.Nl_NL,
|
||||||
"text": "Dutch"
|
"text": "Dutch"
|
||||||
}]
|
}]
|
||||||
onActivated: {
|
onActivated: {
|
||||||
ScreenPlay.settings.setLanguage(settingsLanguage.comboBox.currentValue);
|
ScreenPlay.settings.setLanguage(
|
||||||
ScreenPlay.settings.retranslateUI();
|
settingsLanguage.comboBox.currentValue)
|
||||||
|
ScreenPlay.settings.retranslateUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: settingsTheme
|
id: settingsTheme
|
||||||
@ -222,29 +217,29 @@ Item {
|
|||||||
headline: qsTr("Theme")
|
headline: qsTr("Theme")
|
||||||
description: qsTr("Switch dark/light theme")
|
description: qsTr("Switch dark/light theme")
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
settingsTheme.comboBox.currentIndex = root.indexOfValue(settingsTheme.comboBox.model, ScreenPlay.settings.theme);
|
settingsTheme.comboBox.currentIndex = root.indexOfValue(
|
||||||
|
settingsTheme.comboBox.model,
|
||||||
|
ScreenPlay.settings.theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
comboBox {
|
comboBox {
|
||||||
model: [{
|
model: [{
|
||||||
"value": Settings.System,
|
"value": Settings.System,
|
||||||
"text": qsTr("System Default")
|
"text": qsTr("System Default")
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Dark,
|
"value": Settings.Dark,
|
||||||
"text": qsTr("Dark")
|
"text": qsTr("Dark")
|
||||||
}, {
|
}, {
|
||||||
"value": Settings.Light,
|
"value": Settings.Light,
|
||||||
"text": qsTr("Light")
|
"text": qsTr("Light")
|
||||||
}]
|
}]
|
||||||
onActivated: {
|
onActivated: {
|
||||||
ScreenPlay.settings.setTheme(settingsTheme.comboBox.currentValue);
|
ScreenPlay.settings.setTheme(
|
||||||
|
settingsTheme.comboBox.currentValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsPage {
|
SettingsPage {
|
||||||
@ -274,13 +269,13 @@ Item {
|
|||||||
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
|
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
|
||||||
description: qsTr("We disable the video rendering (not the audio!) for the best performance. If you have problem you can disable this behaviour here. Wallpaper restart required!")
|
description: qsTr("We disable the video rendering (not the audio!) for the best performance. If you have problem you can disable this behaviour here. Wallpaper restart required!")
|
||||||
isChecked: ScreenPlay.settings.checkWallpaperVisible
|
isChecked: ScreenPlay.settings.checkWallpaperVisible
|
||||||
onCheckboxChanged: (checked) =>{
|
onCheckboxChanged: function (checked) {
|
||||||
ScreenPlay.settings.setCheckWallpaperVisible(checked);
|
ScreenPlay.settings.setCheckWallpaperVisible(
|
||||||
|
checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: cbVideoFillMode
|
id: cbVideoFillMode
|
||||||
@ -288,33 +283,33 @@ Item {
|
|||||||
headline: qsTr("Default Fill Mode")
|
headline: qsTr("Default Fill Mode")
|
||||||
description: qsTr("Set this property to define how the video is scaled to fit the target area.")
|
description: qsTr("Set this property to define how the video is scaled to fit the target area.")
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(cbVideoFillMode.comboBox.model, ScreenPlay.settings.videoFillMode);
|
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(
|
||||||
|
cbVideoFillMode.comboBox.model,
|
||||||
|
ScreenPlay.settings.videoFillMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
comboBox {
|
comboBox {
|
||||||
onActivated: ScreenPlay.settings.setVideoFillMode(cbVideoFillMode.comboBox.currentValue)
|
onActivated: ScreenPlay.settings.setVideoFillMode(
|
||||||
|
cbVideoFillMode.comboBox.currentValue)
|
||||||
model: [{
|
model: [{
|
||||||
"value": FillMode.Stretch,
|
"value": FillMode.Stretch,
|
||||||
"text": qsTr("Stretch")
|
"text": qsTr("Stretch")
|
||||||
}, {
|
}, {
|
||||||
"value": FillMode.Fill,
|
"value": FillMode.Fill,
|
||||||
"text": qsTr("Fill")
|
"text": qsTr("Fill")
|
||||||
}, {
|
}, {
|
||||||
"value": FillMode.Contain,
|
"value": FillMode.Contain,
|
||||||
"text": qsTr("Contain")
|
"text": qsTr("Contain")
|
||||||
}, {
|
}, {
|
||||||
"value": FillMode.Cover,
|
"value": FillMode.Cover,
|
||||||
"text": qsTr("Cover")
|
"text": qsTr("Cover")
|
||||||
}, {
|
}, {
|
||||||
"value": FillMode.Scale_Down,
|
"value": FillMode.Scale_Down,
|
||||||
"text": qsTr("Scale-Down")
|
"text": qsTr("Scale-Down")
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsPage {
|
SettingsPage {
|
||||||
@ -348,7 +343,8 @@ Item {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: txtHeadline.paintedHeight + txtDescriptionAbout.paintedHeight + wrapperLinks.childrenRect.height + 80
|
height: txtHeadline.paintedHeight + txtDescriptionAbout.paintedHeight
|
||||||
|
+ wrapperLinks.childrenRect.height + 80
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtHeadline
|
id: txtHeadline
|
||||||
@ -366,7 +362,6 @@ Item {
|
|||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -389,7 +384,6 @@ Item {
|
|||||||
right: imgLogoHead.left
|
right: imgLogoHead.left
|
||||||
rightMargin: 60
|
rightMargin: 60
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@ -432,7 +426,6 @@ Item {
|
|||||||
url: "https://www.reddit.com/r/ScreenPlayApp/"
|
url: "https://www.reddit.com/r/ScreenPlayApp/"
|
||||||
color: "#FF4500"
|
color: "#FF4500"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
@ -450,7 +443,6 @@ Item {
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
@ -472,32 +464,30 @@ Item {
|
|||||||
maskSource: mask
|
maskSource: mask
|
||||||
smooth: true
|
smooth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsButton {
|
SettingsButton {
|
||||||
icon.source: "qrc:/assets/icons/icon_launch.svg"
|
icon.source: "qrc:/assets/icons/icon_launch.svg"
|
||||||
headline: qsTr("Version")
|
headline: qsTr("Version")
|
||||||
description: qsTr("ScreenPlay Build Version \n") + ScreenPlay.settings.gitBuildHash
|
description: qsTr("ScreenPlay Build Version \n")
|
||||||
|
+ ScreenPlay.settings.gitBuildHash
|
||||||
buttonText: qsTr("Open Changelog")
|
buttonText: qsTr("Open Changelog")
|
||||||
onButtonPressed: Qt.openUrlExternally("https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
onButtonPressed: Qt.openUrlExternally(
|
||||||
|
"https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsButton {
|
SettingsButton {
|
||||||
headline: qsTr("Third Party Software")
|
headline: qsTr("Third Party Software")
|
||||||
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
||||||
buttonText: qsTr("Licenses")
|
buttonText: qsTr("Licenses")
|
||||||
onButtonPressed: {
|
onButtonPressed: {
|
||||||
ScreenPlay.util.requestAllLicenses();
|
ScreenPlay.util.requestAllLicenses()
|
||||||
expanderCopyright.toggle();
|
expanderCopyright.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,23 +496,21 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onAllLicenseLoaded(licensesText) {
|
function onAllLicenseLoaded(licensesText) {
|
||||||
expanderCopyright.text = licensesText;
|
expanderCopyright.text = licensesText
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.util
|
target: ScreenPlay.util
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsButton {
|
SettingsButton {
|
||||||
headline: qsTr("Logs")
|
headline: qsTr("Logs")
|
||||||
description: qsTr("If your ScreenPlay missbehaves this is a good way to look for answers. This shows all logs and warning during runtime.")
|
description: qsTr("If your ScreenPlay missbehaves this is a good way to look for answers. This shows all logs and warning during runtime.")
|
||||||
buttonText: qsTr("Show Logs")
|
buttonText: qsTr("Show Logs")
|
||||||
onButtonPressed: {
|
onButtonPressed: {
|
||||||
expanderDebug.toggle();
|
expanderDebug.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,16 +520,15 @@ Item {
|
|||||||
text: ScreenPlay.util.debugMessages
|
text: ScreenPlay.util.debugMessages
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {
|
SettingsHorizontalSeperator {}
|
||||||
}
|
|
||||||
|
|
||||||
SettingsButton {
|
SettingsButton {
|
||||||
headline: qsTr("Data Protection")
|
headline: qsTr("Data Protection")
|
||||||
description: qsTr("We use you data very carefully to improve ScreenPlay. We do not sell or share this (anonymous) information with others!")
|
description: qsTr("We use you data very carefully to improve ScreenPlay. We do not sell or share this (anonymous) information with others!")
|
||||||
buttonText: qsTr("Privacy")
|
buttonText: qsTr("Privacy")
|
||||||
onButtonPressed: {
|
onButtonPressed: {
|
||||||
ScreenPlay.util.requestDataProtection();
|
ScreenPlay.util.requestDataProtection()
|
||||||
expanderDataProtection.toggle();
|
expanderDataProtection.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,24 +537,18 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onAllDataProtectionLoaded(dataProtectionText) {
|
function onAllDataProtectionLoaded(dataProtectionText) {
|
||||||
expanderDataProtection.text = dataProtectionText;
|
expanderDataProtection.text = dataProtectionText
|
||||||
}
|
}
|
||||||
|
|
||||||
target: ScreenPlay.util
|
target: ScreenPlay.util
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ Popup {
|
|||||||
}
|
}
|
||||||
required property ScreenPlayWorkshop workshop
|
required property ScreenPlayWorkshop workshop
|
||||||
required property SteamWorkshop steam
|
required property SteamWorkshop steam
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
Overlay.modal: ModalBackgroundBlur {
|
||||||
sourceItem: root.modalSource
|
sourceItem: root.modalSource
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import "upload/"
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
|
|
||||||
ScreenPlayWorkshop {
|
ScreenPlayWorkshop {
|
||||||
id: screenPlayWorkshop
|
id: screenPlayWorkshop
|
||||||
|
@ -16,7 +16,7 @@ Item {
|
|||||||
property ScreenPlayWorkshop screenPlayWorkshop
|
property ScreenPlayWorkshop screenPlayWorkshop
|
||||||
property StackView stackView
|
property StackView stackView
|
||||||
property Background background
|
property Background background
|
||||||
property var modalSource
|
property Item modalSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
root.steamWorkshop.searchWorkshop(SteamEnums.K_EUGCQuery_RankedByTrend)
|
root.steamWorkshop.searchWorkshop(SteamEnums.K_EUGCQuery_RankedByTrend)
|
||||||
@ -314,7 +314,7 @@ Item {
|
|||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
Common.TextField {
|
||||||
id: tiSearch
|
id: tiSearch
|
||||||
placeholderText: qsTr("Search for Wallpaper and Widgets...")
|
placeholderText: qsTr("Search for Wallpaper and Widgets...")
|
||||||
onEditingFinished: root.steamWorkshop.searchWorkshopByText(
|
onEditingFinished: root.steamWorkshop.searchWorkshopByText(
|
||||||
|
@ -9,7 +9,7 @@ import ScreenPlay
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var modalSource
|
required property Item modalSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (ScreenPlay.settings.steamVersion) {
|
if (ScreenPlay.settings.steamVersion) {
|
||||||
|
@ -14,7 +14,7 @@ Popup {
|
|||||||
height: 400
|
height: 400
|
||||||
closePolicy: Popup.NoAutoClose
|
closePolicy: Popup.NoAutoClose
|
||||||
anchors.centerIn: Overlay.overlay
|
anchors.centerIn: Overlay.overlay
|
||||||
property var modalSource
|
property Item modalSource
|
||||||
Overlay.modal: ModalBackgroundBlur {
|
Overlay.modal: ModalBackgroundBlur {
|
||||||
sourceItem: root.modalSource
|
sourceItem: root.modalSource
|
||||||
}
|
}
|
||||||
|
@ -774,15 +774,6 @@
|
|||||||
<source>Configure Wallpaper</source>
|
<source>Configure Wallpaper</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Are you sure you want to exit ScreenPlay?
|
|
||||||
This will shut down all Wallpaper and Widgets.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>ScreenPlay Alpha %1 - Open Source Wallpaper And Widgets</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Support me on Patreon!</source>
|
<source>Support me on Patreon!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -795,11 +786,16 @@ This will shut down all Wallpaper and Widgets.</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>PopupOffline</name>
|
<name>PopupOffline</name>
|
||||||
<message>
|
<message>
|
||||||
<source>You need to run Steam for this. steamErrorRestart: %1 - steamErrorAPIInit: %2</source>
|
<source>Back</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Back</source>
|
<source>You need to run Steam to access the Steam Workshop</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Steam Error Restart: %1
|
||||||
|
Steam Error API Init: %2</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
@ -1908,6 +1904,18 @@ This will shut down all Wallpaper and Widgets.</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>WindowNavigation</name>
|
||||||
|
<message>
|
||||||
|
<source>ScreenPlay Alpha %1 - Open Source Wallpaper And Widgets</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Are you sure you want to exit ScreenPlay?
|
||||||
|
This will shut down all Wallpaper and Widgets.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>WizardPage</name>
|
<name>WizardPage</name>
|
||||||
<message>
|
<message>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -41,9 +41,12 @@ Item {
|
|||||||
WebEngineView {
|
WebEngineView {
|
||||||
id: webView
|
id: webView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
url: Qt.resolvedUrl("file://"+ Wallpaper.getApplicationPath() + "/index.html")
|
url: Qt.resolvedUrl("file://" + Wallpaper.getApplicationPath(
|
||||||
onJavaScriptConsoleMessage: (lineNumber, message) => print(lineNumber,
|
) + "/index.html")
|
||||||
message)
|
onJavaScriptConsoleMessage: function (lineNumber, message) {
|
||||||
|
print(lineNumber, message)
|
||||||
|
}
|
||||||
|
|
||||||
onLoadProgressChanged: {
|
onLoadProgressChanged: {
|
||||||
if (loadProgress === 100) {
|
if (loadProgress === 100) {
|
||||||
webView.runJavaScript(root.getSetVideoCommand(),
|
webView.runJavaScript(root.getSetVideoCommand(),
|
||||||
|
@ -11,24 +11,25 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onQmlExit() {
|
function onQmlExit() {
|
||||||
if(Qt.platform.os === "windows")
|
if (Qt.platform.os === "windows")
|
||||||
Widget.setWindowBlur(0);
|
Widget.setWindowBlur(0)
|
||||||
|
|
||||||
animFadeOut.start();
|
animFadeOut.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
function onQmlSceneValueReceived(key, value) {
|
function onQmlSceneValueReceived(key, value) {
|
||||||
var obj2 = 'import QtQuick; Item {Component.onCompleted: loader.item.' + key + ' = ' + value + '; }';
|
var obj2 = 'import QtQuick; Item {Component.onCompleted: loader.item.'
|
||||||
var newObject = Qt.createQmlObject(obj2.toString(), root, "err");
|
+ key + ' = ' + value + '; }'
|
||||||
newObject.destroy(10000);
|
var newObject = Qt.createQmlObject(obj2.toString(), root, "err")
|
||||||
|
newObject.destroy(10000)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace wallpaper with QML Scene
|
// Replace wallpaper with QML Scene
|
||||||
function onReloadQML(oldType) {
|
function onReloadQML(oldType) {
|
||||||
loader.sourceComponent = undefined;
|
loader.sourceComponent = undefined
|
||||||
loader.source = "";
|
loader.source = ""
|
||||||
Widget.clearComponentCache();
|
Widget.clearComponentCache()
|
||||||
loader.source = Qt.resolvedUrl(Widget.projectSourceFileAbsolute);
|
loader.source = Qt.resolvedUrl(Widget.projectSourceFileAbsolute)
|
||||||
}
|
}
|
||||||
|
|
||||||
target: Widget
|
target: Widget
|
||||||
@ -70,24 +71,25 @@ Item {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
switch (Widget.type) {
|
switch (Widget.type) {
|
||||||
case InstalledType.QMLWidget:
|
case InstalledType.QMLWidget:
|
||||||
loader.source = Qt.resolvedUrl(Widget.projectSourceFileAbsolute);
|
loader.source = Qt.resolvedUrl(Widget.projectSourceFileAbsolute)
|
||||||
break;
|
break
|
||||||
case InstalledType.HTMLWidget:
|
case InstalledType.HTMLWidget:
|
||||||
loader.sourceComponent = webViewComponent;
|
loader.sourceComponent = webViewComponent
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
if (loader.status == Loader.Ready) {
|
if (loader.status == Loader.Ready) {
|
||||||
if (loader.item.widgetBackground !== undefined)
|
if (loader.item.widgetBackground !== undefined)
|
||||||
bgColor.color = loader.item.widgetBackground;
|
bgColor.color = loader.item.widgetBackground
|
||||||
|
|
||||||
if (loader.item.widgetBackgroundOpacity !== undefined)
|
if (loader.item.widgetBackgroundOpacity !== undefined)
|
||||||
bgColor.opacity = loader.item.widgetBackgroundOpacity;
|
bgColor.opacity = loader.item.widgetBackgroundOpacity
|
||||||
|
|
||||||
if (loader.item.widgetWidth !== undefined && loader.item.widgetHeight !== undefined)
|
|
||||||
Widget.setWidgetSize(loader.item.widgetWidth, loader.item.widgetHeight);
|
|
||||||
|
|
||||||
|
if (loader.item.widgetWidth !== undefined
|
||||||
|
&& loader.item.widgetHeight !== undefined)
|
||||||
|
Widget.setWidgetSize(loader.item.widgetWidth,
|
||||||
|
loader.item.widgetHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,10 +104,9 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onJavaScriptConsoleMessage: print(lineNumber, message)
|
onJavaScriptConsoleMessage: print(lineNumber, message)
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
webView.url = Qt.resolvedUrl(Widget.sourcePath);
|
webView.url = Qt.resolvedUrl(Widget.sourcePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@ -115,16 +116,16 @@ Item {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onPressed: (mouse)=>{
|
onPressed: function (mouse) {
|
||||||
clickPos = {
|
clickPos = {
|
||||||
"x": mouse.x,
|
"x": mouse.x,
|
||||||
"y": mouse.y
|
"y": mouse.y
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
if (mouseArea.pressed)
|
if (mouseArea.pressed)
|
||||||
Widget.setPos(Widget.cursorPos().x - clickPos.x, Widget.cursorPos().y - clickPos.y);
|
Widget.setPos(Widget.cursorPos().x - clickPos.x,
|
||||||
|
Widget.cursorPos().y - clickPos.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,9 +139,9 @@ Item {
|
|||||||
onEntered: imgClose.opacity = 1
|
onEntered: imgClose.opacity = 1
|
||||||
onExited: imgClose.opacity = 0.15
|
onExited: imgClose.opacity = 0.15
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(Qt.platform.os === "windows")
|
if (Qt.platform.os === "windows")
|
||||||
Widget.setWindowBlur(0);
|
Widget.setWindowBlur(0)
|
||||||
animFadeOut.start();
|
animFadeOut.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@ -159,9 +160,7 @@ Item {
|
|||||||
target: parent
|
target: parent
|
||||||
duration: 300
|
duration: 300
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@ -173,19 +172,17 @@ Item {
|
|||||||
height: width
|
height: width
|
||||||
cursorShape: Qt.SizeFDiagCursor
|
cursorShape: Qt.SizeFDiagCursor
|
||||||
onPressed: {
|
onPressed: {
|
||||||
clickPosition = Qt.point(mouseX, mouseY);
|
clickPosition = Qt.point(mouseX, mouseY)
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
if (mouseAreaResize.pressed)
|
if (mouseAreaResize.pressed)
|
||||||
Widget.setWidgetSize(clickPosition.x + mouseX, clickPosition.y + mouseY);
|
Widget.setWidgetSize(clickPosition.x + mouseX,
|
||||||
|
clickPosition.y + mouseY)
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user