From 2ea119fb316d52fae96bab26033fa6ee5b629f12 Mon Sep 17 00:00:00 2001
From: Filippo Scognamiglio <flscogna@gmail.com>
Date: Sun, 28 Oct 2018 01:08:21 +0200
Subject: [PATCH] Fix some alignment related warnings.

---
 app/qml/AboutDialog.qml            | 6 +++---
 app/qml/CheckableSlider.qml        | 5 ++---
 app/qml/InsertNameDialog.qml       | 3 +--
 app/qml/SettingsGeneralTab.qml     | 9 ++++-----
 app/qml/SettingsPerformanceTab.qml | 8 --------
 app/qml/SettingsTerminalTab.qml    | 6 +++---
 6 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/app/qml/AboutDialog.qml b/app/qml/AboutDialog.qml
index 3d85b28..79d4936 100644
--- a/app/qml/AboutDialog.qml
+++ b/app/qml/AboutDialog.qml
@@ -16,7 +16,7 @@ Window{
         anchors.margins: 15
         spacing: 15
         Text {
-            anchors.horizontalCenter: parent.horizontalCenter
+            Layout.alignment: Qt.AlignHCenter
             text: "cool-retro-term"
             font {bold: true; pointSize: 18}
         }
@@ -69,13 +69,13 @@ Window{
             Image{
                 Layout.fillWidth: true
                 Layout.fillHeight: true
-                anchors.horizontalCenter: parent.horizontalCenter
+                Layout.alignment: Qt.AlignHCenter
                 fillMode: Image.PreserveAspectFit
                 source: "images/crt256.png"
                 smooth: true
             }
             Text{
-                anchors.horizontalCenter: parent.horizontalCenter
+                Layout.alignment: Qt.AlignCenter
                 horizontalAlignment: Text.AlignHCenter
                 text: appSettings.version + "\n" +
                       qsTr("Author: ") + "Filippo Scognamiglio\n" +
diff --git a/app/qml/CheckableSlider.qml b/app/qml/CheckableSlider.qml
index 086eeb7..3548a9c 100644
--- a/app/qml/CheckableSlider.qml
+++ b/app/qml/CheckableSlider.qml
@@ -35,8 +35,7 @@ RowLayout {
     signal newValue(real newValue);
 
     id: setting_component
-    anchors.left: parent.left
-    anchors.right: parent.right
+    Layout.fillWidth: true
 
     onValueChanged: {
         check.checked = !(value == 0);
@@ -68,7 +67,7 @@ RowLayout {
         }
     }
     SizedLabel {
-        anchors { top: parent.top; bottom: parent.bottom }
+        Layout.fillHeight: true
         text: Math.round(((value - min_value) / (max_value - min_value)) * 100) + "%"
     }
 }
diff --git a/app/qml/InsertNameDialog.qml b/app/qml/InsertNameDialog.qml
index d617862..22d31f7 100644
--- a/app/qml/InsertNameDialog.qml
+++ b/app/qml/InsertNameDialog.qml
@@ -65,8 +65,7 @@ Window{
             }
         }
         RowLayout{
-            anchors.right: parent.right
-            anchors.bottom: parent.bottom
+            Layout.alignment: Qt.AlignBottom | Qt.AlignRight
             Button{
                 id: okbutton
                 text: qsTr("OK")
diff --git a/app/qml/SettingsGeneralTab.qml b/app/qml/SettingsGeneralTab.qml
index 5c10dd9..3df37f5 100644
--- a/app/qml/SettingsGeneralTab.qml
+++ b/app/qml/SettingsGeneralTab.qml
@@ -27,7 +27,6 @@ Tab{
     ColumnLayout{
         anchors.fill: parent
         GroupBox{
-            anchors {left: parent.left; right: parent.right}
             Layout.fillWidth: true
             Layout.fillHeight: true
             title: qsTr("Profile")
@@ -36,7 +35,7 @@ Tab{
                 TableView {
                     id: profilesView
                     Layout.fillWidth: true
-                    anchors { top: parent.top; bottom: parent.bottom; }
+                    Layout.fillHeight: true
                     model: appSettings.profilesList
                     headerVisible: false
                     TableViewColumn {
@@ -49,7 +48,7 @@ Tab{
                     }
                 }
                 ColumnLayout {
-                    anchors { top: parent.top; bottom: parent.bottom }
+                    Layout.fillHeight: true
                     Layout.fillWidth: false
                     Button{
                         Layout.fillWidth: true
@@ -161,7 +160,7 @@ Tab{
         }
 
         GroupBox{
-            anchors {left: parent.left; right: parent.right}
+            Layout.fillWidth: true
             title: qsTr("Command")
             ColumnLayout {
                 anchors.fill: parent
@@ -179,7 +178,7 @@ Tab{
                 }
                 TextField{
                     id: customCommand
-                    anchors {left: parent.left; right: parent.right}
+                    Layout.fillWidth: true
                     text: appSettings.customCommand
                     enabled: useCustomCommand.checked
                     onEditingFinished: appSettings.customCommand = text
diff --git a/app/qml/SettingsPerformanceTab.qml b/app/qml/SettingsPerformanceTab.qml
index de31d91..5dfd4c3 100644
--- a/app/qml/SettingsPerformanceTab.qml
+++ b/app/qml/SettingsPerformanceTab.qml
@@ -30,8 +30,6 @@ Tab{
         GroupBox{
             title: qsTr("General")
             Layout.fillWidth: true
-            anchors.left: parent.left
-            anchors.right: parent.right
             GridLayout{
                 anchors.fill: parent
                 rows: 2
@@ -74,8 +72,6 @@ Tab{
         GroupBox{
             title: qsTr("Bloom")
             Layout.fillWidth: true
-            anchors.left: parent.left
-            anchors.right: parent.right
             GridLayout{
                 id: bloomQualityContainer
                 anchors.fill: parent
@@ -98,8 +94,6 @@ Tab{
         GroupBox{
             title: qsTr("BurnIn")
             Layout.fillWidth: true
-            anchors.left: parent.left
-            anchors.right: parent.right
             GridLayout{
                 id: blurQualityContainer
                 anchors.fill: parent
@@ -123,8 +117,6 @@ Tab{
         GroupBox{
             title: qsTr("Frame")
             Layout.fillWidth: true
-            anchors.left: parent.left
-            anchors.right: parent.right
             CheckBox{
                 checked: appSettings._frameReflections
                 text: qsTr("Frame Reflections")
diff --git a/app/qml/SettingsTerminalTab.qml b/app/qml/SettingsTerminalTab.qml
index 32f458f..141f066 100644
--- a/app/qml/SettingsTerminalTab.qml
+++ b/app/qml/SettingsTerminalTab.qml
@@ -29,8 +29,8 @@ Tab{
         anchors.fill: parent
         GroupBox{
             property var rasterization: [qsTr("Default"), qsTr("Scanlines"), qsTr("Pixels")][appSettings.rasterization]
-            title: qsTr("Font" + "(" + rasterization + ")")
-            anchors { left: parent.left; right: parent.right }
+            title: qsTr("Font " + "(" + rasterization + ")")
+            Layout.fillWidth: true
             GridLayout{
                 anchors.fill: parent
                 columns: 2
@@ -103,7 +103,7 @@ Tab{
         }
         GroupBox{
             title: qsTr("Colors")
-            anchors { left: parent.left; right: parent.right }
+            Layout.fillWidth: true
             ColumnLayout{
                 anchors.fill: parent
                 ColumnLayout{