修 run.sh(漏 import os,导致编辑器根本起不来)+ 三段高度 20/60/20 自动按 Stage 高度算(实测 Stage.B()F=getHeight:4K 窗口 2044)

This commit is contained in:
tianmo committed 2026-10-16 17:07:41 +08:00
1 parent 84a8f30811
commit 05c5d45cca
4 files changed
+36 -13

No files matched your search

+5
View File
@@ -98,3 +98,8 @@ dl L (Ldv;)V setTouchable
# Cell.I(900) -> root 高度 580 -> 1080(其它候选 L/B/Z/V/C/S/F 都没这个效果)
# => Cell.I(float) 就是 height(float);现象佐证:设了它之后列表区出现滚动条、可滚。
dR I (F)LdR; height
# ---- Stage 宽高(2026-10-16 实测)----
# 依据:编辑器窗口 4K 下读 Stage 的无参 float 只有两个:B=2044、D=3726(高<宽),
# 故 B()F = getHeight、D()F = getWidth。
dt B ()F getHeight
dt D ()F getWidth
Can't render this file because it contains an unexpected character in line 72 and column 99.
+2
View File
@@ -167,6 +167,8 @@ do L (Ldl;)Z removeActor
do L (Z)V setTransform
do LineNumberTable ()Z isTransform
do init ()Z hasChildren
dt B ()F getHeight
dt D ()F getWidth
eM C ()V expandTo
eM D ()F getHeight
eM D ()Z hasChildren
1 # 合并后的名字映射表:确定(=)指纹 + 手动/实测锚点
167 do
168 do
169 do
170 dt
171 dt
172 eM
173 eM
174 eM
+1 -1
View File
@@ -29,7 +29,7 @@ echo "== 启动(工程 $PROJ)"
# 注意:不能用 `nohup … &` —— 那样进程挂在本 shell 的会话里,跑这条命令的终端一结束
# 编辑器就被一起收掉。必须 start_new_session=True 让它彻底脱离会话。
python3 - "$JX" "$ROOT" "$HERE" "$PAY" "$PROJ" "$LOG" <<'PYEOF'
import subprocess, sys
import os, subprocess, sys
jx, root, here, pay, proj, log = sys.argv[1:7]
cmd = [jx,
"-javaagent:" + root + "/tools/agent/view-agent.jar",
+28 -12
View File
@@ -218,18 +218,34 @@ public final class ObjectPanel {
}
// 三段高度按用户要求:上 20% / 中 60% / 下 20%(不用 expand)。
// 面板高度取实测值 984(见日志 pass0 dock=984),换算 = 197 / 590 / 197。
// 面板高度:默认取实测值 984(本机逻辑高度),可用 -Dpanel.h=<像素> 覆盖(4K/不同窗口大小用)。
final float PANEL_H = Float.parseFloat(System.getProperty("panel.h", "984"));
try {
call(buttonsCell, "I", new Class<?>[] {float.class}, cellClass,
Float.valueOf(PANEL_H * 0.20f));
call(cell, "I", new Class<?>[] {float.class}, cellClass, Float.valueOf(PANEL_H * 0.60f));
call(logCell, "I", new Class<?>[] {float.class}, cellClass, Float.valueOf(PANEL_H * 0.20f));
System.err.println("[panel] 三段高度: " + (PANEL_H * 0.20f) + " / " + (PANEL_H * 0.60f)
+ " / " + (PANEL_H * 0.20f));
} catch (Throwable error) {
System.err.println("[panel] 设置三段高度失败: " + error);
}
// 三段高度 20/60/20:面板高度从编辑器 Stage 读(建面板时 Stage 可能还没挂上,延迟 1.2s 再读)
final Object middleCell = cell;
Thread fit = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(1200);
float stageH = 0f;
Object stage = SceneObjects.global(state.loader, "uk");
if (stage == null) stage = SceneObjects.global(state.loader, "dt");
// Stage 上:`B()F`=getHeight、`D()F`=getWidth(实测:4K 窗口 2044 / 3726)
if (stage != null) stageH = floatOf(stage, "B");
float panelH = stageH > 300f ? stageH - 100f : 984f;
call(buttonsCell, "I", new Class<?>[] {float.class}, cellClass,
Float.valueOf(panelH * 0.2f));
call(middleCell, "I", new Class<?>[] {float.class}, cellClass,
Float.valueOf(panelH * 0.6f));
call(logCell, "I", new Class<?>[] {float.class}, cellClass, Float.valueOf(panelH * 0.2f));
call(state.root, "b_", new Class<?>[0], void.class);
System.err.println("[panel] 面板高度(自动): stage=" + stageH + " -> " + panelH
+ ";三段 = " + (panelH * 0.2f) + " / " + (panelH * 0.6f) + " / " + (panelH * 0.2f));
} catch (Throwable error) {
System.err.println("[panel] 自动三段高度失败: " + error);
}
}
}, "spineview-fit");
fit.setDaemon(true);
fit.start();
System.err.println("[panel] 增删改查面板已建好");
refreshList(state);
return root;