docs(app-iced): 按 TailShare::of 的真实分支清扫下载页面板注释(r7 三条 + 全量扫)
(i) 上轮新引入的错误声明 rescope:错误行「恒为 None / 滚动区只有 head+chips」只在**三栏档 +
带版本列表**这一支成立(has_loader_versions() 要求 problem.is_none())。**chips 档**(可用宽
< 600,TailShare::of 对 Options/Install 无条件 Shared)里 problem 可以是 Some(静态不兼容 /
列表取不到 / 空表三种),错误行会进滚动区且可能被滚走;show_versions() 为假时钉死区只剩
实例名。install.rs 与 options/view.rs 都按这两支分别写清,并注明该行为域由 M227 重设计。
(ii) install.rs 的「显式给对半分档标志」「对半分:面板吃满自己那一半」改成预算优先口径
(与同文件十行上方「不是早期的对半分」不再矛盾)。
(iii) rows.rs 三处:三栏档「照旧钉死」限定为「**不带版本列表**的选项区」;`content` 的 share
说明改成引用 TailShare::of 的真实两支,不再复述「三栏钉死 / chips 各吃一半」;
「只有对半分那一档才按整行取高」改成「只有 Shared(面板先保预算)那一档」。
全量扫附带修正:tail.rs 的 ROW_PITCH / PANEL_BUDGET 账(760 例改成 176/437、900 改成 569;
预算拆成滚动区 76 + 钉死区 153);options/model.rs 的 has_loader_versions 文档改成预算口径。
零代码零测试变更。
This commit is contained in:
1 parent
409c742aa8
commit
a16aadd467
5 files changed
+38
-23
No files matched your search
@@ -117,14 +117,21 @@ pub(super) fn panel_state(model: &Download) -> PanelState<'_> {
|
||||
/// - **滚动区**:head(版本 id + 安装按钮)+ 六枚加载器 chips;
|
||||
/// - **钉死区**:说明行(有说明时;否则是「加载器版本」标签)+ 版本菜单 + 实例名输入框。
|
||||
///
|
||||
/// 菜单与说明分别是 D30 四审 / 八审搬进钉死区的(裁切位置由钉死区高度决定,与窗宽无关);
|
||||
/// 错误行在 Shared 档恒为 `None`(`OptionsView::problem` 只在静态不兼容时出现,而那时
|
||||
/// 不画版本菜单、走的是不滚动的那一路),所以滚动区里只会有 head + chips 这两块。
|
||||
/// 菜单与说明分别是 D30 四审 / 八审搬进钉死区的(裁切位置由钉死区高度决定,与窗宽无关)。
|
||||
///
|
||||
/// **两个 Shared 分支的现实不同,别一概而论**(`rows/tail.rs::TailShare::of`):
|
||||
///
|
||||
/// - **三栏档 + 带加载器版本列表**:`has_loader_versions()` 要求 `problem.is_none()`,所以这一支
|
||||
/// 滚动区里**只会有 head + chips**,错误行与它不可达;
|
||||
/// - **chips 档(可用宽 < 600)**:`TailShare::of` 对 `Options`/`Install` 无条件 `Shared`,
|
||||
/// `problem` **可以是** `Some`(静态不兼容 / 版本列表取不到 / 空表三种),那时错误行**会在
|
||||
/// 滚动区里出现**、可能被滚走;`show_versions()` 为假时钉死区只剩实例名(没有菜单、也没有
|
||||
/// 说明那一行)。这个行为域正好是 M227 要重新设计的地方,这里只如实记录现状。
|
||||
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` 需要)。
|
||||
/// 同 [`panel`],但显式给「面板先保预算」这一档的标志(只有 `rows::content` 需要)。
|
||||
pub(super) fn panel_with<'a>(
|
||||
ui: &'a Ui,
|
||||
catalog: Catalog,
|
||||
@@ -141,7 +148,8 @@ pub(super) fn panel_with<'a>(
|
||||
let panel = container(content)
|
||||
.width(Length::Fill)
|
||||
.padding(Padding::from([ui.space(Space::X3), 0.0]));
|
||||
// 对半分档:面板吃满自己那一半,选项区的 `scrollable` 才有确定高度可吃。
|
||||
// 面板先保预算档:面板吃满自己那份(`rows/tail.rs::whole_rows` 之后剩下的高度),
|
||||
// 选项区的 `scrollable` 才有确定高度可吃。
|
||||
if shared {
|
||||
panel.height(Length::Fill).into()
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user