AskaEth
7b80b0e314
feat(app-iced): --force-state 穿过设置页与外观区(M285 FORCEDWIRE)
pages::Model.forced 此前只到得了外壳 + 实例页(唯一消费者 pages/instances.rs:159),
设置页「外观」区的滑块/文本框/裸 iced::button 全都不消费它 ⇒ M284 那四处状态层
(语言档 / 主题档 / 日志 action_button / 外观 choice)只有单测证据,做不出像素判据。
改动:
- settings/mod.rs: resolve_state(forced, status) 与 forced_button(button, forced)
成为全仓唯一两个「forced 怎么解释」的点;view → form → section_columns 一路
新增 forced 形参(默认 None ⇒ 今天的行为逐字节不变)。
- Group.body(registry.rs)加第 4 个形参 Option<Interaction>,六组统一签名。
- 四类裸 iced::button 控件把 forced 递进样式闭包并经 resolve_state 落地:
语言档 chip(general/language.rs)、主题档 chip(general/theme.rs)、
日志 action_button(logs_row.rs)、外观 choice(appearance/section/mod.rs,
含 accent/window/bg_image/colour_source 共 10 处调用)。
- components::buttons::Button 的三组(update / ai / java)走 forced_button 的 .state()。
- harness: request.rs 解析 --force-state=rest|hover|pressed(未知值报错,词与产品
cli.rs 同一套),slug 加 -hover/-pressed;app.rs 把它写进 model.forced,
截图通道默认 Rest 的纪律保持(显式值优先)。
- pages/mod.rs: 唯一调用点把 model.forced 传给 settings::view(397 → 399 行)。
单测:resolve_state 的 Some 覆盖 / None 退回;forced_button 的 Some 钉态 / None 原样。
2026-11-12 23:12:20 +08:00
..
2026-11-12 12:06:46 +08:00
2026-11-05 14:08:37 +08:00
2026-11-12 23:12:20 +08:00
2026-11-12 22:05:19 +08:00
2026-11-12 22:34:07 +08:00
2026-11-12 10:50:02 +08:00
2026-11-12 19:55:51 +08:00
2026-11-12 12:06:46 +08:00
2026-11-12 19:55:52 +08:00