From d0837b5b8b689cfda60796baa3d61cd05e99a139 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sat, 7 Sep 2024 13:44:34 +0300 Subject: [PATCH] add labels --- locales/en_US.json | 4 +++- src/bin/gui/apt_manage_page/mod.rs | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/locales/en_US.json b/locales/en_US.json index aff8e41..367622b 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -85,5 +85,7 @@ "apt_ignored_viewport_page_title": "APT Updates Were Failed & Ignored", "flatpak_update_dialog_ignore_label": "Ignore Flatpak Updates", "flatpak_ignored_viewport_page_title": "Flatpak Updates Were Failed & Ignored", - "apt_manage_page_title": "APT Settings" + "apt_manage_page_title": "APT Settings", + "system_mirror_label0_label": "System Repository Mirror", + "system_mirror_label1_label": "The Default URI/Mirror Used by the Base PikaOS System APT Repositories\n(Nest, Cockatiel, Canary, Pigeon, Parrot, Raven)" } \ No newline at end of file diff --git a/src/bin/gui/apt_manage_page/mod.rs b/src/bin/gui/apt_manage_page/mod.rs index 25dbf37..3049741 100644 --- a/src/bin/gui/apt_manage_page/mod.rs +++ b/src/bin/gui/apt_manage_page/mod.rs @@ -41,11 +41,38 @@ pub fn apt_manage_page( .orientation(Orientation::Vertical) .build(); + let system_mirror_label0 = gtk::Label::builder() + .label(t!("system_mirror_label0_label")) + .halign(gtk::Align::Start) + .valign(gtk::Align::Start) + .hexpand(true) + .margin_top(15) + .margin_start(15) + .margin_end(15) + .build(); + system_mirror_label0.add_css_class("heading"); + + let system_mirror_label1 = gtk::Label::builder() + .label(t!("system_mirror_label1_label")) + .halign(gtk::Align::Start) + .valign(gtk::Align::Start) + .hexpand(true) + .margin_start(15) + .margin_end(15) + .build(); + let system_mirror_entry = gtk::Entry::builder() .placeholder_text(system_source.repolib_default_mirror.as_deref().unwrap()) .text(system_source.uris.as_deref().unwrap()) + .valign(gtk::Align::Start) + .margin_top(5) + .margin_bottom(5) + .margin_start(15) + .margin_end(15) .build(); + main_box.append(&system_mirror_label0); + main_box.append(&system_mirror_label1); main_box.append(&system_mirror_entry); main_box