mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-23 11:13:00 +01:00
Fix #99
This commit is contained in:
parent
4f8a4a2681
commit
a37fab0692
@ -1,5 +1,6 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
@ -9,8 +10,12 @@ Item {
|
|||||||
property string description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
|
property string description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
|
||||||
property bool isChecked: false
|
property bool isChecked: false
|
||||||
property bool available: true
|
property bool available: true
|
||||||
|
|
||||||
|
height: txtHeadline.paintedHeight + txtDescription.paintedHeight + 20
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
onAvailableChanged: {
|
onAvailableChanged: {
|
||||||
if(!available){
|
if (!available) {
|
||||||
settingsBool.opacity = .5
|
settingsBool.opacity = .5
|
||||||
radioButton.enabled = false
|
radioButton.enabled = false
|
||||||
} else {
|
} else {
|
||||||
@ -20,9 +25,6 @@ Item {
|
|||||||
}
|
}
|
||||||
signal checkboxChanged(bool checked)
|
signal checkboxChanged(bool checked)
|
||||||
|
|
||||||
height: 50 +txtDescription.paintedHeight
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtHeadline
|
id: txtHeadline
|
||||||
color: Material.foreground
|
color: Material.foreground
|
||||||
@ -31,32 +33,35 @@ Item {
|
|||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
anchors{
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
top:parent.top
|
anchors {
|
||||||
|
top: parent.top
|
||||||
topMargin: 6
|
topMargin: 6
|
||||||
left:parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: txtDescription
|
id: txtDescription
|
||||||
text: settingsBool.description
|
text: settingsBool.description
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
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
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
|
|
||||||
anchors{
|
anchors {
|
||||||
top:txtHeadline.bottom
|
top: txtHeadline.bottom
|
||||||
topMargin: 6
|
topMargin: 6
|
||||||
left:parent.left
|
left: parent.left
|
||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
right:radioButton.left
|
right: radioButton.left
|
||||||
rightMargin: 20
|
rightMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,7 +76,7 @@ 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)
|
||||||
|
@ -45,356 +45,277 @@ Item {
|
|||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: columnWrapper
|
id: columnWrapper
|
||||||
anchors.margins: 20
|
width: parent.width - 40
|
||||||
width: 760
|
|
||||||
spacing: 30
|
spacing: 30
|
||||||
|
|
||||||
Item {
|
Page {
|
||||||
id: settingsGeneralWrapper
|
id: settingsGeneralWrapper
|
||||||
height: 620 + txtDirChangesInfo.paintedHeight
|
width: columnWrapper.width
|
||||||
width: parent.width
|
height: contentHeight + headerGeneral.height + columnGeneral.spacing * 3
|
||||||
|
Material.elevation: 4
|
||||||
|
|
||||||
RectangularGlow {
|
header: SettingsHeader {
|
||||||
id: effectBtnEmpty
|
id: headerGeneral
|
||||||
anchors {
|
text: qsTr("General")
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
cached: true
|
|
||||||
glowRadius: 3
|
|
||||||
spread: 0.2
|
|
||||||
color: "black"
|
|
||||||
opacity: 0.2
|
|
||||||
cornerRadius: 15
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
contentItem: Column {
|
||||||
anchors.fill: parent
|
id: columnGeneral
|
||||||
radius: 4
|
spacing: 20
|
||||||
clip: true
|
anchors {
|
||||||
color: Material.theme === Material.Light ? "white" : Material.background
|
top: headerGeneral.bottom
|
||||||
|
topMargin: 20
|
||||||
|
right: parent.right
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 20
|
||||||
|
rightMargin: 20
|
||||||
|
}
|
||||||
|
SettingBool {
|
||||||
|
headline: qsTr("Autostart")
|
||||||
|
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
||||||
|
isChecked: ScreenPlay.settings.autostart
|
||||||
|
onCheckboxChanged: {
|
||||||
|
ScreenPlay.settings.setAutostart(checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
SettingBool {
|
||||||
|
headline: qsTr("High priority Autostart")
|
||||||
|
available: false
|
||||||
|
|
||||||
SettingsHeader {
|
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
|
||||||
id: headerGeneral
|
isChecked: ScreenPlay.settings.highPriorityStart
|
||||||
text: qsTr("General")
|
onCheckboxChanged: {
|
||||||
|
ScreenPlay.settings.setHighPriorityStart(checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
SettingBool {
|
||||||
|
height: 70
|
||||||
|
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!")
|
||||||
|
isChecked: ScreenPlay.settings.anonymousTelemetry
|
||||||
|
onCheckboxChanged: {
|
||||||
|
ScreenPlay.settings.setAnonymousTelemetry(checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
|
||||||
|
SettingsButton {
|
||||||
|
headline: qsTr("Set save location")
|
||||||
|
description: {
|
||||||
|
// Remove file:/// so the used does not get confused
|
||||||
|
let path = ScreenPlay.globalVariables.localStoragePath + ""
|
||||||
|
if (path.length === 0) {
|
||||||
|
return qsTr("Your storage path is empty!")
|
||||||
|
} else {
|
||||||
|
return path.replace('file:///', '')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonText: qsTr("Set location")
|
||||||
|
onButtonPressed: {
|
||||||
|
folderDialogSaveLocation.open()
|
||||||
|
}
|
||||||
|
FolderDialog {
|
||||||
|
id: folderDialogSaveLocation
|
||||||
|
currentFolder: ScreenPlay.globalVariables.localStoragePath
|
||||||
|
onAccepted: {
|
||||||
|
ScreenPlay.settings.setLocalStoragePath(
|
||||||
|
folderDialogSaveLocation.currentFolder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: txtDirChangesInfo
|
||||||
|
text: qsTr("Important: Changing this directory has no effect on the workshop download path. ScreenPlay only supports having one content folder!")
|
||||||
|
color: Qt.darker(Material.foreground)
|
||||||
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
|
font.pointSize: 10
|
||||||
|
font.family: ScreenPlay.settings.font
|
||||||
|
height: 30
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
rightMargin: 10
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
SettingsHorizontalSeperator {}
|
||||||
spacing: 10
|
|
||||||
anchors {
|
|
||||||
top: headerGeneral.bottom
|
|
||||||
margins: 20
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
SettingBool {
|
|
||||||
headline: qsTr("Autostart")
|
|
||||||
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
|
||||||
isChecked: ScreenPlay.settings.autostart
|
|
||||||
onCheckboxChanged: {
|
|
||||||
ScreenPlay.settings.setAutostart(checked)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsHorizontalSeperator {}
|
|
||||||
SettingBool {
|
|
||||||
headline: qsTr("High priority Autostart")
|
|
||||||
available: false
|
|
||||||
|
|
||||||
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
|
SettingsComboBox {
|
||||||
isChecked: ScreenPlay.settings.highPriorityStart
|
id: settingsLanguage
|
||||||
onCheckboxChanged: {
|
headline: qsTr("Language")
|
||||||
ScreenPlay.settings.setHighPriorityStart(
|
description: qsTr("Set the ScreenPlay UI Language")
|
||||||
checked)
|
Component.onCompleted: {
|
||||||
}
|
settingsLanguage.comboBox.currentIndex = root.indexOfValue(
|
||||||
}
|
settingsLanguage.comboBox.model,
|
||||||
SettingsHorizontalSeperator {}
|
ScreenPlay.settings.language)
|
||||||
SettingBool {
|
|
||||||
height: 70
|
|
||||||
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!")
|
|
||||||
isChecked: ScreenPlay.settings.anonymousTelemetry
|
|
||||||
onCheckboxChanged: {
|
|
||||||
ScreenPlay.settings.setAnonymousTelemetry(
|
|
||||||
checked)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsHorizontalSeperator {}
|
|
||||||
|
|
||||||
SettingsButton {
|
|
||||||
headline: qsTr("Set save location")
|
|
||||||
description: {
|
|
||||||
// Remove file:/// so the used does not get confused
|
|
||||||
let path = ScreenPlay.globalVariables.localStoragePath + ""
|
|
||||||
if (path.length === 0) {
|
|
||||||
return qsTr("Your storage path is empty!")
|
|
||||||
} else {
|
|
||||||
return path.replace('file:///', '')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buttonText: qsTr("Set location")
|
|
||||||
onButtonPressed: {
|
|
||||||
folderDialogSaveLocation.open()
|
|
||||||
}
|
|
||||||
FolderDialog {
|
|
||||||
id: folderDialogSaveLocation
|
|
||||||
currentFolder: ScreenPlay.globalVariables.localStoragePath
|
|
||||||
onAccepted: {
|
|
||||||
ScreenPlay.settings.setLocalStoragePath(
|
|
||||||
folderDialogSaveLocation.currentFolder)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
comboBox {
|
||||||
id: txtDirChangesInfo
|
onActivated: {
|
||||||
text: qsTr("Important: Changing this directory has no effect on the workshop download path. ScreenPlay only supports having one content folder!")
|
ScreenPlay.settings.setLanguage(
|
||||||
color: Qt.darker(Material.foreground)
|
settingsLanguage.comboBox.currentValue)
|
||||||
height: 30
|
ScreenPlay.settings.retranslateUI()
|
||||||
width: parent.width
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
font.pointSize: 10
|
|
||||||
font.family: ScreenPlay.settings.font
|
|
||||||
anchors {
|
|
||||||
right: parent.right
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: 20
|
|
||||||
}
|
}
|
||||||
|
model: [{
|
||||||
|
"value": Settings.En,
|
||||||
|
"text": qsTr("English")
|
||||||
|
}, {
|
||||||
|
"value": Settings.De,
|
||||||
|
"text": qsTr("German")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Ru,
|
||||||
|
"text": qsTr("Russian")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Fr,
|
||||||
|
"text": qsTr("French")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Es,
|
||||||
|
"text": qsTr("Spanish")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Ko,
|
||||||
|
"text": qsTr("Korean")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Vi,
|
||||||
|
"text": qsTr("Vietnamese")
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
|
||||||
|
SettingsComboBox {
|
||||||
|
id: settingsTheme
|
||||||
|
headline: qsTr("Theme")
|
||||||
|
description: qsTr("Switch dark/light theme")
|
||||||
|
Component.onCompleted: {
|
||||||
|
settingsTheme.comboBox.currentIndex = root.indexOfValue(
|
||||||
|
settingsTheme.comboBox.model,
|
||||||
|
ScreenPlay.settings.theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsHorizontalSeperator {}
|
comboBox {
|
||||||
|
onActivated: {
|
||||||
SettingsComboBox {
|
ScreenPlay.settings.setTheme(
|
||||||
id: settingsLanguage
|
settingsTheme.comboBox.currentValue)
|
||||||
headline: qsTr("Language")
|
|
||||||
description: qsTr("Set the ScreenPlay UI Language")
|
|
||||||
Component.onCompleted: {
|
|
||||||
settingsLanguage.comboBox.currentIndex = root.indexOfValue(
|
|
||||||
settingsLanguage.comboBox.model,
|
|
||||||
ScreenPlay.settings.language)
|
|
||||||
}
|
|
||||||
|
|
||||||
comboBox {
|
|
||||||
onActivated: {
|
|
||||||
ScreenPlay.settings.setLanguage(
|
|
||||||
settingsLanguage.comboBox.currentValue)
|
|
||||||
ScreenPlay.settings.retranslateUI()
|
|
||||||
}
|
|
||||||
model: [{
|
|
||||||
"value": Settings.En,
|
|
||||||
"text": qsTr("English")
|
|
||||||
}, {
|
|
||||||
"value": Settings.De,
|
|
||||||
"text": qsTr("German")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Ru,
|
|
||||||
"text": qsTr("Russian")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Fr,
|
|
||||||
"text": qsTr("French")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Es,
|
|
||||||
"text": qsTr("Spanish")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Ko,
|
|
||||||
"text": qsTr("Korean")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Vi,
|
|
||||||
"text": qsTr("Vietnamese")
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsHorizontalSeperator {}
|
|
||||||
|
|
||||||
SettingsComboBox {
|
|
||||||
id: settingsTheme
|
|
||||||
headline: qsTr("Theme")
|
|
||||||
description: qsTr("Switch dark/light theme")
|
|
||||||
Component.onCompleted: {
|
|
||||||
settingsTheme.comboBox.currentIndex = root.indexOfValue(
|
|
||||||
settingsTheme.comboBox.model,
|
|
||||||
ScreenPlay.settings.theme)
|
|
||||||
}
|
|
||||||
|
|
||||||
comboBox {
|
|
||||||
onActivated: {
|
|
||||||
ScreenPlay.settings.setTheme(
|
|
||||||
settingsTheme.comboBox.currentValue)
|
|
||||||
}
|
|
||||||
model: [{
|
|
||||||
"value": Settings.System,
|
|
||||||
"text": qsTr("System Default")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Dark,
|
|
||||||
"text": qsTr("Dark")
|
|
||||||
}, {
|
|
||||||
"value": Settings.Light,
|
|
||||||
"text": qsTr("Light")
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
|
model: [{
|
||||||
|
"value": Settings.System,
|
||||||
|
"text": qsTr("System Default")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Dark,
|
||||||
|
"text": qsTr("Dark")
|
||||||
|
}, {
|
||||||
|
"value": Settings.Light,
|
||||||
|
"text": qsTr("Light")
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Page {
|
||||||
id: settingsPerformanceWrapper
|
width: columnWrapper.width
|
||||||
height: perfomanceWrapper.childrenRect.height + headerPerformance.height + 48
|
height: contentHeight + headerGeneral.height + columnGeneral.spacing * 3
|
||||||
width: parent.width
|
Material.elevation: 4
|
||||||
|
|
||||||
RectangularGlow {
|
header: SettingsHeader {
|
||||||
id: effect2
|
id: headerPerformance
|
||||||
anchors {
|
text: qsTr("Performance")
|
||||||
top: parent.top
|
image: "qrc:/assets/icons/icon_build.svg"
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
cached: true
|
|
||||||
glowRadius: 3
|
|
||||||
spread: 0.2
|
|
||||||
color: "black"
|
|
||||||
opacity: 0.2
|
|
||||||
cornerRadius: 15
|
|
||||||
}
|
}
|
||||||
|
contentItem: Column {
|
||||||
Rectangle {
|
id: perfomanceWrapper
|
||||||
anchors.fill: parent
|
spacing: 20
|
||||||
color: Material.theme === Material.Light ? "white" : Material.background
|
anchors {
|
||||||
radius: 4
|
top: headerPerformance.bottom
|
||||||
clip: true
|
topMargin: 20
|
||||||
|
right: parent.right
|
||||||
SettingsHeader {
|
left: parent.left
|
||||||
id: headerPerformance
|
leftMargin: 20
|
||||||
text: qsTr("Performance")
|
rightMargin: 20
|
||||||
image: "qrc:/assets/icons/icon_build.svg"
|
}
|
||||||
anchors {
|
SettingBool {
|
||||||
top: parent.top
|
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
|
||||||
left: parent.left
|
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!")
|
||||||
right: parent.right
|
isChecked: ScreenPlay.settings.checkWallpaperVisible
|
||||||
|
onCheckboxChanged: {
|
||||||
|
ScreenPlay.settings.setCheckWallpaperVisible(
|
||||||
|
checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
Column {
|
SettingsComboBox {
|
||||||
id: perfomanceWrapper
|
id: cbVideoFillMode
|
||||||
anchors {
|
headline: qsTr("Default Fill Mode")
|
||||||
top: headerPerformance.bottom
|
description: qsTr("Set this property to define how the video is scaled to fit the target area.")
|
||||||
margins: 20
|
Component.onCompleted: {
|
||||||
right: parent.right
|
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(
|
||||||
bottom: parent.bottom
|
cbVideoFillMode.comboBox.model,
|
||||||
left: parent.left
|
ScreenPlay.settings.videoFillMode)
|
||||||
}
|
}
|
||||||
spacing: 10
|
comboBox {
|
||||||
|
onActivated: ScreenPlay.settings.setVideoFillMode(
|
||||||
|
cbVideoFillMode.comboBox.currentValue)
|
||||||
|
|
||||||
SettingBool {
|
model: [{
|
||||||
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
|
"value": FillMode.Stretch,
|
||||||
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!")
|
"text": qsTr("Stretch")
|
||||||
isChecked: ScreenPlay.settings.checkWallpaperVisible
|
}, {
|
||||||
onCheckboxChanged: {
|
"value": FillMode.Fill,
|
||||||
ScreenPlay.settings.setCheckWallpaperVisible(
|
"text": qsTr("Fill")
|
||||||
checked)
|
}, {
|
||||||
}
|
"value": FillMode.Contain,
|
||||||
}
|
"text": qsTr("Contain")
|
||||||
SettingsHorizontalSeperator {}
|
}, {
|
||||||
SettingsComboBox {
|
"value": FillMode.Cover,
|
||||||
id: cbVideoFillMode
|
"text": qsTr("Cover")
|
||||||
headline: qsTr("Default Fill Mode")
|
}, {
|
||||||
description: qsTr("Set this property to define how the video is scaled to fit the target area.")
|
"value": FillMode.Scale_Down,
|
||||||
Component.onCompleted: {
|
"text": qsTr("Scale-Down")
|
||||||
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(
|
}]
|
||||||
cbVideoFillMode.comboBox.model,
|
|
||||||
ScreenPlay.settings.videoFillMode)
|
|
||||||
}
|
|
||||||
comboBox {
|
|
||||||
onActivated: ScreenPlay.settings.setVideoFillMode(
|
|
||||||
cbVideoFillMode.comboBox.currentValue)
|
|
||||||
|
|
||||||
model: [{
|
|
||||||
"value": FillMode.Stretch,
|
|
||||||
"text": qsTr("Stretch")
|
|
||||||
}, {
|
|
||||||
"value": FillMode.Fill,
|
|
||||||
"text": qsTr("Fill")
|
|
||||||
}, {
|
|
||||||
"value": FillMode.Contain,
|
|
||||||
"text": qsTr("Contain")
|
|
||||||
}, {
|
|
||||||
"value": FillMode.Cover,
|
|
||||||
"text": qsTr("Cover")
|
|
||||||
}, {
|
|
||||||
"value": FillMode.Scale_Down,
|
|
||||||
"text": qsTr("Scale-Down")
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Page {
|
||||||
id: settingsAboutrapper
|
width: columnWrapper.width
|
||||||
height: settingsAboutrapperWrapper.childrenRect.height + 100
|
height: contentHeight + headerAbout.height + aboutWrapper.spacing * 3
|
||||||
width: parent.width
|
Material.elevation: 4
|
||||||
|
|
||||||
RectangularGlow {
|
header: SettingsHeader {
|
||||||
id: effect3
|
id: headerAbout
|
||||||
anchors {
|
text: qsTr("About")
|
||||||
top: parent.top
|
image: "qrc:/assets/icons/icon_cake.svg"
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
cached: true
|
|
||||||
glowRadius: 3
|
|
||||||
spread: 0.2
|
|
||||||
color: "black"
|
|
||||||
opacity: 0.2
|
|
||||||
cornerRadius: 15
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
contentItem: Column {
|
||||||
color: Material.theme === Material.Light ? "white" : Material.background
|
id: aboutWrapper
|
||||||
anchors.fill: parent
|
spacing: 20
|
||||||
radius: 4
|
anchors {
|
||||||
clip: true
|
top: headerAbout.bottom
|
||||||
|
topMargin: 20
|
||||||
SettingsHeader {
|
right: parent.right
|
||||||
id: headerAbout
|
left: parent.left
|
||||||
text: qsTr("About")
|
leftMargin: 20
|
||||||
image: "qrc:/assets/icons/icon_cake.svg"
|
rightMargin: 20
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: settingsAboutrapperWrapper
|
id: settingsAboutrapperWrapper
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors {
|
|
||||||
top: headerAbout.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
margins: 20
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 180
|
height: txtHeadline.paintedHeight + txtDescriptionAbout.paintedHeight
|
||||||
|
+ wrapperLinks.childrenRect.height + 80
|
||||||
Text {
|
Text {
|
||||||
id: txtHeadline
|
id: txtHeadline
|
||||||
color: Material.foreground
|
color: Material.foreground
|
||||||
@ -429,11 +350,11 @@ Item {
|
|||||||
leftMargin: 20
|
leftMargin: 20
|
||||||
right: imgLogoHead.left
|
right: imgLogoHead.left
|
||||||
rightMargin: 60
|
rightMargin: 60
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: wrapperLinks
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
margins: 20
|
margins: 20
|
||||||
@ -496,81 +417,70 @@ Item {
|
|||||||
smooth: true
|
smooth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SettingsHorizontalSeperator {}
|
}
|
||||||
|
|
||||||
SettingsButton {
|
SettingsHorizontalSeperator {}
|
||||||
icon.source: "qrc:/assets/icons/icon_launch.svg"
|
|
||||||
headline: qsTr("Version")
|
|
||||||
description: qsTr("ScreenPlay Build Version ")
|
|
||||||
+ ScreenPlay.settings.gitBuildHash
|
|
||||||
buttonText: qsTr("Open Changelog")
|
|
||||||
onButtonPressed: Qt.openUrlExternally(
|
|
||||||
"https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsHorizontalSeperator {}
|
SettingsButton {
|
||||||
SettingsButton {
|
icon.source: "qrc:/assets/icons/icon_launch.svg"
|
||||||
headline: qsTr("Third Party Software")
|
headline: qsTr("Version")
|
||||||
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
description: qsTr("ScreenPlay Build Version ")
|
||||||
buttonText: qsTr("Licenses")
|
+ ScreenPlay.settings.gitBuildHash
|
||||||
onButtonPressed: {
|
buttonText: qsTr("Open Changelog")
|
||||||
ScreenPlay.util.requestAllLicenses()
|
onButtonPressed: Qt.openUrlExternally(
|
||||||
expanderCopyright.toggle()
|
"https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
SettingsExpander {
|
|
||||||
id: expanderCopyright
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
SettingsHorizontalSeperator {}
|
||||||
target: ScreenPlay.util
|
SettingsButton {
|
||||||
function onAllLicenseLoaded(licensesText) {
|
headline: qsTr("Third Party Software")
|
||||||
expanderCopyright.text = licensesText
|
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
||||||
}
|
buttonText: qsTr("Licenses")
|
||||||
}
|
onButtonPressed: {
|
||||||
|
ScreenPlay.util.requestAllLicenses()
|
||||||
|
expanderCopyright.toggle()
|
||||||
}
|
}
|
||||||
SettingsHorizontalSeperator {}
|
}
|
||||||
SettingsButton {
|
SettingsExpander {
|
||||||
headline: qsTr("Debug Messages")
|
id: expanderCopyright
|
||||||
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("Debug Messages")
|
|
||||||
onButtonPressed: {
|
|
||||||
expanderDebug.toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsExpander {
|
|
||||||
id: expanderDebug
|
|
||||||
text: ScreenPlay.util.debugMessages
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsHorizontalSeperator {}
|
|
||||||
SettingsButton {
|
|
||||||
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!")
|
|
||||||
buttonText: qsTr("Privacy")
|
|
||||||
onButtonPressed: {
|
|
||||||
ScreenPlay.util.requestDataProtection()
|
|
||||||
expanderDataProtection.toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SettingsExpander {
|
|
||||||
id: expanderDataProtection
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ScreenPlay.util
|
target: ScreenPlay.util
|
||||||
function onAllDataProtectionLoaded(dataProtectionText) {
|
function onAllLicenseLoaded(licensesText) {
|
||||||
expanderDataProtection.text = dataProtectionText
|
expanderCopyright.text = licensesText
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
SettingsButton {
|
||||||
|
headline: qsTr("Debug Messages")
|
||||||
|
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("Debug Messages")
|
||||||
|
onButtonPressed: {
|
||||||
|
expanderDebug.toggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsExpander {
|
||||||
|
id: expanderDebug
|
||||||
|
text: ScreenPlay.util.debugMessages
|
||||||
|
}
|
||||||
|
SettingsHorizontalSeperator {}
|
||||||
|
SettingsButton {
|
||||||
|
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!")
|
||||||
|
buttonText: qsTr("Privacy")
|
||||||
|
onButtonPressed: {
|
||||||
|
ScreenPlay.util.requestDataProtection()
|
||||||
|
expanderDataProtection.toggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SettingsExpander {
|
||||||
|
id: expanderDataProtection
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: ScreenPlay.util
|
||||||
|
function onAllDataProtectionLoaded(dataProtectionText) {
|
||||||
|
expanderDataProtection.text = dataProtectionText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,7 +492,7 @@ Item {
|
|||||||
|
|
||||||
/*##^##
|
/*##^##
|
||||||
Designer {
|
Designer {
|
||||||
D{i:0;autoSize:true;height:480;width:640}
|
D{i:0;autoSize:true;height:2000;width:1000}
|
||||||
}
|
}
|
||||||
##^##*/
|
##^##*/
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
@ -13,6 +14,9 @@ Item {
|
|||||||
property bool isChecked: false
|
property bool isChecked: false
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property bool available: true
|
property bool available: true
|
||||||
|
|
||||||
|
height: txtHeadline.paintedHeight + txtDescription.paintedHeight + 20
|
||||||
|
width: parent.width
|
||||||
onAvailableChanged: {
|
onAvailableChanged: {
|
||||||
if (!available) {
|
if (!available) {
|
||||||
settingsButton.opacity = .5
|
settingsButton.opacity = .5
|
||||||
@ -25,9 +29,6 @@ Item {
|
|||||||
|
|
||||||
signal buttonPressed
|
signal buttonPressed
|
||||||
|
|
||||||
height: 20 + txtHeadline.paintedHeight + txtDescription.paintedHeight
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtHeadline
|
id: txtHeadline
|
||||||
color: Material.foreground
|
color: Material.foreground
|
||||||
@ -48,7 +49,9 @@ Item {
|
|||||||
Text {
|
Text {
|
||||||
id: txtDescription
|
id: txtDescription
|
||||||
text: settingsButton.description
|
text: settingsButton.description
|
||||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
color: Material.theme === Material.Light ? Qt.lighter(
|
||||||
|
Material.foreground) : Qt.darker(
|
||||||
|
Material.foreground)
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
Item {
|
Control {
|
||||||
id: settingsComboBox
|
id: settingsComboBox
|
||||||
property string headline: "Headline"
|
property string headline: "Headline"
|
||||||
property string description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
|
property string description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property alias comboBox: comboBox
|
property alias comboBox: comboBox
|
||||||
|
|
||||||
height: 20 + txtDescription.paintedHeight + txtHeadline.paintedHeight
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: txtHeadline.paintedHeight + txtDescription.paintedHeight +20
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtHeadline
|
id: txtHeadline
|
||||||
color: Material.foreground
|
color: Material.foreground
|
||||||
text: settingsComboBox.headline
|
text: settingsComboBox.headline
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
@ -9,6 +9,8 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
state: "off"
|
state: "off"
|
||||||
clip: true
|
clip: true
|
||||||
|
width: parent.width
|
||||||
|
implicitHeight: 50
|
||||||
|
|
||||||
property alias text: txtExpander.text
|
property alias text: txtExpander.text
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
|
import QtQuick.Layouts 1.12
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import ScreenPlay 1.0
|
import ScreenPlay 1.0
|
||||||
|
|
||||||
@ -9,8 +10,8 @@ Item {
|
|||||||
property color background: "#FFAB00"
|
property color background: "#FFAB00"
|
||||||
property string text: "HEADLINE"
|
property string text: "HEADLINE"
|
||||||
property url image: "qrc:/assets/icons/icon_settings.svg"
|
property url image: "qrc:/assets/icons/icon_settings.svg"
|
||||||
height: 50
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: 70
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: radiusWorkaround
|
id: radiusWorkaround
|
||||||
@ -82,13 +83,13 @@ Item {
|
|||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: imgIcon
|
target: imgIcon
|
||||||
anchors.leftMargin: -50
|
anchors.leftMargin: -10
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: txtHeadline
|
target: txtHeadline
|
||||||
anchors.topMargin: 50
|
anchors.topMargin: 10
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user