feat(app-iced): 向导的出图种子 + 卡壳几何修正(M223 视觉自检)

D30 的截图通道在本机可用(`--software-renderer` 走 tiny-skia,1180×760 落盘),所以不再把视觉
证据留空:新增 `ULL_ADOPT_STATE`(与 `ULL_JAVA_STATE` / `ULL_AI_STATE` 同一族,**只在
`--screenshot` 下生效**),可把向导摆到七种状态之一(pick / empty / preview / shared / failed /
done + 深色),于是出图不靠「赌异步时序」。

顺带修掉三处只有出图才看得见的问题:

1. **卡壳把页脚裁掉了**:内容高于 `max_height` 时 iced 直接裁,第一版 PICK 段的「实例名」与
   按钮整排不可见。现在列表段(Pick/Failed)定高 + 中间区可滚、页脚固定;短内容段
   (Preview/Done)按内容收高,不留一大片空白;
2. **两枚一模一样的「关闭」**:Failed/Done 的主按钮就是关闭,文字关闭不该再出现;
3. Preview 段少了实例名一行,且标题下的摘要重复了「共用目录 · 共用游戏目录」。

夹具只造候选/问题/运行目录这些**版面数据**,后果原文仍由 core 的 `target_notes()` 现算,
图证明版面与文案、不证明 core 判据(见 `DevDocs/artifacts/m223/README.md` 的真/假表)。

为守 400 行(`components::gate` 实测 412 行红),卡壳/标题/页脚纯搬移到 `app/adopt/shell.rs`。
This commit is contained in:
AskaEth committed 2026-11-10 19:37:44 +08:00
1 parent a36e17a5d3
commit 6ffbd51f60
10 files changed
+435 -171

No files matched your search

+4 -8
View File
@@ -10,7 +10,7 @@
//! 缺省档会带 `-2`/`-3` 后缀(两个不同展示名可能落到同一个物理目录),**只有 core 知道**
//! 最后用了哪个——页面对它再做一次派生就会与真正启动时用的目录分叉。
use iced::widget::{column, scrollable};
use iced::widget::column;
use iced::{Element, Length};
use unlucky_design::color::Role;
@@ -18,12 +18,10 @@ use unlucky_design::spacing::Space as Sp;
use unlucky_i18n::{Catalog, Key};
use unlucky_presenter::dto::{AdoptDoneView, AdoptFailureView, AdoptPlanView};
use crate::pages::frame;
use crate::theme::Ui;
use super::super::message::Message;
use super::text::{field_line, isolation_label, mono, problem_line, wrapped};
use super::CARD_LIST_HEIGHT;
/// 预检结果:落点 + 隔离档 + 后果原文。
pub(super) fn preview<'a>(
@@ -39,6 +37,7 @@ pub(super) fn preview<'a>(
);
};
let mut body = column![
field_line(ui, catalog.text(Key::AdoptInstanceName), &plan.name),
field_line(
ui,
catalog.text(Key::AdoptPlanRunDir),
@@ -93,10 +92,7 @@ pub(super) fn failed<'a>(
for problem in &failure.problems {
body = body.push(problem_line(ui, problem));
}
scrollable(body)
.height(Length::Fixed(CARD_LIST_HEIGHT))
.style(frame::scroll_style(ui))
.into()
body.into()
}
/// 完成:实例名 + 运行目录 + 提示原文。
@@ -109,7 +105,7 @@ pub(super) fn done<'a>(
return wrapped(ui, String::new(), ui.color(Role::OnSurfaceVariant));
};
let mut body = column![
field_line(ui, catalog.text(Key::AdoptTitle), &done.name),
field_line(ui, catalog.text(Key::AdoptInstanceName), &done.name),
field_line(
ui,
catalog.text(Key::AdoptPlanRunDir),