mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 09:18:11 +08:00
New Typography type
This commit is contained in:
@@ -12,6 +12,7 @@ use graphene_std::gradient::GradientStops;
|
||||
use graphene_std::memo::IORecord;
|
||||
use graphene_std::raster_types::{CPU, GPU, Raster};
|
||||
use graphene_std::table::Table;
|
||||
use graphene_std::text::Typography;
|
||||
use graphene_std::vector::Vector;
|
||||
use graphene_std::vector::style::{Fill, FillChoice};
|
||||
use graphene_std::{Artboard, Graphic};
|
||||
@@ -269,6 +270,7 @@ impl TableRowLayout for Graphic {
|
||||
Self::RasterGPU(table) => table.identifier(),
|
||||
Self::Color(table) => table.identifier(),
|
||||
Self::Gradient(table) => table.identifier(),
|
||||
Self::Typography(table) => table.identifier(),
|
||||
}
|
||||
}
|
||||
// Don't put a breadcrumb for Graphic
|
||||
@@ -283,6 +285,7 @@ impl TableRowLayout for Graphic {
|
||||
Self::RasterGPU(table) => table.layout_with_breadcrumb(data),
|
||||
Self::Color(table) => table.layout_with_breadcrumb(data),
|
||||
Self::Gradient(table) => table.layout_with_breadcrumb(data),
|
||||
Self::Typography(table) => table.layout_with_breadcrumb(data),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -538,6 +541,21 @@ impl TableRowLayout for GradientStops {
|
||||
}
|
||||
}
|
||||
|
||||
impl TableRowLayout for Typography {
|
||||
fn type_name() -> &'static str {
|
||||
"Typography"
|
||||
}
|
||||
fn identifier(&self) -> String {
|
||||
"Typography".to_string()
|
||||
}
|
||||
fn element_widget(&self, _index: usize) -> WidgetHolder {
|
||||
TextLabel::new("Not supported").widget_holder()
|
||||
}
|
||||
fn element_page(&self, _data: &mut LayoutData) -> Vec<LayoutGroup> {
|
||||
vec![LayoutGroup::Row { widgets: Vec::new() }]
|
||||
}
|
||||
}
|
||||
|
||||
impl TableRowLayout for f64 {
|
||||
fn type_name() -> &'static str {
|
||||
"Number (f64)"
|
||||
|
||||
Binary file not shown.
@@ -9,6 +9,7 @@ use core::borrow::Borrow;
|
||||
use core::f64::consts::{FRAC_PI_2, PI, TAU};
|
||||
use glam::{DAffine2, DVec2};
|
||||
use graphene_std::Color;
|
||||
use graphene_std::consts::SOURCE_SANS_FONT_DATA;
|
||||
use graphene_std::math::quad::Quad;
|
||||
use graphene_std::subpath::{self, Subpath};
|
||||
use graphene_std::table::Table;
|
||||
|
||||
Reference in New Issue
Block a user