diff options
author | 2024-03-08 13:40:10 +0100 | |
---|---|---|
committer | 2024-03-08 13:40:10 +0100 | |
commit | 3e99f39a8680bb48d5c15b043c399a3337765ae5 (patch) | |
tree | fbf1dd4d7fbe5f64c6931dbc933c0c21dfffc120 /widget/src/button.rs | |
parent | 288025f5143f4e3f8bc5af36e86f7afa7f07a4c7 (diff) | |
download | iced-3e99f39a8680bb48d5c15b043c399a3337765ae5.tar.gz iced-3e99f39a8680bb48d5c15b043c399a3337765ae5.tar.bz2 iced-3e99f39a8680bb48d5c15b043c399a3337765ae5.zip |
Rename `transparentize` to `scale_alpha`
Diffstat (limited to 'widget/src/button.rs')
-rw-r--r-- | widget/src/button.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/button.rs b/widget/src/button.rs index 243eaf04..e265aa1f 100644 --- a/widget/src/button.rs +++ b/widget/src/button.rs @@ -537,7 +537,7 @@ pub fn text(theme: &Theme, status: Status) -> Appearance { match status { Status::Active | Status::Pressed => base, Status::Hovered => Appearance { - text_color: palette.background.base.text.transparentize(0.8), + text_color: palette.background.base.text.scale_alpha(0.8), ..base }, Status::Disabled => disabled(base), @@ -557,8 +557,8 @@ fn disabled(appearance: Appearance) -> Appearance { Appearance { background: appearance .background - .map(|background| background.transparentize(0.5)), - text_color: appearance.text_color.transparentize(0.5), + .map(|background| background.scale_alpha(0.5)), + text_color: appearance.text_color.scale_alpha(0.5), ..appearance } } |