From aa182e6efb57ea1d08b7cf4e7a94f5fd4bf56a96 Mon Sep 17 00:00:00 2001
From: Observer KRypt0n_ <suimin.tu.mu.ga.mi@gmail.com>
Date: Fri, 24 Feb 2023 13:31:10 +0200
Subject: [PATCH] style(ui): improved style of fullscreen first run window

Centered all the components for better styling
---
 src/ui/first_run/default_paths.rs       | 3 +++
 src/ui/first_run/dependencies.rs        | 5 +++--
 src/ui/first_run/download_components.rs | 4 +++-
 src/ui/first_run/tos_warning.rs         | 4 +++-
 src/ui/first_run/welcome.rs             | 6 ++++--
 5 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/ui/first_run/default_paths.rs b/src/ui/first_run/default_paths.rs
index 522b72b..44c25b4 100644
--- a/src/ui/first_run/default_paths.rs
+++ b/src/ui/first_run/default_paths.rs
@@ -53,6 +53,9 @@ impl SimpleAsyncComponent for DefaultPathsApp {
             set_hexpand: true,
 
             add = &adw::PreferencesGroup {
+                set_valign: gtk::Align::Center,
+                set_vexpand: true,
+
                 gtk::Label {
                     set_label: "Choose default paths",
                     add_css_class: "title-1"
diff --git a/src/ui/first_run/dependencies.rs b/src/ui/first_run/dependencies.rs
index cded1a1..d923437 100644
--- a/src/ui/first_run/dependencies.rs
+++ b/src/ui/first_run/dependencies.rs
@@ -32,10 +32,11 @@ impl SimpleAsyncComponent for DependenciesApp {
             set_hexpand: true,
 
             add = &adw::PreferencesGroup {
+                set_valign: gtk::Align::Center,
+                set_vexpand: true,
+
                 gtk::Label {
                     set_label: "You're missing some dependencies!",
-                    set_margin_top: 32,
-
                     add_css_class: "title-1"
                 },
 
diff --git a/src/ui/first_run/download_components.rs b/src/ui/first_run/download_components.rs
index dab83cb..e1af206 100644
--- a/src/ui/first_run/download_components.rs
+++ b/src/ui/first_run/download_components.rs
@@ -35,9 +35,11 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
             set_hexpand: true,
 
             add = &adw::PreferencesGroup {
+                set_valign: gtk::Align::Center,
+                set_vexpand: true,
+
                 gtk::Label {
                     set_label: "Download components",
-                    set_margin_top: 16,
                     add_css_class: "title-1"
                 }
             },
diff --git a/src/ui/first_run/tos_warning.rs b/src/ui/first_run/tos_warning.rs
index 4f7dab7..fc68321 100644
--- a/src/ui/first_run/tos_warning.rs
+++ b/src/ui/first_run/tos_warning.rs
@@ -26,9 +26,11 @@ impl SimpleAsyncComponent for TosWarningApp {
             set_hexpand: true,
 
             add = &adw::PreferencesGroup {
+                set_valign: gtk::Align::Center,
+                set_vexpand: true,
+
                 gtk::Label {
                     set_label: "ToS violation warning",
-                    set_margin_top: 8,
                     add_css_class: "title-1"
                 },
 
diff --git a/src/ui/first_run/welcome.rs b/src/ui/first_run/welcome.rs
index cc30236..5c66095 100644
--- a/src/ui/first_run/welcome.rs
+++ b/src/ui/first_run/welcome.rs
@@ -23,10 +23,12 @@ impl SimpleAsyncComponent for WelcomeApp {
             set_hexpand: true,
 
             add = &adw::PreferencesGroup {
+                set_valign: gtk::Align::Center,
+                set_vexpand: true,
+
                 gtk::Image {
                     set_resource: Some("/org/app/images/icon.png"),
-                    set_height_request: 128,
-                    set_margin_top: 16
+                    set_height_request: 128
                 },
 
                 gtk::Label {