From 9795b5d9d2116311895c69fa449b8c177df3c42a Mon Sep 17 00:00:00 2001
From: Filippo Scognamiglio <flscogna@gmail.com>
Date: Tue, 24 Jun 2014 11:34:33 +0200
Subject: [PATCH] Ooops... Forgot to add one file to git..

---
 app/SettingsTerminalTab.qml | 100 ++++++++++++++++++++++++++++++++++++
 app/ShaderSettings.qml      |  10 ++--
 app/app.qmlproject.user     |   2 +-
 3 files changed, 106 insertions(+), 6 deletions(-)
 create mode 100644 app/SettingsTerminalTab.qml

diff --git a/app/SettingsTerminalTab.qml b/app/SettingsTerminalTab.qml
new file mode 100644
index 0000000..1dbf86c
--- /dev/null
+++ b/app/SettingsTerminalTab.qml
@@ -0,0 +1,100 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+
+Tab{
+    ColumnLayout{
+        anchors.fill: parent
+        GroupBox{
+            title: qsTr("Rasterization Mode")
+            Layout.fillWidth: true
+            ComboBox {
+                id: rasterizationBox
+                anchors.fill: parent
+                model: [qsTr("Default"), qsTr("Scanlines"), qsTr("Pixels")]
+                currentIndex: shadersettings.rasterization
+                onCurrentIndexChanged: shadersettings.rasterization = currentIndex
+            }
+        }
+        GroupBox{
+            title: qsTr("Font")
+            Layout.fillWidth: true
+            GridLayout{
+                anchors.fill: parent
+                columns: 2
+                Text{ text: qsTr("Name") }
+                ComboBox{
+                    id: fontChanged
+                    Layout.fillWidth: true
+                    model: shadersettings.fontlist
+                    currentIndex: shadersettings.fontIndexes[shadersettings.rasterization]
+                    onCurrentIndexChanged: {
+                        shadersettings.fontIndexes[shadersettings.rasterization] = currentIndex;
+                        shadersettings.handleFontChanged();
+                    }
+                }
+                Text{ text: qsTr("Scaling") }
+                RowLayout{
+                    Layout.fillWidth: true
+                    Slider{
+                        id: scalingChanger
+                        Layout.fillWidth: true
+                        minimumValue: 0
+                        maximumValue: shadersettings.fontScalingList.length - 1
+                        stepSize: 1
+                        value: shadersettings.fontScalingIndexes[shadersettings.rasterization]
+                        onValueChanged: {
+                            shadersettings.fontScalingIndexes[shadersettings.rasterization] = value;
+                            console.log(shadersettings.fontScalingIndexes);
+                            shadersettings.handleFontChanged();
+                        }
+                    }
+                    Text{
+                        text: shadersettings.fontScalingList[scalingChanger.value].toFixed(2)
+                    }
+                }
+            }
+        }
+        GroupBox{
+            title: qsTr("Colors")
+            Layout.fillWidth: true
+            RowLayout{
+                anchors.fill: parent
+                ColorButton{
+                    name: qsTr("Font")
+                    height: 50
+                    Layout.fillWidth: true
+                    onButton_colorChanged: shadersettings._font_color = button_color
+                    button_color: shadersettings._font_color
+                }
+                ColorButton{
+                    name: qsTr("Background")
+                    height: 50
+                    Layout.fillWidth: true
+                    onButton_colorChanged: shadersettings._background_color = button_color
+                    button_color: shadersettings._background_color
+                }
+            }
+        }
+        GroupBox{
+            title: qsTr("Frame")
+            Layout.fillWidth: true
+            RowLayout{
+                anchors.fill: parent
+                ComboBox{
+                    id: framescombobox
+                    Layout.fillWidth: true
+                    model: shadersettings.frames_list
+                    currentIndex: shadersettings.frames_index
+                    onCurrentIndexChanged: shadersettings.frames_index = currentIndex
+                }
+                CheckBox{
+                    checked: shadersettings.frame_reflections
+                    text: qsTr("Reflections")
+                    onCheckedChanged: shadersettings.frame_reflections = checked
+                    enabled: framescombobox.model.get(framescombobox.currentIndex).reflections
+                }
+            }
+        }
+    }
+}
diff --git a/app/ShaderSettings.qml b/app/ShaderSettings.qml
index a9f0065..f8fca92 100644
--- a/app/ShaderSettings.qml
+++ b/app/ShaderSettings.qml
@@ -102,19 +102,19 @@ Item{
         property size paintedSize
         property size virtualCharSize
         id: currentfont
-        source: fontlist.get(fontIndex).source
     }
 
     property var fontlist: fontManager.item.fontlist
     property var fontScalingList: fontManager.item.fontScalingList
     property alias font: currentfont
-    property int fontIndex: 0
-    property int fontScalingIndex: 0
 
-    onFontIndexChanged: {fontManager.item.selectedFontIndex = fontIndex; handleFontChanged()}
-    onFontScalingIndexChanged: {fontManager.item.selectedScalingIndex = fontScalingIndex; handleFontChanged()}
+    property var fontIndexes: [0,1,1]
+    property var fontScalingIndexes: [5,1,1]
 
     function handleFontChanged(){
+        if(!fontManager.item) return;
+        fontManager.item.selectedFontIndex = fontIndexes[rasterization];
+        fontManager.item.selectedScalingIndex = fontScalingIndexes[rasterization];
         currentfont.source = fontManager.item.source;
         currentfont.pixelSize = fontManager.item.pixelSize;
         currentfont.lineSpacing = fontManager.item.lineSpacing;
diff --git a/app/app.qmlproject.user b/app/app.qmlproject.user
index 942e70e..d41435c 100644
--- a/app/app.qmlproject.user
+++ b/app/app.qmlproject.user
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.0.1, 2014-06-23T18:33:18. -->
+<!-- Written by QtCreator 3.0.1, 2014-06-24T10:46:32. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>