mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Fix an assortment of small bugs (#3968)
* Fix an assertion failure bug when scaling a line in the transform cage * Fix missing defaults on node gradient inputs * Fix Blend Shapes path input wire not updating to show in the UI after Layer > Blend * Fix assertion failure due to browser non-monotonic timestamp * Fix SVG renderer drawing 1px strokes as half-width when using stroke alignment * Fix incorrect appearance of the ColorInput widget when set to "none" and "disabled" * Fix lerp function in Fill enum to handle None cases correctly * Fix stroke alignment bug
This commit is contained in:
@@ -112,8 +112,10 @@ impl RenderExt for Stroke {
|
||||
return String::new();
|
||||
}
|
||||
|
||||
let default_weight = if self.align != StrokeAlign::Center && render_params.aligned_strokes { 1. / 2. } else { 1. };
|
||||
|
||||
// Set to None if the value is the SVG default
|
||||
let weight = (self.weight != 1.).then_some(self.weight);
|
||||
let weight = (self.weight != default_weight).then_some(self.weight);
|
||||
let dash_array = (!self.dash_lengths.is_empty()).then_some(self.dash_lengths());
|
||||
let dash_offset = (self.dash_offset != 0.).then_some(self.dash_offset);
|
||||
let stroke_cap = (self.cap != StrokeCap::Butt).then_some(self.cap);
|
||||
|
||||
Reference in New Issue
Block a user