Skip to content

Commit fe7766b

Browse files
committed
Code review fixes
1 parent e6d6aa6 commit fe7766b

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,11 @@ impl TableRowLayout for Typography {
546546
"Typography"
547547
}
548548
fn identifier(&self) -> String {
549-
"Typography".to_string()
550-
}
551-
fn element_widget(&self, _index: usize) -> WidgetHolder {
552-
TextLabel::new("Not supported").widget_holder()
549+
format!("Typography: {self:?}")
553550
}
554551
fn element_page(&self, _data: &mut LayoutData) -> Vec<LayoutGroup> {
555-
vec![LayoutGroup::Row { widgets: Vec::new() }]
552+
let widgets = vec![TextLabel::new("TODO").widget_holder()];
553+
vec![LayoutGroup::Row { widgets }]
556554
}
557555
}
558556

File renamed without changes.

editor/src/messages/portfolio/document/overlays/utility_types_vello.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use core::borrow::Borrow;
99
use core::f64::consts::{FRAC_PI_2, PI, TAU};
1010
use glam::{DAffine2, DVec2};
1111
use graphene_std::Color;
12-
use graphene_std::consts::SOURCE_SANS_FONT_DATA;
1312
use graphene_std::math::quad::Quad;
1413
use graphene_std::subpath::{self, Subpath};
1514
use graphene_std::table::Table;

node-graph/gcore/src/consts.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,3 @@ pub const LAYER_OUTLINE_STROKE_WEIGHT: f64 = 0.5;
77
// Fonts
88
pub const DEFAULT_FONT_FAMILY: &str = "Cabin";
99
pub const DEFAULT_FONT_STYLE: &str = "Regular (400)";
10-
11-
// Load Source Sans Pro font data
12-
// TODO: Grab this from the node_modules folder (either with `include_bytes!` or ideally at runtime) instead of checking the font file into the repo.
13-
// TODO: And maybe use the WOFF2 version (if it's supported) for its smaller, compressed file size.
14-
pub const SOURCE_SANS_FONT_DATA: &[u8] = include_bytes!("text/source-sans-pro-regular.ttf");
15-
pub const SOURCE_SANS_FONT_FAMILY: &str = "Source Sans Pro";
16-
pub const SOURCE_SANS_FONT_STYLE: &str = "Regular (400)";

node-graph/gcore/src/render_complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ impl RenderComplexity for GradientStops {
7070

7171
impl RenderComplexity for Typography {
7272
fn render_complexity(&self) -> usize {
73-
1
73+
self.layout.lines().map(|line| line.items().count()).sum()
7474
}
7575
}

node-graph/gcore/src/text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl fmt::Debug for Typography {
8383

8484
impl PartialEq for Typography {
8585
fn eq(&self, _other: &Self) -> bool {
86-
unimplemented!("Typography data type cannot be compared")
86+
unimplemented!("Typography cannot be compared")
8787
}
8888
}
8989

0 commit comments

Comments
 (0)