From 787c7d1f636a899db6e83d3f2a87c50dfc5ec4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFrigyes06=E2=80=9D?= Date: Sun, 24 Dec 2023 13:31:46 -0800 Subject: [PATCH 1/5] Standardized font sizes and fixed selection review popup --- src/gui/views/list.rs | 16 ++++++++-------- src/gui/views/settings.rs | 26 +++++++++++++------------- src/gui/widgets/navigation_menu.rs | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index 7798bb9..9101f72 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -410,7 +410,7 @@ impl List { let unavailable = container( column![ - text("ADB is not authorized to access this user!").size(22) + text("ADB is not authorized to access this user!").size(20) .style(style::Text::Danger), text("The most likely reason is that it is the user of your work profile (also called Secure Folder on Samsung devices). There's really no solution, other than completely disabling your work profile in your device settings.") .style(style::Text::Commentary) @@ -488,13 +488,13 @@ impl List { self.selected_user, Message::ModalUserSelected, ) - .size(23), + .size(24), ) }, ); let title_ctn = - container(row![text("Review your selection").size(25)].align_items(Alignment::Center)) + container(row![text("Review your selection").size(24)].align_items(Alignment::Center)) .width(Length::Fill) .style(style::Container::Frame) .padding([10, 0, 10, 0]) @@ -516,7 +516,7 @@ impl List { .width(17) .horizontal_alignment(alignment::Horizontal::Center) .style(style::Text::Commentary) - .size(17), + .size(16), "Let's say you choose user 0. If a selected package on user 0\n\ is set to be uninstalled and if this same package is disabled on user 10,\n\ then the package on both users will be uninstalled.", @@ -524,7 +524,7 @@ impl List { ) .gap(20) .padding(10) - .size(17) + .size(16) .style(style::Container::Tooltip) ] .spacing(10), @@ -572,7 +572,7 @@ impl List { self.phone_packages[selection.0][selection.1] .removal )] - .width(100), + .width(120), row![text( self.phone_packages[selection.0][selection.1] .uad_list @@ -603,7 +603,7 @@ impl List { PackageState::All => text("Impossible") .style(style::Text::Danger), },] - .width(60), + .width(80), ] .width(Length::Fill) .spacing(20), @@ -802,7 +802,7 @@ fn recap<'a>( ) -> Element<'a, Message, Renderer> { container( row![ - text(removal).size(25).width(Length::FillPortion(1)), + text(removal).size(24).width(Length::FillPortion(1)), vertical_rule(5), row![ if settings.device.disable_mode { diff --git a/src/gui/views/settings.rs b/src/gui/views/settings.rs index c853a64..41d6aae 100644 --- a/src/gui/views/settings.rs +++ b/src/gui/views/settings.rs @@ -193,7 +193,7 @@ impl Settings { Some(string_to_theme(&self.general.theme)), Message::ApplyTheme, ) - .size(23), + .size(24), ) }); let theme_ctn = container(radio_btn_theme) @@ -212,7 +212,7 @@ impl Settings { let expert_mode_descr = text("Most of unsafe packages are known to bootloop the device if removed.") .style(style::Text::Commentary) - .size(15); + .size(16); let general_ctn = container(column![expert_mode_checkbox, expert_mode_descr].spacing(10)) .padding(10) @@ -236,7 +236,7 @@ impl Settings { let multi_user_mode_descr = row![ text("This will not affect the following protected work profile users: ") - .size(15) + .size(16) .style(style::Text::Commentary), text( phone @@ -247,7 +247,7 @@ impl Settings { .collect::>() .join(", ") ) - .size(15) + .size(16) .style(style::Text::Danger) ]; @@ -267,9 +267,9 @@ impl Settings { let disable_mode_descr = text("In some cases, it can be better to disable a package instead of uninstalling it") .style(style::Text::Commentary) - .size(15); + .size(16); - let unavailable_btn = button(text("Unavailable").size(13)) + let unavailable_btn = button(text("Unavailable").size(14)) .on_press(Message::UrlPressed(PathBuf::from( "https://github.com/Universal-Debloater-Alliance/universal-android-debloater/wiki/FAQ#\ why-is-the-disable-mode-setting-not-available-for-my-device", @@ -392,24 +392,24 @@ impl Settings { let content = if phone.adb_id.clone().is_empty() { column![ - text("Theme").size(25), + text("Theme").size(26), theme_ctn, - text("General").size(25), + text("General").size(26), general_ctn, - text("Current device").size(25), + text("Current device").size(26), no_device_ctn(), - text("Backup / Restore").size(25), + text("Backup / Restore").size(26), no_device_ctn(), ] .width(Length::Fill) .spacing(20) } else { column![ - text("Theme").size(25), + text("Theme").size(26), theme_ctn, - text("General").size(25), + text("General").size(26), general_ctn, - text("Current device").size(25), + text("Current device").size(26), warning_ctn, device_specific_ctn, backup_restore_ctn, diff --git a/src/gui/widgets/navigation_menu.rs b/src/gui/widgets/navigation_menu.rs index cfb2bdd..264d809 100644 --- a/src/gui/widgets/navigation_menu.rs +++ b/src/gui/widgets/navigation_menu.rs @@ -24,7 +24,7 @@ pub fn nav_menu<'a>( .font(ICONS) .width(17) .horizontal_alignment(alignment::Horizontal::Center) - .size(17), + .size(16), ) .on_press(Message::RefreshButtonPressed) .padding(5) From 88eaee3cc1a036d73cdd9474d69177b983897846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFrigyes06=E2=80=9D?= Date: Sun, 24 Dec 2023 13:33:26 -0800 Subject: [PATCH 2/5] fixed search bar --- src/gui/views/list.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index 9101f72..93fb364 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -309,6 +309,7 @@ impl List { } LoadingState::Ready(_) => { let search_packages = text_input("Search packages...", &self.input_value) + .width(160) .on_input(Message::SearchInputChanged) .padding(5); From 1e77f486851f8f59dcd20278d30c5db2610d9574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFrigyes06=E2=80=9D?= Date: Sun, 24 Dec 2023 13:44:28 -0800 Subject: [PATCH 3/5] fixed layout once more --- src/gui/views/list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index 93fb364..6de492b 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -578,7 +578,7 @@ impl List { self.phone_packages[selection.0][selection.1] .uad_list )] - .width(60), + .width(70), row![text( self.phone_packages[selection.0][selection.1] .name From c5ea5aa2dd847266fbf83bdc1691bb249632c321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFrigyes06=E2=80=9D?= Date: Sun, 24 Dec 2023 14:09:14 -0800 Subject: [PATCH 4/5] changed default font size, removed unnecessary sizes --- src/gui/mod.rs | 2 +- src/gui/views/list.rs | 4 +--- src/gui/views/settings.rs | 8 ++------ src/gui/widgets/navigation_menu.rs | 3 +-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 844338b..cb5f744 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -372,7 +372,7 @@ impl UadGui { decorations: true, ..iced::window::Settings::default() }, - default_text_size: 17.0, + default_text_size: 16.0, ..Settings::default() }) } diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index 6de492b..f47a4e6 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -516,8 +516,7 @@ impl List { .font(ICONS) .width(17) .horizontal_alignment(alignment::Horizontal::Center) - .style(style::Text::Commentary) - .size(16), + .style(style::Text::Commentary), "Let's say you choose user 0. If a selected package on user 0\n\ is set to be uninstalled and if this same package is disabled on user 10,\n\ then the package on both users will be uninstalled.", @@ -525,7 +524,6 @@ impl List { ) .gap(20) .padding(10) - .size(16) .style(style::Container::Tooltip) ] .spacing(10), diff --git a/src/gui/views/settings.rs b/src/gui/views/settings.rs index 41d6aae..7a7d0fe 100644 --- a/src/gui/views/settings.rs +++ b/src/gui/views/settings.rs @@ -211,8 +211,7 @@ impl Settings { let expert_mode_descr = text("Most of unsafe packages are known to bootloop the device if removed.") - .style(style::Text::Commentary) - .size(16); + .style(style::Text::Commentary); let general_ctn = container(column![expert_mode_checkbox, expert_mode_descr].spacing(10)) .padding(10) @@ -236,7 +235,6 @@ impl Settings { let multi_user_mode_descr = row![ text("This will not affect the following protected work profile users: ") - .size(16) .style(style::Text::Commentary), text( phone @@ -247,7 +245,6 @@ impl Settings { .collect::>() .join(", ") ) - .size(16) .style(style::Text::Danger) ]; @@ -266,8 +263,7 @@ impl Settings { let disable_mode_descr = text("In some cases, it can be better to disable a package instead of uninstalling it") - .style(style::Text::Commentary) - .size(16); + .style(style::Text::Commentary); let unavailable_btn = button(text("Unavailable").size(14)) .on_press(Message::UrlPressed(PathBuf::from( diff --git a/src/gui/widgets/navigation_menu.rs b/src/gui/widgets/navigation_menu.rs index 264d809..8e20e38 100644 --- a/src/gui/widgets/navigation_menu.rs +++ b/src/gui/widgets/navigation_menu.rs @@ -23,8 +23,7 @@ pub fn nav_menu<'a>( Text::new("\u{E900}") .font(ICONS) .width(17) - .horizontal_alignment(alignment::Horizontal::Center) - .size(16), + .horizontal_alignment(alignment::Horizontal::Center), ) .on_press(Message::RefreshButtonPressed) .padding(5) From 8be24250ebc2907fbac803f0f9e1770c8ba378da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CFrigyes06=E2=80=9D?= Date: Sun, 24 Dec 2023 14:12:39 -0800 Subject: [PATCH 5/5] fixed icon width --- src/gui/views/list.rs | 2 +- src/gui/widgets/navigation_menu.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/views/list.rs b/src/gui/views/list.rs index f47a4e6..6b29d55 100644 --- a/src/gui/views/list.rs +++ b/src/gui/views/list.rs @@ -514,7 +514,7 @@ impl List { tooltip( text("\u{EA0C}") .font(ICONS) - .width(17) + .width(22) .horizontal_alignment(alignment::Horizontal::Center) .style(style::Text::Commentary), "Let's say you choose user 0. If a selected package on user 0\n\ diff --git a/src/gui/widgets/navigation_menu.rs b/src/gui/widgets/navigation_menu.rs index 8e20e38..231d501 100644 --- a/src/gui/widgets/navigation_menu.rs +++ b/src/gui/widgets/navigation_menu.rs @@ -22,7 +22,7 @@ pub fn nav_menu<'a>( let apps_refresh_btn = button( Text::new("\u{E900}") .font(ICONS) - .width(17) + .width(22) .horizontal_alignment(alignment::Horizontal::Center), ) .on_press(Message::RefreshButtonPressed)