Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(ui): align tree labels with hierarchy indentation

yhh26ef0b745937
diff --git a/desktop b/desktop
index 8128dd87d..674beda5d 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit 8128dd87d987747a773a2ee983aa96082155aa17
+Subproject commit 674beda5d6bb08cc23acfd1138910ad27de10137
diff --git a/sdk/src/ui/widgets/tree-view.ts b/sdk/src/ui/widgets/tree-view.ts
index 2cc9681be..d05640759 100644
--- a/sdk/src/ui/widgets/tree-view.ts
+++ b/sdk/src/ui/widgets/tree-view.ts
@@ -228,7 +228,7 @@ export function installTreeViews(app: App, host: ListViewHost): () => void {
makeWidgetInteractable(w, rowEntity, { focusable: false });
targets.set(rowEntity, rowEntity);
if (!item) {
- const label = spawnUIEntity({ world: w, parent: rowEntity, node: { fill: true, insetLeft: px(28), insetRight: px(data.dragEnabled ? 28 : 4) }, text: { content: '', fontSize: 14, color: themeColors().text, verticalAlign: TextVerticalAlign.Middle, wordWrap: false, overflow: TextOverflow.Ellipsis } });
+ const label = spawnUIEntity({ world: w, parent: rowEntity, node: { fill: true, insetLeft: px(28), insetRight: px(data.dragEnabled ? 28 : 4) }, text: { content: '', fontSize: 14, color: themeColors().text, align: TextAlign.Left, verticalAlign: TextVerticalAlign.Middle, wordWrap: false, overflow: TextOverflow.Ellipsis } });
const arrow = spawnUIEntity({ world: w, parent: rowEntity, node: { position: 1, width: px(24), height: px(height), insetLeft: px(0), insetTop: px(0) }, text: { content: '', fontSize: 14, color: themeColors().text, align: TextAlign.Center, verticalAlign: TextVerticalAlign.Middle } });
labels.set(rowEntity, label); arrows.set(rowEntity, arrow);
markThemed(w, label, { text: 'text' }); markThemed(w, arrow, { text: 'text' });
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 451d56ab0..d06e60db6 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -29,6 +29,7 @@ export const NOTES_FLOOR = 'v0.65.0';
*/
export const NOTED = {
'feat: add reusable TreeView and ColorPicker UI controls': { note: 'Reusable UI trees and color pickers.' },
+ 'fix(ui): align tree labels with hierarchy indentation': { note: 'Reusable UI trees and color pickers.' },
'feat(editor): add TreeView and ColorPicker authoring': { note: 'Reusable UI trees and color pickers.' },
'feat: add TabView and Tooltip UI controls': { note: 'UI tabs and tooltips.' },
'fix(ui): use hover state and sustained captures for tooltips': { note: 'UI tabs and tooltips.' },