mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 05:08:13 +08:00
Set text fill color to the primary color (#521)
* Fix text has no fill * Use primary color for text fill * Use correct text color when editing * Change fallback text color to gray
This commit is contained in:
committed by
Keavon Chambers
parent
6d695a0a25
commit
5534d0a44c
@@ -43,13 +43,17 @@ impl LayerData for Text {
|
||||
if self.editable {
|
||||
let _ = write!(
|
||||
svg,
|
||||
r#"<foreignObject transform="matrix({})"></foreignObject>"#,
|
||||
r#"<foreignObject transform="matrix({})" style="color: {}"></foreignObject>"#,
|
||||
transform
|
||||
.to_cols_array()
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, entry)| { entry.to_string() + if i == 5 { "" } else { "," } })
|
||||
.collect::<String>(),
|
||||
match self.style.fill() {
|
||||
Some(fill) => format!("#{}", fill.color().rgba_hex()),
|
||||
None => "gray".to_string(),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
let mut path = self.to_bez_path();
|
||||
|
||||
Reference in New Issue
Block a user