fix(app-iced): M157 r2 详情列加滚动区 + 启动参数卡对齐信息卡(D30 复审)
- 详情列(含卡片与动作行)套 scrollable:1180×1000 下被裁的内容可达、滚动条与左列同一套几何;右侧 X2 内缩,卡片描边不再被滚动条压住 - 启动参数卡改用 frame::card(card_padding 21 + OutlinedCard 描边),标题 LabelMedium 不加粗——与相邻信息卡同款 - 段间距 X3→X2,卡片不再比内容长 - 演示夹具补 Game arguments(--fullscreen) - presenter host 单测临时目录加序号(同一进程并行用例互删导致 flake)
This commit is contained in:
1 parent
e2021645d7
commit
c76a1437e6
5 files changed
+56
-23
No files matched your search
@@ -4,8 +4,8 @@
|
||||
//! → 一条分隔线 → 正文段 / 运行状态行 → 动作行(Duplicate / Open folder / Delete)。
|
||||
//! 窄窗(<840)时列表退成上一屏,本文件只画详情 + 一个「返回」按钮。
|
||||
|
||||
use iced::widget::{column, container, row};
|
||||
use iced::{Alignment, Element, Length};
|
||||
use iced::widget::{column, container, row, scrollable};
|
||||
use iced::{Alignment, Element, Length, Padding};
|
||||
|
||||
use unlucky_design::color::Role;
|
||||
use unlucky_design::spacing::Space;
|
||||
@@ -48,8 +48,13 @@ pub(super) fn detail_column<'a>(
|
||||
// M157:启动参数区在正文段之后、动作行之前(详情列 424px 内,卡片式)。
|
||||
body = body.push(super::launch_args::section(ui, &detail.launch, form, texts));
|
||||
|
||||
// 页头 + 元信息网格 + **一条**分隔线以下才是正文与操作区(M84 那两条线是占位时期的排版残留)
|
||||
frame::left_aligned(metrics.column, body.push(action_row(ui, forced, texts)))
|
||||
// 页头 + 元信息网格 + **一条**分隔线以下才是正文与操作区(M84 那两条线是占位时期的排版残留)。
|
||||
//
|
||||
// M157 r2(D30 复审):详情列的内容(正文段 + 启动参数卡 + 动作行)在 1180×1000 下**超出一屏**,
|
||||
// 而这里原来没有滚动区 ⇒ Max memory 以下的控件被静默裁掉、够不着。现在整列套一个滚动区
|
||||
// (与左列列表同一套滚动条样式与宽度),被裁内容可达;滚动条是唯一入口,没有第二份状态。
|
||||
let content = body.push(action_row(ui, forced, texts));
|
||||
frame::left_aligned(metrics.column, scroller(ui, content))
|
||||
}
|
||||
|
||||
pub(super) fn narrow_detail<'a>(
|
||||
@@ -89,7 +94,30 @@ pub(super) fn narrow_detail<'a>(
|
||||
ui.color(Role::OnSurfaceVariant),
|
||||
));
|
||||
|
||||
frame::body(metrics, body.push(action_row(ui, forced, texts)))
|
||||
frame::body(
|
||||
metrics,
|
||||
scroller(ui, body.push(action_row(ui, forced, texts))),
|
||||
)
|
||||
}
|
||||
|
||||
/// 详情列的滚动区(M157 r2):与左列列表同一套滚动条几何(宽 6 / 内缩 2 / 同一 `style`)。
|
||||
///
|
||||
/// 右侧留 `Space::X2` 内缩:滚动条是**覆盖**在内容上的,不留这条缝时卡片的 1dp 描边会被
|
||||
/// 滚动条压住(D30 复审里「卡片右边框缺一截」就是它)。
|
||||
fn scroller<'a>(ui: &'a Ui, content: impl Into<Element<'a, Message>>) -> Element<'a, Message> {
|
||||
let content = container(content)
|
||||
.width(Length::Fill)
|
||||
.padding(Padding::default().right(ui.space(Space::X2)));
|
||||
scrollable(content)
|
||||
.direction(scrollable::Direction::Vertical(
|
||||
scrollable::Scrollbar::new()
|
||||
.width(frame::SCROLLBAR_WIDTH)
|
||||
.scroller_width(frame::SCROLLBAR_WIDTH)
|
||||
.margin(frame::SCROLLBAR_MARGIN),
|
||||
))
|
||||
.height(Length::Fill)
|
||||
.style(frame::scroll_style(ui))
|
||||
.into()
|
||||
}
|
||||
|
||||
/// 正文段(演示数据才有)与运行状态行(真数据才有)——两者都是可选的,顺序固定。
|
||||
|
||||
Reference in new issue
Block a user