fix(app-iced): 选项区变高时与版本列表对半分(S1)+ 中英出图注入 + 注释同步
D30 r1 视觉驳回的三条里,代码能修的两条: 1. **S1 版面**:带加载器版本列表的选项区在三栏档把版本列表从 6.0 行压到 2.4 行(1180×760 实测 278px→110px,底缘切在第三行图标上)。`rows::TailShare::of` 现在让这类面板在**任何档位** 都与列表对半分(`scrollable` 分支早已存在),另把加载器版本菜单改成**按条目数**占高 (1 条 64px / 2 条 112px,原先只有 1 条也固定撑两行)。实测:列表回到 **245px = 5.3 行**。 2. **注释同步(S6)**:`options/view.rs` 模块头原先写「加载器分成两行」+ 两行示意,实际是 六枚一行(末枚右缘约 404px / 正文列 424);那条「本轮无看图通道,未出截图」也换成实测值。 顺带(使能中文出图):`pages/mod.rs::demo_model` 读 `ULL_DL_LANG=zh` 把 `model.lang` 与下载页 目录一起切中文。之前 `LC_ALL=zh_CN.UTF-8` 对出图**完全无效**——页面文案来自 `model.lang`, 而 `Model::new` 写死 `En`、`demo_model` 不碰它(`i18n::detect_env` 不在这条链上)。 测试:`options/s1_tests.rs` 新增两条(菜单只按整行占高;带版本列表的选项区在每个档位都 Shared, 原版/不兼容仍 Pinned),`-p unlucky-app-iced` 862 passed。 未完成:S2 窄窗「滚到底」图——iced 0.14 没有自由函数 `scroll_to`,程序化滚动要手写 `widget::Operation`(约 40 行),本轮不拿半成品充数;面板 `scrollable` 的稳定 Id 已就位。
This commit is contained in:
1 parent
841c17152a
commit
cd7813f8eb
7 files changed
+162
-18
No files matched your search
@@ -16,7 +16,7 @@ use unlucky_presenter::state::AppState;
|
||||
use super::model::{release_rank, Incompat, InstallDraft, Loader, LoaderVersionsView, OptionsView};
|
||||
use crate::pages::download::model::VersionRow;
|
||||
|
||||
fn row(id: &str, kind: VersionKind) -> VersionRow {
|
||||
pub(super) fn row(id: &str, kind: VersionKind) -> VersionRow {
|
||||
VersionRow::of(
|
||||
&VersionSummary {
|
||||
id: id.to_string(),
|
||||
@@ -28,7 +28,7 @@ fn row(id: &str, kind: VersionKind) -> VersionRow {
|
||||
)
|
||||
}
|
||||
|
||||
fn state_with(kind: LoaderKind, mc: &str, items: Result<Vec<&str>, &str>) -> AppState {
|
||||
pub(super) fn state_with(kind: LoaderKind, mc: &str, items: Result<Vec<&str>, &str>) -> AppState {
|
||||
let mut state = AppState::new();
|
||||
state.apply(AppEvent::Core(CoreEvent::LoaderVersions {
|
||||
kind,
|
||||
@@ -44,7 +44,7 @@ fn state_with(kind: LoaderKind, mc: &str, items: Result<Vec<&str>, &str>) -> App
|
||||
state
|
||||
}
|
||||
|
||||
fn draft(loader: Loader) -> InstallDraft {
|
||||
pub(super) fn draft(loader: Loader) -> InstallDraft {
|
||||
InstallDraft {
|
||||
selected: Some("1.20.1".to_string()),
|
||||
loader,
|
||||
|
||||
Reference in new issue
Block a user