fix(app-iced): M75 r3 —— 禁用内容角色按 A1 改 OnSurfaceVariant + 两项语汇 + probe 双色护栏
A1 定案(本机 gradle 缓存 material3.aar + javap):
FilledButtonTokens.<clinit>: DisabledContainerColor=OnSurface, DisabledContainerOpacity=0.1f
DisabledIconColor/DisabledLabelTextColor=OnSurfaceVariant, 两者 Opacity=0.38f
OutlinedButtonTokens/TextButtonTokens: LabelTextColor=OnSurfaceVariant(12b §1.9 原本就对)
据此:
- interaction::disabled_content_over / disabled_colors 的内容角色从 OnSurface 改成
OnSurfaceVariant(α 仍取令牌 DISABLED_CONTENT_ALPHA=0.38);设计层 color::state::disabled_content()
用的是 OnSurface,与 A1 不符 —— 令牌线修好前这里按 A1 直接求值,已登记。
- content_color 的「底」按有无容器分开:有容器叠 12% 容器、无容器叠 surface(视觉 r2 P2-1)。
- probe 加第二条护栏:无容器三式的 38% 墨迹单独计数,避免只护住有容器那四式(code r2 p2-1)。
- gallery 样例图标改描边(Download + ChevronRight),并加单测钉「同控件不混用 Fill/Stroke」(P2-3)。
- 滚动条:透明轨 + OutlineVariant thumb(P2-4;宽度 10px 是 iced 内部常量,只能改颜色)。
- probe 文档修好被 //! 打断的命令、shot_path 注释归位、去掉空转的重复断言(P2-5)。
This commit is contained in:
1 parent
d075feb77d
commit
5fd1f3ca26
7 files changed
+118
-22
No files matched your search
@@ -109,6 +109,27 @@ fn icon_button_geometry_matches_the_reference() {
|
||||
);
|
||||
}
|
||||
|
||||
/// 视觉 reviewer P2-3:同一控件里不许混用填充字形与描边字形(线宽语汇会打架)。
|
||||
///
|
||||
/// gallery 的样例图标(前置/后置)必须同为 `IconPaint::Stroke`;允许实心字形,但只能作为
|
||||
/// 「主操作」单独出场的图标(例如播放键),不能与描边图标同处一颗按钮。
|
||||
#[test]
|
||||
fn sample_icons_never_mix_fill_and_stroke() {
|
||||
use unlucky_design::icons::IconPaint;
|
||||
|
||||
let sample = [IconKind::Download, IconKind::ChevronRight];
|
||||
for kind in sample {
|
||||
assert_eq!(
|
||||
kind.icon().paint,
|
||||
IconPaint::Stroke,
|
||||
"{} 是填充字形,不能和描边图标混在同一颗按钮里",
|
||||
kind.name()
|
||||
);
|
||||
}
|
||||
// 已知的实心字形(留档,下次有人拿它们当按钮图标时这条会提醒)
|
||||
assert_eq!(IconKind::Play.icon().paint, IconPaint::Fill);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn five_variants_have_distinct_colour_roles() {
|
||||
let mut seen = Vec::new();
|
||||
|
||||
Reference in new issue
Block a user