mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Rename the Graphic enum wrapper variants with a "List" suffix (#4434)
* Make the Artboard and Gradient newtype fields public to match the other list newtypes * Rename the Graphic enum's self-named Graphic::Graphic variant to Graphic::GraphicList * Rename the Graphic::Vector variant to Graphic::VectorList * Rename the Graphic::RasterCPU variant to Graphic::RasterCPUList * Rename the Graphic::RasterGPU variant to Graphic::RasterGPUList * Rename the Graphic::Color variant to Graphic::ColorList * Rename the Graphic::Gradient variant to Graphic::GradientList * Rename the Graphic::Text variant to Graphic::TextList * Restore the SVG group tag comment that the variant rename sweep clobbered
This commit is contained in:
@@ -578,13 +578,13 @@ impl TableItemLayout for Graphic {
|
||||
fn identifier(&self) -> String {
|
||||
match self {
|
||||
Self::None => "None".to_string(),
|
||||
Self::Graphic(list) => list.identifier(),
|
||||
Self::Vector(list) => list.identifier(),
|
||||
Self::RasterCPU(list) => list.identifier(),
|
||||
Self::RasterGPU(list) => list.identifier(),
|
||||
Self::Color(list) => list.identifier(),
|
||||
Self::Gradient(list) => list.identifier(),
|
||||
Self::Text(list) => list.identifier(),
|
||||
Self::GraphicList(list) => list.identifier(),
|
||||
Self::VectorList(list) => list.identifier(),
|
||||
Self::RasterCPUList(list) => list.identifier(),
|
||||
Self::RasterGPUList(list) => list.identifier(),
|
||||
Self::ColorList(list) => list.identifier(),
|
||||
Self::GradientList(list) => list.identifier(),
|
||||
Self::TextList(list) => list.identifier(),
|
||||
}
|
||||
}
|
||||
// Don't put a breadcrumb for Graphic
|
||||
@@ -594,13 +594,13 @@ impl TableItemLayout for Graphic {
|
||||
fn value_page(&self, data: &mut LayoutData) -> Vec<LayoutGroup> {
|
||||
match self {
|
||||
Self::None => label("None"),
|
||||
Self::Graphic(list) => list.layout_with_breadcrumb(data),
|
||||
Self::Vector(list) => list.layout_with_breadcrumb(data),
|
||||
Self::RasterCPU(list) => list.layout_with_breadcrumb(data),
|
||||
Self::RasterGPU(list) => list.layout_with_breadcrumb(data),
|
||||
Self::Color(list) => list.layout_with_breadcrumb(data),
|
||||
Self::Gradient(list) => list.layout_with_breadcrumb(data),
|
||||
Self::Text(list) => list.layout_with_breadcrumb(data),
|
||||
Self::GraphicList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::VectorList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::RasterCPUList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::RasterGPUList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::ColorList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::GradientList(list) => list.layout_with_breadcrumb(data),
|
||||
Self::TextList(list) => list.layout_with_breadcrumb(data),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ impl NodeRuntime {
|
||||
continue;
|
||||
};
|
||||
|
||||
// Graphic list: thumbnail (text-aware bounds, since the `BoundingBox` trait can't lay out `Graphic::Text` content)
|
||||
// Graphic list: thumbnail (text-aware bounds, since the `BoundingBox` trait can't lay out `Graphic::TextList` content)
|
||||
if let Some(io) = introspected_data.downcast_ref::<IORecord<Context, List<Graphic>>>() {
|
||||
if update_thumbnails {
|
||||
let bounds = graphene_std::renderer::graphic_list_bounding_box(&io.output, DAffine2::IDENTITY);
|
||||
|
||||
Reference in New Issue
Block a user