mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 05:18:12 +08:00
Fix empty fill list rendering as default black
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
cubic-dev-ai[bot]
parent
1802829c87
commit
3091a6f2df
@@ -40,7 +40,7 @@ impl RenderExt for List<Color> {
|
|||||||
_transformed_bounds: DAffine2,
|
_transformed_bounds: DAffine2,
|
||||||
_render_params: &RenderParams,
|
_render_params: &RenderParams,
|
||||||
) -> Self::Output {
|
) -> Self::Output {
|
||||||
let Some(color) = self.element(0) else { return String::new() };
|
let Some(color) = self.element(0) else { return r#" fill="none""#.to_string() };
|
||||||
|
|
||||||
let mut result = format!(r##" fill="#{}""##, SRGBA8::from(*color).to_rgb_hex());
|
let mut result = format!(r##" fill="#{}""##, SRGBA8::from(*color).to_rgb_hex());
|
||||||
if color.a() < 1. {
|
if color.a() < 1. {
|
||||||
|
|||||||
Reference in New Issue
Block a user