已落地:
- components/{mod,interaction,layout,divider,gate}.rs + buttons/{mod,geometry,assemble,tests}.rs
- gallery/{mod,buttons,probe,scan}.rs + 四个家族桩(selection/inputs/feedback/navigation)
- cli.rs: --screen=shell|gallery + capture_flavor(截图默认 Light,删掉等系统主题的闸门)
- app.rs: gallery 路由 + DemoMessage 接线(400 行)
待办(下一个 commit):编译/测试全绿、浅深矩阵出图、1:1 并排与数值表。
35 lines
1.5 KiB
Rust
35 lines
1.5 KiB
Rust
//! **反馈类家族(桩)**:由后续 mission 填充(§12 Progress / §14 Snackbar / §7 Dialog / §15 EmptyState)。
|
||
//!
|
||
//! 本文件目前只有占位 `demo()`。**后续 mission 只写本目录内的文件,不改 `components/mod.rs`**:
|
||
//! 家族模块已经在 `mod.rs` 里声明好,`gallery/feedback.rs` 也已经在 `gallery/mod.rs` 里声明好,
|
||
//! 所以「加组件」不需要碰任何共享文件(D39 §1 的并行地基)。
|
||
//!
|
||
//! 填充时请照抄按钮家族的分层:
|
||
//!
|
||
//! - 几何进 `feedback/geometry.rs`(数值从 `Space` / `ShapeScale` / `LayoutMetrics` 取,
|
||
//! 缺令牌登记 G 编号——Dialog 的 280/560 宽、Snackbar 的 48/68 高目前都还没有令牌);
|
||
//! - 状态层只能走 [`crate::app::components::interaction`];
|
||
//! - Dialog/Snackbar 是**浮层**:阴影只在这两处允许(rubric K3),且单层。
|
||
|
||
use iced::widget::{container, text};
|
||
use iced::Element;
|
||
|
||
use unlucky_design::color::Role;
|
||
use unlucky_design::spacing::Space;
|
||
use unlucky_design::typography::TypeRole;
|
||
|
||
use crate::theme::Ui;
|
||
|
||
/// 占位 demo(ASCII 文案,理由同 `selection::demo`)。
|
||
pub fn demo<'a, M: 'a>(ui: &'a Ui) -> Element<'a, M> {
|
||
let style = ui.style(TypeRole::BodySmall);
|
||
container(
|
||
text("feedback · progress / snackbar / dialog / empty state — pending")
|
||
.size(style.size_px)
|
||
.font(ui.font_of(style))
|
||
.color(ui.color(Role::OnSurfaceVariant)),
|
||
)
|
||
.padding(ui.space(Space::X2))
|
||
.into()
|
||
}
|