Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Add `MicaBackdrop` and `MicaAltBackdrop` to be selectable on themes (#48340)
Marocco2b961b4950feb
diff --git a/crates/settings/src/content_into_gpui.rs b/crates/settings/src/content_into_gpui.rsindex fc38b2129ab..4c5cba61481 100644--- a/crates/settings/src/content_into_gpui.rs+++ b/crates/settings/src/content_into_gpui.rs@@ -50,6 +50,8 @@ impl IntoGpui for WindowBackgroundContent {WindowBackgroundContent::Opaque => WindowBackgroundAppearance::Opaque,WindowBackgroundContent::Transparent => WindowBackgroundAppearance::Transparent,WindowBackgroundContent::Blurred => WindowBackgroundAppearance::Blurred,+ WindowBackgroundContent::MicaBackdrop => WindowBackgroundAppearance::MicaBackdrop,+ WindowBackgroundContent::MicaAltBackdrop => WindowBackgroundAppearance::MicaAltBackdrop,}}}diff --git a/crates/settings_content/src/theme.rs b/crates/settings_content/src/theme.rsindex e225545a84f..157d1384557 100644--- a/crates/settings_content/src/theme.rs+++ b/crates/settings_content/src/theme.rs@@ -1359,6 +1359,8 @@ pub enum WindowBackgroundContent {Opaque,Transparent,Blurred,+ MicaBackdrop,+ MicaAltBackdrop,}#[derive(Debug, Clone, Copy, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq)]diff --git a/crates/ui/src/styles/appearance.rs b/crates/ui/src/styles/appearance.rsindex 007511584e3..6daaaa28b62 100644--- a/crates/ui/src/styles/appearance.rs+++ b/crates/ui/src/styles/appearance.rs@@ -14,6 +14,9 @@ fn window_appearance(cx: &mut App) -> WindowBackgroundAppearance {pub fn theme_is_transparent(cx: &mut App) -> bool {matches!(window_appearance(cx),- WindowBackgroundAppearance::Transparent | WindowBackgroundAppearance::Blurred+ WindowBackgroundAppearance::Transparent+ | WindowBackgroundAppearance::Blurred+ | WindowBackgroundAppearance::MicaBackdrop+ | WindowBackgroundAppearance::MicaAltBackdrop)}