fix(app-iced,i18n): 实例名钉成面板页脚(S7)+ 中文占位符还原(S8)+ 注释实测值(S6)
D30 r2 视觉二审四条: 1. **S7(新回归)**:S1 的对半分让面板变矮之后实例名被挤出 1180×760 首屏。按 `install.rs` 早已登记的方案改成**可滚上半块 + 钉死页脚**:`install::panel_with(.., shared)` → `options::section(.., scroll)`;`rows::content` 对 `PanelState::Options` 不再整块套 scrollable(那层既把实例名卷进滚动区,也在窄窗产生第二条并列滚动条)。页脚不参与滚动, 可达性由结构保证,S2 随之关闭。 2. **S8**:`catalog/download.rs` 与金表同一行的中文命令占位符 `<Forge 版本 id>` 照抄不可执行, 还原成 `<forge id>`(两处一起改,金表顺序未动)。 3. **S6**:`rows.rs` 里「两半各 ≈215px / 列表 4.6 行」的估算换成实测(列表 245px = 5.29 行、 面板 237px、分隔线 y=498),并写明 S1b 仍欠一项与其正确落点。 **S1b/S9(列表底缘整行)本轮没修成**:试过 `responsive` 拿「分给列表的高度」再 floor, 实测无效(`Fill` 子项上拿到非确定高度,量测显示列表区最后墨迹行仍在分隔线前一行),已回退, 不留无效代码。正确落点是把列表可用高度从 `pages/download.rs` / `rails.rs`(都在 scope 外) 传进 `rows::content`。 测试:`-p unlucky-app-iced` 862 passed、`-p unlucky-i18n` 36 passed(金表改动后仍绿)。
This commit is contained in:
1 parent
cd7813f8eb
commit
f29ca609ec
5 files changed
+83
-30
No files matched your search
@@ -105,18 +105,37 @@ pub(super) fn panel_state(model: &Download) -> PanelState<'_> {
|
||||
}
|
||||
|
||||
/// 底部的安装面板。
|
||||
///
|
||||
/// `shared` = 这一档列表与面板对半分(`rows::TailShare::Shared`)。此时**选项区自己滚**:
|
||||
/// 上半块(加载器 chip / 说明 / 版本列表 / 错误行)收进 `scrollable` 吃 `Fill`,实例名那一格
|
||||
/// 钉成页脚——D30 r2 S7:面板变高后实例名会被挤出首屏,钉住之后可达性由结构保证。
|
||||
pub(super) fn panel<'a>(ui: &'a Ui, catalog: Catalog, model: &'a Download) -> Element<'a, Message> {
|
||||
panel_with(ui, catalog, model, false)
|
||||
}
|
||||
|
||||
/// 同 [`panel`],但显式给「对半分档」标志(只有 `rows::content` 需要)。
|
||||
pub(super) fn panel_with<'a>(
|
||||
ui: &'a Ui,
|
||||
catalog: Catalog,
|
||||
model: &'a Download,
|
||||
shared: bool,
|
||||
) -> Element<'a, Message> {
|
||||
let content = match panel_state(model) {
|
||||
PanelState::Install(install) => installing(ui, catalog, install),
|
||||
// 选中版本之后**先给选项,再点「安装」**(M105:以前是选中就直接开工,等于没有加载器维度)
|
||||
PanelState::Options(options) => super::options::section(ui, catalog, options),
|
||||
PanelState::Options(options) => super::options::section(ui, catalog, options, shared),
|
||||
PanelState::Hint => hint(ui, catalog),
|
||||
};
|
||||
|
||||
container(content)
|
||||
let panel = container(content)
|
||||
.width(Length::Fill)
|
||||
.padding(Padding::from([ui.space(Space::X3), 0.0]))
|
||||
.into()
|
||||
.padding(Padding::from([ui.space(Space::X3), 0.0]));
|
||||
// 对半分档:面板吃满自己那一半,选项区的 `scrollable` 才有确定高度可吃。
|
||||
if shared {
|
||||
panel.height(Length::Fill).into()
|
||||
} else {
|
||||
panel.into()
|
||||
}
|
||||
}
|
||||
|
||||
/// 没选中任何版本:给一句「选一个版本再安装」(不静默禁用,也不画一个点不动的按钮)。
|
||||
|
||||
Reference in new issue
Block a user