mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 00:48:12 +08:00
add: mask to spreadsheet viewer
This commit is contained in:
@@ -299,6 +299,8 @@ impl<T: InstanceLayout> InstanceLayout for Instances<T> {
|
|||||||
TextButton::new(instance.instance.identifier())
|
TextButton::new(instance.instance.identifier())
|
||||||
.on_update(move |_| SpreadsheetMessage::PushToInstancePath { index }.into())
|
.on_update(move |_| SpreadsheetMessage::PushToInstancePath { index }.into())
|
||||||
.widget_holder(),
|
.widget_holder(),
|
||||||
|
// Add the mask information here. We'll simply display "Yes" or "No".
|
||||||
|
TextLabel::new(if instance.mask.is_some() { "Yes" } else { "No" }.to_string()).widget_holder(),
|
||||||
TextLabel::new(format!(
|
TextLabel::new(format!(
|
||||||
"Location: ({} px, {} px) — Rotation: {rotation:2}° — Scale: ({}x, {}x)",
|
"Location: ({} px, {} px) — Rotation: {rotation:2}° — Scale: ({}x, {}x)",
|
||||||
round(translation.x),
|
round(translation.x),
|
||||||
@@ -313,7 +315,8 @@ impl<T: InstanceLayout> InstanceLayout for Instances<T> {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
rows.insert(0, column_headings(&["", "instance", "transform", "alpha_blending", "source_node_id"]));
|
// Add "mask" to the column headings
|
||||||
|
rows.insert(0, column_headings(&["", "instance", "mask", "transform", "alpha_blending", "source_node_id"]));
|
||||||
|
|
||||||
let instances = vec![TextLabel::new("Instances:").widget_holder()];
|
let instances = vec![TextLabel::new("Instances:").widget_holder()];
|
||||||
vec![LayoutGroup::Row { widgets: instances }, LayoutGroup::Table { rows }]
|
vec![LayoutGroup::Row { widgets: instances }, LayoutGroup::Table { rows }]
|
||||||
|
|||||||
Reference in New Issue
Block a user