1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2024-10-06 11:00:49 +01:00
cool-retro-term/qml/cool-old-term/SettingsWindow.qml

84 lines
2.9 KiB
QML
Raw Normal View History

2013-11-25 18:05:31 +00:00
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.1
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.1
2013-11-25 18:05:31 +00:00
ApplicationWindow {
id: settings_window
2013-11-25 18:05:31 +00:00
title: qsTr("Settings")
width: 640
height: 480
visible: true
modality: Qt.ApplicationModal
TabView{
anchors.fill: parent
Tab{
title: qsTr("Settings")
anchors.fill: parent
anchors.margins: 20
2013-11-25 18:05:31 +00:00
ColumnLayout{
anchors.fill: parent
GridLayout{
width: parent.width
columns: 2
Text{text: "Font color"}
Text{
text: " ";
Rectangle{
anchors.fill: parent;
color: shadersettings.font_color
}
MouseArea{
anchors.fill: parent;
onClicked: {
var component = Qt.createComponent("MyColorDialog.qml");
component.createObject(settings_window, {"color_to_change": "font_color"});
}
}
2013-11-25 18:05:31 +00:00
}
Text{text: "Backgroud color"}
Text{text: " ";
Rectangle{
anchors.fill: parent;
color: shadersettings.background_color
}
MouseArea{
anchors.fill: parent
onClicked: {
var component = Qt.createComponent("MyColorDialog.qml");
component.createObject(settings_window, {"color_to_change": "background_color"});
}
}
}
2013-11-25 18:05:31 +00:00
}
2013-12-22 22:08:16 +00:00
ColumnLayout{
anchors.left: parent.left
anchors.right: parent.right
2013-11-25 18:05:31 +00:00
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Noise"
onValueChanged: shadersettings.noise_strength = value
Component.onCompleted: value = shadersettings.noise_strength
2013-11-25 18:05:31 +00:00
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Glow"
2013-11-25 18:05:31 +00:00
onValueChanged: shadersettings.glowing_line_strength = value;
2013-12-22 22:08:16 +00:00
Component.onCompleted: value = shadersettings.glowing_line_strength
2013-11-25 18:05:31 +00:00
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Ambient light"
2013-11-25 18:05:31 +00:00
onValueChanged: shadersettings.ambient_light = value;
2013-12-22 22:08:16 +00:00
Component.onCompleted: value = shadersettings.ambient_light
2013-11-25 18:05:31 +00:00
}
}
}
}
}
}