1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-04-15 07:10:58 +01:00

Redesigned settings window. Much much better.

This commit is contained in:
Filippo Scognamiglio 2013-12-28 02:19:16 +01:00
parent 6e9b7bc824
commit c3d7b95fee

View File

@ -8,7 +8,7 @@ ApplicationWindow {
id: settings_window id: settings_window
title: qsTr("Settings") title: qsTr("Settings")
width: 640 width: 640
height: 480 height: 300
visible: true visible: true
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
@ -17,64 +17,97 @@ ApplicationWindow {
anchors.fill: parent anchors.fill: parent
Tab{ Tab{
title: qsTr("Settings") title: qsTr("Appearance")
anchors.fill: parent
anchors.margins: 20 anchors.margins: 20
anchors.top: parent.top
ColumnLayout{ GridLayout{
anchors.fill: parent anchors.fill: parent
RowLayout{ columns: 2
Label{ GroupBox{
text: "Font" Layout.columnSpan: 2
} Layout.fillWidth: true
title: qsTr("Profile")
ComboBox{ ComboBox{
width: 300 anchors.fill: parent
model: shadersettings.fonts_list
currentIndex: shadersettings.font_index
onCurrentIndexChanged: shadersettings.font_index = currentIndex
}
}
RowLayout{
Label{
text: "Frame texture"
}
ComboBox{
width: 300
model: shadersettings.frames_list
currentIndex: shadersettings.frames_index
onCurrentIndexChanged: shadersettings.frames_index = currentIndex
} }
} }
RowLayout{ GroupBox{
ColumnLayout{ id: fontbox
Text{text: qsTr("Font color")} title: qsTr("Font")
Layout.fillWidth: true
Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: qsTr("Font style:")}
ComboBox{
Layout.fillWidth: true
model: shadersettings.fonts_list
currentIndex: shadersettings.font_index
onCurrentIndexChanged: shadersettings.font_index = currentIndex
}
Text{text: qsTr("Font scaling:")}
ComboBox{
Layout.fillWidth: true
}
Item{Layout.fillHeight: true}
ColorButton{ ColorButton{
height: 200 height: 50
width: 200 Layout.fillWidth: true
Layout.columnSpan: 2
onButton_colorChanged: shadersettings.font_color = button_color; onButton_colorChanged: shadersettings.font_color = button_color;
Component.onCompleted: button_color = shadersettings.font_color; Component.onCompleted: button_color = shadersettings.font_color;
} }
} }
Item{ }
Layout.fillWidth: true GroupBox{
} title: qsTr("Background")
ColumnLayout{ Layout.fillWidth: true
Text{text: qsTr("Backgroud color")} Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: "Frame texture"}
ComboBox{
Layout.fillWidth: true
model: shadersettings.frames_list
currentIndex: shadersettings.frames_index
onCurrentIndexChanged: shadersettings.frames_index = currentIndex
}
Item{Layout.fillHeight: true}
ColorButton{ ColorButton{
height: 200 height: 50
width: 200 Layout.fillWidth: true
Layout.columnSpan: 2
onButton_colorChanged: shadersettings.background_color= button_color onButton_colorChanged: shadersettings.background_color= button_color
Component.onCompleted: button_color = shadersettings.background_color; Component.onCompleted: button_color = shadersettings.background_color;
} }
} }
} }
ColumnLayout{ }
anchors.left: parent.left }
anchors.right: parent.right
Tab{
title: qsTr("Eye-candy")
anchors.fill: parent
anchors.margins: 20
GroupBox{
title: qsTr("Effects")
anchors.fill: parent
ColumnLayout{
anchors.fill: parent
CheckBox{
text: "Scanlines"
checked: shadersettings.scanlines
onCheckedChanged: shadersettings.scanlines = checked;
}
SettingComponent{ SettingComponent{
name: "Noise" name: "Noise"
onValueChanged: shadersettings.noise_strength = value onValueChanged: shadersettings.noise_strength = value
@ -100,11 +133,6 @@ ApplicationWindow {
onValueChanged: shadersettings.screen_flickering = value; onValueChanged: shadersettings.screen_flickering = value;
Component.onCompleted: _value = shadersettings.screen_flickering; Component.onCompleted: _value = shadersettings.screen_flickering;
} }
CheckBox{
text: "Scanlines"
checked: shadersettings.scanlines
onCheckedChanged: shadersettings.scanlines = checked;
}
} }
} }
} }