从窗口一侧盖上来的一块面板,页面仍然看得见。
安装
组件以源码分发。把它和它依赖的文件拷进你的项目,再按需要改:
cargo run --release --bin amenui -- add sheet --to ../my-app拷贝的文件: src/widgets/sheet.rs, src/widgets/mod.rs, src/widgets/button.rs
用法
use amenui::widgets::{sheet};
fn view() -> El<Msg> {
sheet("sh1", false, "筛选", 320.0, Msg::Nothing, text("条件", 13.0, Paint::TEXT))
}接口
| 函数 | sheet |
|---|---|
| 参数 | key, open, title, width, close, body. |
| 文件 | src/widgets/sheet.rs |
| 依赖 | base, button |
| 对波前的响应 | nudge (a control: pushed as one piece by fronts, held and condensing at most to Look::legible_cap) |
| 重组 | keyed labels recompose when their text changes |
键盘与无障碍
| 状态 | closed, open (modal: focus inside, Esc closes; the page beneath held a little loose). |
|---|---|
| 键盘与消息 | close on Esc, a press on the page beside it, or its close button. |
在网页上,每个控件都在页面里有一个带角色和名字的镜像元素,读屏软件和浏览器自己的焦点都看得到它(DESIGN.md §1.14)。