theme: derive elevations from the platform's native shadows

This commit is contained in:
2026-11-01 09:54:35 +07:00
parent 5a32401e25
commit d107f35084
4 changed files with 127 additions and 37 deletions
+2 -8
View File
@@ -7,7 +7,7 @@ use gpui::{
Styled as _, Window, deferred, div, ease_out_quint, px,
};
use gpui_native_icons::{IconRole, icon};
use gpui_native_theme::{ActiveTheme as _, ThemeVariant};
use gpui_native_theme::ActiveTheme as _;
use crate::common::DismissHandler;
use crate::common::v_flex;
@@ -127,13 +127,7 @@ impl RenderOnce for Alert {
let muted = theme.colors.muted;
let surface = theme.colors.surface;
let border = theme.colors.border;
let mut elevation = theme.elevations.popover;
if theme.variant == ThemeVariant::Light {
elevation.color = elevation.color.alpha(0.12);
}
let shadows = elevation.shadows();
let shadows = theme.elevations.popover.shadows();
let text_size = theme.sizes.small.text_size;
let icon_size = theme.sizes.small.icon_size;