button: Use muted foreground as disabled text color (#1088)

This commit is contained in:
Floyd Wang 2025-07-24 14:19:10 +08:00
parent e9d8741835
commit 634ab14306

View file

@ -891,13 +891,7 @@ impl ButtonVariant {
ButtonVariant::Secondary => cx.theme().secondary.opacity(1.5),
ButtonVariant::Custom(style) => style.color.opacity(0.15),
};
let fg = match self {
ButtonVariant::Link | ButtonVariant::Text | ButtonVariant::Ghost => {
cx.theme().link.grayscale()
}
_ => cx.theme().secondary_foreground.opacity(0.5).grayscale(),
};
let fg = cx.theme().muted_foreground.opacity(0.5);
let (bg, border) = if outline {
(cx.theme().transparent, cx.theme().border.opacity(0.5))
} else {