fix(iced/feedback): 复审 r3 的 A/B/D/E/F 项 + C 项待 rebase 后改 view_at
(先落一个中间提交,rebase main 之后再按 tower 的修正把空态图标改成 32/view_at)
This commit is contained in:
1 parent
5d9e75efd8
commit
a4cdd61fe5
12 files changed
+325
-108
No files matched your search
@@ -35,6 +35,7 @@ mod panels;
|
||||
use unlucky_design::color::{Role, SchemeFlavor};
|
||||
use unlucky_design::typography::Platform;
|
||||
|
||||
use super::geometry::PHASE_055;
|
||||
use super::pixel::{band_width, bands, matches, near, rgb, runs, shot_path, Shot};
|
||||
use crate::theme::{Families, Ui};
|
||||
|
||||
@@ -154,8 +155,9 @@ fn check_linear(shot: &Shot, ui: &Ui) {
|
||||
"12.4:phase 0.55 必须是**两段**(P1-A 修完才成立),实测 {found:?} @ 行 {row}"
|
||||
);
|
||||
|
||||
// A1 keyframes 手算:第二线 0.003..0.079、第一线 0.355..0.871(EmphasizedAccelerate)
|
||||
let expected = [(0.003_f32, 0.079_f32), (0.355, 0.871)];
|
||||
// 期望位置与单测**共用同一个常量**(`geometry::PHASE_055`):早先这里写 0.871、单测写
|
||||
// 0.860,实测 963 距 want_end 966.7 只剩 0.28px,靠容差活着(复审 B)。
|
||||
let expected = PHASE_055;
|
||||
for (index, (start, len)) in found.iter().enumerate() {
|
||||
let want_start = TRACK3_X0 as f32 + expected[index].0 * TRACK3_W as f32;
|
||||
let want_end = TRACK3_X0 as f32 + expected[index].1 * TRACK3_W as f32;
|
||||
@@ -262,7 +264,41 @@ fn check_snackbar(shot: &Shot, ui: &Ui) {
|
||||
"14.6:动作标签应是 InversePrimary(实测该色只有 {action_pixels} px)"
|
||||
);
|
||||
|
||||
// ---- 位置语义(复审 D):两条 bottom 条的**条底距取景框底 = 12** ---------------
|
||||
//
|
||||
// 取景框是 gallery 给窄宿主画的 1px `OutlineVariant` 边(`framed_host`):透明宿主没有
|
||||
// 可见底边时「贴底」在像素上不可证(旧宿主 72 = 48 + 2×12,上下留白相等)。
|
||||
let frame = rgb(ui.color(Role::OutlineVariant));
|
||||
let mut margins: Vec<usize> = Vec::new();
|
||||
for (top, bottom) in &found {
|
||||
let width = band_width(shot, (*top, *bottom), bar, surface);
|
||||
if !(near(width, 300) || near(width, 344)) {
|
||||
continue;
|
||||
}
|
||||
let frame_row = ((bottom + 1)..shot.height)
|
||||
.find(|y| {
|
||||
(0..shot.width)
|
||||
.filter(|x| matches(shot.at(*x, *y), frame))
|
||||
.count()
|
||||
>= 200
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
panic!("D:窄条下方没找到宿主取景框(条 y {top}..{bottom},宽 {width})")
|
||||
});
|
||||
margins.push(frame_row - bottom);
|
||||
}
|
||||
assert!(
|
||||
!margins.is_empty(),
|
||||
"D:应至少量到一条 bottom 条的宿主边距,实测 {margins:?}"
|
||||
);
|
||||
for margin in &margins {
|
||||
assert!(
|
||||
near(*margin, 12),
|
||||
"D:贴底 ⇒ 条底距宿主底 12(官方外边距),实测 {margin}:{margins:?}"
|
||||
);
|
||||
}
|
||||
|
||||
eprintln!(
|
||||
"[feedback-probe] snackbar:宽度集 {widths:?} · 高度集 {heights:?} · InversePrimary {action_pixels}px"
|
||||
"[feedback-probe] snackbar:宽度集 {widths:?} · 高度集 {heights:?} · InversePrimary {action_pixels}px · 底边距 {margins:?}"
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user