docs: explain page window and scrolling example callers
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
let title = ui.text("Hello Endor · 你好,Tessera", 2, "#242422")
|
||||
// 同一文字控件包含中英文和重音字符,用于观察字体回退与基线。
|
||||
let detail = ui.text("中文 English 123 — café", 1, "#606060")
|
||||
// title/detail 是两个独立 TextBlock,字体系统在各自测量和绘制阶段使用一致的整形规则,颜色不参与字宽估算。
|
||||
// 两组相同尺寸色块跟在窄/宽字符后,12px gap 保持一致,差异来自真实文字测量。
|
||||
let row = ui.row(0, 12, ui.text("iiii"), ui.rect(24, 20, 4, "#DCE8FF"), ui.text("WWWW"), ui.rect(24, 20, 4, "#DCE8FF"))
|
||||
// 根Column统一padding和间距,render后这些对象才有具体Mount与绘图命令。
|
||||
let page = ui.page()
|
||||
// 整个脚本顶层构造完成后请求展示,没有点击回调或定时刷新;宿主布局负责把 row 中的真实测量宽度累加到色块位置。
|
||||
page.render(ui.column(24, 12, title, detail, row))
|
||||
|
||||
Reference in New Issue
Block a user