mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-18 12:15:27 +00:00
Improve settings layout.
This commit is contained in:
parent
0d3c0a2233
commit
767a61b86e
@ -27,13 +27,48 @@ import "Components"
|
||||
Tab{
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
|
||||
GroupBox{
|
||||
title: qsTr("General")
|
||||
Layout.fillWidth: true
|
||||
title: qsTr("Command")
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
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{
|
||||
target: useCustomCommand
|
||||
property: "checked"
|
||||
value: appSettings.useCustomCommand
|
||||
}
|
||||
TextField{
|
||||
id: customCommand
|
||||
Layout.fillWidth: true
|
||||
text: appSettings.customCommand
|
||||
enabled: useCustomCommand.checked
|
||||
onEditingFinished: appSettings.customCommand = text
|
||||
|
||||
// Save text even if user forgets to press enter or unfocus
|
||||
function saveSetting() {
|
||||
appSettings.customCommand = text;
|
||||
}
|
||||
Component.onCompleted: settings_window.closing.connect(saveSetting)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox{
|
||||
title: qsTr("Performance")
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
anchors.fill: parent
|
||||
rows: 2
|
||||
columns: 3
|
||||
|
||||
Label{text: qsTr("Effects FPS")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
@ -52,6 +87,7 @@ Tab{
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
SizedLabel{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
||||
Label{text: qsTr("Texture Quality")}
|
||||
Slider{
|
||||
@ -67,14 +103,7 @@ Tab{
|
||||
}
|
||||
}
|
||||
SizedLabel{text: Math.round(txtslider.value * 100) + "%"}
|
||||
}
|
||||
}
|
||||
GroupBox{
|
||||
title: qsTr("Bloom")
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
id: bloomQualityContainer
|
||||
anchors.fill: parent
|
||||
|
||||
Label{text: qsTr("Bloom Quality")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
@ -89,14 +118,6 @@ Tab{
|
||||
}
|
||||
}
|
||||
SizedLabel{text: Math.round(bloomSlider.value * 100) + "%"}
|
||||
}
|
||||
}
|
||||
GroupBox{
|
||||
title: qsTr("BurnIn")
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
id: blurQualityContainer
|
||||
anchors.fill: parent
|
||||
|
||||
Label{text: qsTr("BurnIn Quality")}
|
||||
Slider{
|
@ -87,34 +87,5 @@ Tab{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox{
|
||||
title: qsTr("Lights")
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
Label{ text: qsTr("Brightness") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.brightness = value
|
||||
value: appSettings.brightness
|
||||
}
|
||||
Label{ text: qsTr("Contrast") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.contrast = value
|
||||
value: appSettings.contrast
|
||||
}
|
||||
Label{ text: qsTr("Opacity") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.windowOpacity = value
|
||||
value: appSettings.windowOpacity
|
||||
}
|
||||
Label{ text: qsTr("Margin") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings._margin = value
|
||||
value: appSettings._margin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ Tab{
|
||||
Layout.fillWidth: false
|
||||
Button{
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("New")
|
||||
text: qsTr("Save")
|
||||
onClicked: {
|
||||
insertname.profileName = "";
|
||||
insertname.show()
|
||||
@ -164,34 +164,30 @@ Tab{
|
||||
}
|
||||
|
||||
GroupBox{
|
||||
title: qsTr("Screen")
|
||||
Layout.fillWidth: true
|
||||
title: qsTr("Command")
|
||||
ColumnLayout {
|
||||
GridLayout{
|
||||
anchors.fill: parent
|
||||
CheckBox{
|
||||
id: useCustomCommand
|
||||
text: qsTr("Use custom command instead of shell at startup")
|
||||
checked: appSettings.useCustomCommand
|
||||
onCheckedChanged: appSettings.useCustomCommand = checked
|
||||
columns: 2
|
||||
Label{ text: qsTr("Brightness") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.brightness = value
|
||||
value: appSettings.brightness
|
||||
}
|
||||
// Workaround for QTBUG-31627 for pre 5.3.0
|
||||
Binding{
|
||||
target: useCustomCommand
|
||||
property: "checked"
|
||||
value: appSettings.useCustomCommand
|
||||
Label{ text: qsTr("Contrast") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.contrast = value
|
||||
value: appSettings.contrast
|
||||
}
|
||||
TextField{
|
||||
id: customCommand
|
||||
Layout.fillWidth: true
|
||||
text: appSettings.customCommand
|
||||
enabled: useCustomCommand.checked
|
||||
onEditingFinished: appSettings.customCommand = text
|
||||
|
||||
// Save text even if user forgets to press enter or unfocus
|
||||
function saveSetting() {
|
||||
appSettings.customCommand = text;
|
||||
}
|
||||
Component.onCompleted: settings_window.closing.connect(saveSetting)
|
||||
Label{ text: qsTr("Margin") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings._margin = value
|
||||
value: appSettings._margin
|
||||
}
|
||||
Label{ text: qsTr("Opacity") }
|
||||
SimpleSlider{
|
||||
onValueChanged: appSettings.windowOpacity = value
|
||||
value: appSettings.windowOpacity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Window {
|
||||
id: settings_window
|
||||
title: qsTr("Settings")
|
||||
width: 580
|
||||
height: 500
|
||||
height: 400
|
||||
|
||||
property int tabmargins: 15
|
||||
|
||||
@ -36,27 +36,27 @@ Window {
|
||||
id: tabView
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
SettingsGeneralTab{
|
||||
SettingsGeneralTab {
|
||||
id: generalTab
|
||||
title: qsTr("General")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
}
|
||||
SettingsTerminalTab{
|
||||
SettingsTerminalTab {
|
||||
id: terminalTab
|
||||
title: qsTr("Terminal")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
}
|
||||
SettingsEffectsTab{
|
||||
SettingsEffectsTab {
|
||||
id: effectsTab
|
||||
title: qsTr("Effects")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
}
|
||||
SettingsPerformanceTab{
|
||||
SettingsAdvancedTab {
|
||||
id: performanceTab
|
||||
title: qsTr("Performance")
|
||||
title: qsTr("Advanced")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
<file>fonts/1971-ibm-3278/3270Medium.ttf</file>
|
||||
<file>Storage.qml</file>
|
||||
<file>CRTMainMenuBar.qml</file>
|
||||
<file>SettingsPerformanceTab.qml</file>
|
||||
<file>SettingsAdvancedTab.qml</file>
|
||||
<file>TerminalContainer.qml</file>
|
||||
<file>images/crt256.png</file>
|
||||
<file>utils.js</file>
|
||||
|
Loading…
x
Reference in New Issue
Block a user