1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Fix zero-width strokes still affecting the feathering color of boxes (#5485)

This commit is contained in:
Emil Ernerfeldt
2024-12-16 16:54:18 +01:00
committed by GitHub
parent e8029178b6
commit 045ed41efc
2 changed files with 12 additions and 5 deletions

View File

@@ -161,10 +161,15 @@ where
impl From<Stroke> for PathStroke {
fn from(value: Stroke) -> Self {
Self {
width: value.width,
color: ColorMode::Solid(value.color),
kind: StrokeKind::default(),
if value.is_empty() {
// Important, since we use the stroke color when doing feathering of the fill!
Self::NONE
} else {
Self {
width: value.width,
color: ColorMode::Solid(value.color),
kind: StrokeKind::default(),
}
}
}
}