소스 검색

Merge pull request #1781 from ealmloff/fix-non-string-layout-tui

Fix non string layout attributes in rink
Jonathan Kelley 1 년 전
부모
커밋
60f6ef8402
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/rink/src/layout.rs

+ 2 - 2
packages/rink/src/layout.rs

@@ -92,10 +92,10 @@ impl State for TaffyLayout {
                     attribute, value, ..
                 } in attributes
                 {
-                    if let Some(text) = value.as_text() {
+                    if value.as_custom().is_none() {
                         apply_layout_attributes_cfg(
                             &attribute.name,
-                            text,
+                            &value.to_string(),
                             &mut style,
                             &LayoutConfigeration {
                                 border_widths: BorderWidths {