From 1a7a03234a1148a47549235ee69bc659ebf23911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 19 Aug 2026 19:15:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20UI=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E8=8A=82=E7=82=B9=E5=B8=83=E5=B1=80=E4=B8=8E=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加自定义尺寸与排列模式支持,调整字体属性结构以适应绑定格式 --- .../src-tauri/src/ui_editor/persistence.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/persistence.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/persistence.rs index 80c584609..a3dcb6adc 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/persistence.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/persistence.rs @@ -1119,11 +1119,18 @@ mod tests { "src_ui_design": "page", "root": { "id": "root", - "transform": { - "anchor_min": [0.0, 0.0], - "anchor_max": [1.0, 1.0], - "offset_min": [0.0, 0.0], - "offset_max": [0.0, 0.0] + "layout": { + "transform": { + "anchor_min": [0.0, 0.0], + "anchor_max": [1.0, 1.0], + "offset_min": [0.0, 0.0], + "offset_max": [0.0, 0.0] + }, + "custom_minimum_size": [0.0, 0.0], + "size_flags_horizontal": 1, + "size_flags_vertical": 1, + "size_flags_stretch_ratio": 1.0, + "container": "None" }, "metadata": { "name": "根节点", @@ -1137,7 +1144,7 @@ mod tests { "components": [{ "Text": { "content": "标题", - "font": "missing-font", + "font": {"Bound": "missing-font"}, "font_style": "Normal", "font_sizing": {"Fixed": 14}, "color": [255, 255, 255, 255], @@ -1147,6 +1154,7 @@ mod tests { "line_spacing": 1.0 } }], + "children_display_mode": "Stack", "children": [] } }],