chore: update dependencies

catch up with all the breaking changes of Iced main branch
This commit is contained in:
w1nst0n 2023-03-18 19:55:49 +01:00
commit e467fc7366
No known key found for this signature in database
GPG key ID: 34D27465928A0A1D
8 changed files with 220 additions and 246 deletions

415
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -360,7 +360,7 @@ impl UadGui {
decorations: true,
..iced::window::Settings::default()
},
default_text_size: 17,
default_text_size: 17.0,
..Settings::default()
})
}

View file

@ -244,7 +244,7 @@ impl checkbox::StyleSheet for Theme {
match style {
CheckBox::PackageEnabled => checkbox::Appearance {
background: Background::Color(self.palette().base.background),
checkmark_color: self.palette().bright.primary,
icon_color: self.palette().bright.primary,
border_radius: 5.0,
border_width: 1.0,
border_color: self.palette().base.background,
@ -255,7 +255,7 @@ impl checkbox::StyleSheet for Theme {
a: 0.55,
..self.palette().base.background
}),
checkmark_color: self.palette().bright.primary,
icon_color: self.palette().bright.primary,
border_radius: 5.0,
border_width: 1.0,
border_color: self.palette().normal.primary,
@ -263,7 +263,7 @@ impl checkbox::StyleSheet for Theme {
},
CheckBox::SettingsEnabled => checkbox::Appearance {
background: Background::Color(self.palette().base.background),
checkmark_color: self.palette().bright.primary,
icon_color: self.palette().bright.primary,
border_radius: 5.0,
border_width: 1.0,
border_color: self.palette().bright.primary,
@ -271,7 +271,7 @@ impl checkbox::StyleSheet for Theme {
},
CheckBox::SettingsDisabled => checkbox::Appearance {
background: Background::Color(self.palette().base.foreground),
checkmark_color: self.palette().bright.primary,
icon_color: self.palette().bright.primary,
border_radius: 5.0,
border_width: 1.0,
border_color: self.palette().normal.primary,
@ -283,7 +283,7 @@ impl checkbox::StyleSheet for Theme {
fn hovered(&self, style: &Self::Style, is_checked: bool) -> checkbox::Appearance {
let from_appearance = || checkbox::Appearance {
background: Background::Color(self.palette().base.foreground),
checkmark_color: self.palette().bright.primary,
icon_color: self.palette().bright.primary,
border_radius: 5.0,
border_width: 2.0,
border_color: self.palette().bright.primary,

View file

@ -38,8 +38,7 @@ impl About {
.style(style::Container::Frame);
let date = last_modified_date(CACHE_DIR.join("uad_lists.json"));
let uad_list_text =
text(format!("Documentation: v{}", date.format("%Y%m%d"))).width(Length::Units(250));
let uad_list_text = text(format!("Documentation: v{}", date.format("%Y%m%d"))).width(250);
let last_update_text = text(update_state.uad_list.to_string());
let uad_lists_btn = button("Update")
.on_press(Message::UpdateUadLists)
@ -54,7 +53,7 @@ impl About {
#[cfg(feature = "self-update")]
let uad_version_text =
text(format!("UAD version: v{}", env!("CARGO_PKG_VERSION"))).width(Length::Units(250));
text(format!("UAD version: v{}", env!("CARGO_PKG_VERSION"))).width(250);
#[cfg(feature = "self-update")]
let self_update_text = match &update_state.self_update.latest_release {
@ -81,12 +80,12 @@ impl About {
let self_update_row = row![uad_version_text, self_update_btn, last_self_update_text,]
.align_items(Alignment::Center)
.spacing(10)
.width(iced::Length::Units(550));
.width(550);
let uad_list_row = row![uad_list_text, uad_lists_btn, last_update_text,]
.align_items(Alignment::Center)
.spacing(10)
.width(iced::Length::Units(550));
.width(550);
#[cfg(feature = "self-update")]
let update_column = column![uad_list_row, self_update_row]

View file

@ -317,7 +317,7 @@ impl List {
self.selected_user,
Message::UserSelected,
)
.width(Length::Units(85));
.width(85);
let divider = Space::new(Length::Fill, Length::Shrink);
@ -510,7 +510,7 @@ impl List {
tooltip(
text("\u{EA0C}")
.font(ICONS)
.width(Length::Units(17))
.width(17)
.horizontal_alignment(alignment::Horizontal::Center)
.style(style::Text::Commentary)
.size(17),
@ -569,12 +569,12 @@ impl List {
self.phone_packages[selection.0][selection.1]
.removal
)]
.width(Length::Units(100)),
.width(100),
row![text(
self.phone_packages[selection.0][selection.1]
.uad_list
)]
.width(Length::Units(60)),
.width(60),
row![text(
self.phone_packages[selection.0][selection.1]
.name
@ -600,7 +600,7 @@ impl List {
_ => text("Impossible")
.style(style::Text::Danger),
},]
.width(Length::Units(60)),
.width(60),
]
.width(Length::Fill)
.spacing(20),
@ -662,7 +662,7 @@ impl List {
.align_items(Alignment::Center)
},
)
.width(Length::Units(800))
.width(800)
.height(Length::Shrink)
.max_height(700)
.style(style::Container::Background)
@ -837,7 +837,7 @@ fn recap<'a>(
)
.padding(10)
.width(Length::Fill)
.height(Length::Units(45))
.height(45)
.style(style::Container::Frame)
.into()
}

View file

@ -274,7 +274,7 @@ impl Settings {
"https://github.com/0x192/universal-android-debloater/wiki/FAQ#\
why-is-the-disable-mode-setting-not-available-for-my-device",
)))
.height(Length::Units(22))
.height(22)
.style(style::Button::Unavailable);
// Disabling package without root isn't really possible before Android Oreo (8.0)
@ -326,18 +326,18 @@ impl Settings {
.padding(5)
.on_press(Message::BackupDevice)
.style(style::Button::Primary)
.width(Length::Units(77));
.width(77);
let restore_btn = |enabled| {
if enabled {
button(text("Restore").horizontal_alignment(alignment::Horizontal::Center))
.padding(5)
.on_press(Message::RestoreDevice)
.width(Length::Units(77))
.width(77)
} else {
button(text("No backup").horizontal_alignment(alignment::Horizontal::Center))
.padding(5)
.width(Length::Units(77))
.width(77)
}
};

View file

@ -21,7 +21,7 @@ pub fn nav_menu<'a>(
let apps_refresh_btn = button(
Text::new("\u{E900}")
.font(ICONS)
.width(Length::Units(17))
.width(17)
.horizontal_alignment(alignment::Horizontal::Center)
.size(17),
)

View file

@ -92,7 +92,7 @@ impl PackageRow {
action_btn = button(
text(action_text)
.horizontal_alignment(alignment::Horizontal::Center)
.width(Length::Units(100)),
.width(100),
)
.on_press(Message::ActionPressed);
} else {
@ -102,7 +102,7 @@ impl PackageRow {
action_btn = button(
text(action_text)
.horizontal_alignment(alignment::Horizontal::Center)
.width(Length::Units(100)),
.width(100),
);
}
@ -123,7 +123,7 @@ impl PackageRow {
})
.width(Length::Fill)
.on_press(Message::PackagePressed),
Space::with_width(Length::Units(15))
Space::with_width(15)
]
.align_items(Alignment::Center)
.into()