We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f01ebf2 commit 2d9d83dCopy full SHA for 2d9d83d
src/shell/element/surface.rs
@@ -141,11 +141,15 @@ impl CosmicSurface {
141
142
let guard = corners.lock().unwrap();
143
144
+ let size = <CosmicSurface as SpaceElement>::geometry(self).size;
145
+ // guard against corner radius being too large, potentially disconnecting the outline
146
+ let half_min_dim = u8::try_from(size.w.min(size.h) / 2).unwrap_or(u8::MAX);
147
+
148
Some([
- guard.top_right,
- guard.bottom_right,
- guard.top_left,
- guard.bottom_left,
149
+ guard.top_right.min(half_min_dim),
150
+ guard.bottom_right.min(half_min_dim),
151
+ guard.top_left.min(half_min_dim),
152
+ guard.bottom_left.min(half_min_dim),
153
])
154
})
155
0 commit comments