mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-26 23:44:18 +02:00
Settings checkboxes have their own style
The default text color field recently added in Iced is set to Color::Black which is not suitable for UAD
This commit is contained in:
parent
8831628015
commit
72ba0ab02b
2 changed files with 34 additions and 6 deletions
|
|
@ -285,7 +285,7 @@ impl checkbox::StyleSheet for SelectionCheckBox {
|
|||
border_radius: 5.0,
|
||||
border_width: 1.0,
|
||||
border_color: palette.base.background,
|
||||
text_color: Color::BLACK,
|
||||
text_color: palette.bright.surface,
|
||||
},
|
||||
Self::Disabled(palette) => checkbox::Style {
|
||||
background: Background::Color(palette.base.foreground),
|
||||
|
|
@ -293,7 +293,7 @@ impl checkbox::StyleSheet for SelectionCheckBox {
|
|||
border_radius: 5.0,
|
||||
border_width: 1.0,
|
||||
border_color: palette.normal.primary,
|
||||
text_color: Color::BLACK,
|
||||
text_color: palette.bright.surface,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -306,7 +306,7 @@ impl checkbox::StyleSheet for SelectionCheckBox {
|
|||
border_radius: 5.0,
|
||||
border_width: 2.0,
|
||||
border_color: palette.normal.primary,
|
||||
text_color: Color::BLACK,
|
||||
text_color: palette.bright.surface,
|
||||
},
|
||||
|
||||
Self::Disabled(_) => checkbox::Style {
|
||||
|
|
@ -316,6 +316,31 @@ impl checkbox::StyleSheet for SelectionCheckBox {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct SettingsCheckbox(pub ColorPalette);
|
||||
impl checkbox::StyleSheet for SettingsCheckbox {
|
||||
fn active(&self, _is_checked: bool) -> checkbox::Style {
|
||||
checkbox::Style {
|
||||
background: Background::Color(self.0.base.background),
|
||||
checkmark_color: self.0.bright.primary,
|
||||
border_radius: 5.0,
|
||||
border_width: 1.0,
|
||||
border_color: self.0.bright.primary,
|
||||
text_color: self.0.bright.surface,
|
||||
}
|
||||
}
|
||||
|
||||
fn hovered(&self, _is_checked: bool) -> checkbox::Style {
|
||||
checkbox::Style {
|
||||
background: Background::Color(self.0.base.foreground),
|
||||
checkmark_color: self.0.bright.primary,
|
||||
border_radius: 5.0,
|
||||
border_width: 2.0,
|
||||
border_color: self.0.bright.primary,
|
||||
text_color: self.0.bright.surface,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SearchInput(pub ColorPalette);
|
||||
impl text_input::StyleSheet for SearchInput {
|
||||
fn active(&self) -> text_input::Style {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ impl Settings {
|
|||
self.phone.expert_mode,
|
||||
"Allow to uninstall packages marked as \"unsafe\" (I KNOW WHAT I AM DOING)",
|
||||
Message::ExpertMode,
|
||||
);
|
||||
)
|
||||
.style(style::SettingsCheckbox(self.theme.palette));
|
||||
|
||||
let disable_mode_descr = Text::new("Default mode on older phone (< Android 8.0) where uninstalled packages can't be restored.")
|
||||
.size(15)
|
||||
|
|
@ -111,7 +112,8 @@ impl Settings {
|
|||
self.phone.disable_mode,
|
||||
"Clear and disable packages instead of uninstalling them",
|
||||
Message::DisableMode,
|
||||
);
|
||||
)
|
||||
.style(style::SettingsCheckbox(self.theme.palette));
|
||||
|
||||
let multi_user_mode_descr =
|
||||
Text::new("Disabling this setting will typically prevent affecting your work profile")
|
||||
|
|
@ -122,7 +124,8 @@ impl Settings {
|
|||
self.phone.multi_user_mode,
|
||||
"Affect all the users of the phone (not only the selected user)",
|
||||
Message::MultiUserMode,
|
||||
);
|
||||
)
|
||||
.style(style::SettingsCheckbox(self.theme.palette));
|
||||
|
||||
let content = Column::new()
|
||||
.width(Length::Fill)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue