fix(corner-radius): properly handle no value, and use geometry

This commit is contained in:
Ashley Wulber 2025-09-25 12:53:14 -04:00 committed by Victoria Brekenfeld
parent 6f93b8774d
commit 2873d6b27e
5 changed files with 52 additions and 42 deletions

View file

@ -1591,7 +1591,7 @@ impl FloatingLayout {
let active_window_hint = crate::theme::active_window_hint(theme);
let radius = elem
.active_window()
.corner_radius()
.corner_radius(geometry.size.as_logical())
.unwrap_or([indicator_thickness; 4]);
if indicator_thickness > 0 {
let element = IndicatorShader::focus_element(

View file

@ -5017,7 +5017,7 @@ where
}));
let radius = mapped
.active_window()
.corner_radius()
.corner_radius(geo.size.as_logical())
.unwrap_or([indicator_thickness; 4]);
if is_minimizing && indicator_thickness > 0 {
elements.push(CosmicMappedRenderElement::FocusIndicator(
@ -5288,7 +5288,9 @@ where
)
.unwrap();
let radius = window.corner_radius().unwrap_or([indicator_thickness; 4]);
let radius = window
.corner_radius(swap_geo.size.as_logical())
.unwrap_or([indicator_thickness; 4]);
swap_elements.push(CosmicMappedRenderElement::FocusIndicator(
IndicatorShader::focus_element(
renderer,
@ -5369,7 +5371,7 @@ where
let radius = match data {
Data::Mapped { mapped, .. } => mapped
.active_window()
.corner_radius()
.corner_radius(geo.size.as_logical())
.unwrap_or([indicator_thickness; 4]),
_ => [1; 4],
};