From 65ecef155d69813f361eb016a3a1717b462b9420 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sat, 26 Oct 2024 22:41:45 +0300 Subject: [PATCH] Refine UI --- .github/release-nest-v3 | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- debian/changelog | 6 ++++++ main.sh | 2 +- src/drive_mount_row/imp.rs | 2 +- src/installation_progress_page/mod.rs | 20 ++++++++++++++++++++ src/installation_summary_page/mod.rs | 5 +++-- src/keyboard_page/mod.rs | 1 - src/manual_partitioning_page/mod.rs | 5 +++-- 10 files changed, 37 insertions(+), 10 deletions(-) diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index c793025..301160a 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -7 \ No newline at end of file +8 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 7d2d34b..24cebc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1323,7 +1323,7 @@ dependencies = [ [[package]] name = "pika-installer-gtk4" -version = "2.0.0" +version = "2.0.1" dependencies = [ "async-channel", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 7ae7442..bfe792c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pika-installer-gtk4" -version = "2.0.0" +version = "2.0.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/debian/changelog b/debian/changelog index 72567a6..76884e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pika-installer-gtk4 (2.0.1-101pika1) pika; urgency=low + + * Refine UI + + -- Ward Nakchbandi Thu, 20 Sep 2022 22:01:00 +0000 + pika-installer-gtk4 (2.0.0-101pika7) pika; urgency=low * Fix partition selection diff --git a/main.sh b/main.sh index 5823ba4..9eacb22 100755 --- a/main.sh +++ b/main.sh @@ -2,7 +2,7 @@ set -e -VERSION="2.0.0" +VERSION="2.0.1" source ./pika-build-config.sh diff --git a/src/drive_mount_row/imp.rs b/src/drive_mount_row/imp.rs index fc28cee..1427f15 100644 --- a/src/drive_mount_row/imp.rs +++ b/src/drive_mount_row/imp.rs @@ -228,7 +228,7 @@ impl ObjectImpl for DriveMountRow { partition_button_row_dialog.add_response( "devices_selection_button_row_dialog_ok", - "devices_selection_button_row_dialog_ok_label", + &t!("devices_selection_button_row_dialog_ok_label"), ); partition_button.connect_clicked(clone!( diff --git a/src/installation_progress_page/mod.rs b/src/installation_progress_page/mod.rs index dfc809a..60a1ec7 100644 --- a/src/installation_progress_page/mod.rs +++ b/src/installation_progress_page/mod.rs @@ -63,6 +63,26 @@ pub fn installation_progress_page( .margin_end(5) .build(); + { + let settings = gtk::Settings::default().unwrap(); + if settings.is_gtk_application_prefer_dark_theme() { + placeholder_icon.set_icon_name(Some("pika-logo-text-dark")); + } else { + placeholder_icon.set_icon_name(Some("pika-logo-text")); + }; + settings.connect_gtk_application_prefer_dark_theme_notify(clone!( + #[weak] + placeholder_icon, + move |settings| { + if settings.is_gtk_application_prefer_dark_theme() { + placeholder_icon.set_icon_name(Some("pika-logo-text-dark")); + } else { + placeholder_icon.set_icon_name(Some("pika-logo-text")); + }; + } + )); + } + let progress_bar_box = gtk::Box::builder() .orientation(gtk::Orientation::Horizontal) .margin_start(10) diff --git a/src/installation_summary_page/mod.rs b/src/installation_summary_page/mod.rs index 3da2bc2..874fbd8 100644 --- a/src/installation_summary_page/mod.rs +++ b/src/installation_summary_page/mod.rs @@ -99,16 +99,17 @@ pub fn installation_summary_page( .selection_mode(gtk::SelectionMode::None) .build(); installation_summary_row_viewport_listbox.add_css_class("boxed-list"); - installation_summary_row_viewport_listbox.add_css_class("round-all-scroll"); + installation_summary_row_viewport_listbox.add_css_class("no-round-borders"); let installation_summary_row_viewport = gtk::ScrolledWindow::builder() .vexpand(true) .hexpand(true) .has_frame(true) + .overflow(gtk::Overflow::Hidden) .child(&installation_summary_row_viewport_listbox) .build(); - installation_summary_row_viewport.add_css_class("round-all-scroll"); + installation_summary_row_viewport.add_css_class("round-all-scroll-no-padding"); let install_confirm_button = gtk::Button::builder() .margin_top(15) diff --git a/src/keyboard_page/mod.rs b/src/keyboard_page/mod.rs index 3e4fae6..3b450eb 100644 --- a/src/keyboard_page/mod.rs +++ b/src/keyboard_page/mod.rs @@ -54,7 +54,6 @@ pub fn keyboard_page( keyboard_search_bar.add_css_class("rounded-all-25"); let keyboard_test_entry_boxed_list = gtk::ListBox::builder() - .margin_top(5) .margin_bottom(5) .build(); diff --git a/src/manual_partitioning_page/mod.rs b/src/manual_partitioning_page/mod.rs index 473e6db..70b4602 100644 --- a/src/manual_partitioning_page/mod.rs +++ b/src/manual_partitioning_page/mod.rs @@ -60,16 +60,17 @@ pub fn manual_partitioning_page( .selection_mode(gtk::SelectionMode::None) .build(); drive_mounts_adw_listbox.add_css_class("boxed-list"); - drive_mounts_adw_listbox.add_css_class("round-all-scroll"); + drive_mounts_adw_listbox.add_css_class("no-round-borders"); let drive_mounts_viewport = gtk::ScrolledWindow::builder() .vexpand(true) .hexpand(true) .has_frame(true) + .overflow(gtk::Overflow::Hidden) .child(&drive_mounts_adw_listbox) .build(); - drive_mounts_viewport.add_css_class("round-all-scroll"); + drive_mounts_viewport.add_css_class("round-all-scroll-no-padding"); create_hardcoded_rows( &drive_mounts_adw_listbox,