Improve QML syntax and update license headers.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013 "Filippo Scognamiglio"
|
||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||
* https://github.com/Swordfish90/cool-retro-term
|
||||
*
|
||||
* This file is part of cool-retro-term.
|
||||
@@ -17,7 +17,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
@@ -25,26 +24,26 @@ import QtQml 2.0
|
||||
|
||||
import "Components"
|
||||
|
||||
ColumnLayout{
|
||||
GroupBox{
|
||||
ColumnLayout {
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
title: qsTr("Command")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
CheckBox{
|
||||
CheckBox {
|
||||
id: useCustomCommand
|
||||
text: qsTr("Use custom command instead of shell at startup")
|
||||
checked: appSettings.useCustomCommand
|
||||
onCheckedChanged: appSettings.useCustomCommand = checked
|
||||
}
|
||||
// Workaround for QTBUG-31627 for pre 5.3.0
|
||||
Binding{
|
||||
Binding {
|
||||
target: useCustomCommand
|
||||
property: "checked"
|
||||
value: appSettings.useCustomCommand
|
||||
}
|
||||
TextField{
|
||||
TextField {
|
||||
id: customCommand
|
||||
Layout.fillWidth: true
|
||||
text: appSettings.customCommand
|
||||
@@ -53,89 +52,109 @@ ColumnLayout{
|
||||
|
||||
// Save text even if user forgets to press enter or unfocus
|
||||
function saveSetting() {
|
||||
appSettings.customCommand = text;
|
||||
appSettings.customCommand = text
|
||||
}
|
||||
Component.onCompleted: settings_window.closing.connect(saveSetting)
|
||||
Component.onCompleted: settings_window.closing.connect(
|
||||
saveSetting)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox{
|
||||
GroupBox {
|
||||
title: qsTr("Performance")
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
columns: 4
|
||||
|
||||
Label{text: qsTr("Effects FPS")}
|
||||
Slider{
|
||||
Label {
|
||||
text: qsTr("Effects FPS")
|
||||
}
|
||||
Slider {
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
id: fpsSlider
|
||||
onValueChanged: {
|
||||
if (enabled) {
|
||||
appSettings.fps = value !== 60 ? value + 1 : 0;
|
||||
appSettings.fps = value !== 60 ? value + 1 : 0
|
||||
}
|
||||
}
|
||||
stepSize: 1
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
from = 0;
|
||||
to = 60;
|
||||
value = appSettings.fps !== 0 ? appSettings.fps - 1 : 60;
|
||||
enabled = true;
|
||||
from = 0
|
||||
to = 60
|
||||
value = appSettings.fps !== 0 ? appSettings.fps - 1 : 60
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
Label{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
||||
Label{text: qsTr("Texture Quality")}
|
||||
Slider{
|
||||
Label {
|
||||
text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")
|
||||
}
|
||||
Label {
|
||||
text: qsTr("Texture Quality")
|
||||
}
|
||||
Slider {
|
||||
id: txtslider
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
onValueChanged: if (enabled) appSettings.windowScaling = value;
|
||||
onValueChanged: if (enabled)
|
||||
appSettings.windowScaling = value
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
from = 0.25 //Without this value gets set to 0.5
|
||||
value = appSettings.windowScaling;
|
||||
enabled = true;
|
||||
value = appSettings.windowScaling
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
Label{text: Math.round(txtslider.value * 100) + "%"}
|
||||
Label {
|
||||
text: Math.round(txtslider.value * 100) + "%"
|
||||
}
|
||||
|
||||
Label{text: qsTr("Bloom Quality")}
|
||||
Slider{
|
||||
Label {
|
||||
text: qsTr("Bloom Quality")
|
||||
}
|
||||
Slider {
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
id: bloomSlider
|
||||
onValueChanged: if (enabled) appSettings.bloomQuality = value;
|
||||
onValueChanged: if (enabled)
|
||||
appSettings.bloomQuality = value
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
from = 0.25
|
||||
value = appSettings.bloomQuality;
|
||||
enabled = true;
|
||||
value = appSettings.bloomQuality
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
Label{text: Math.round(bloomSlider.value * 100) + "%"}
|
||||
Label {
|
||||
text: Math.round(bloomSlider.value * 100) + "%"
|
||||
}
|
||||
|
||||
Label{text: qsTr("BurnIn Quality")}
|
||||
Slider{
|
||||
Label {
|
||||
text: qsTr("BurnIn Quality")
|
||||
}
|
||||
Slider {
|
||||
Layout.fillWidth: true
|
||||
id: burnInSlider
|
||||
Layout.columnSpan: 2
|
||||
onValueChanged: if (enabled) appSettings.burnInQuality = value;
|
||||
onValueChanged: if (enabled)
|
||||
appSettings.burnInQuality = value
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
from = 0.25
|
||||
value = appSettings.burnInQuality;
|
||||
enabled = true;
|
||||
value = appSettings.burnInQuality
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
Label{text: Math.round(burnInSlider.value * 100) + "%"}
|
||||
CheckBox{
|
||||
Label {
|
||||
text: Math.round(burnInSlider.value * 100) + "%"
|
||||
}
|
||||
CheckBox {
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Burnin optimization (Might display timing artifacts)")
|
||||
checked: appSettings.useFastBurnIn
|
||||
|
||||
Reference in New Issue
Block a user