fix(editor): align text-align toggle hit rects with paint + refresh stale tests
Codex/multi-agent review found the text h/v-align ToggleGroup hit rects sat 14px (LH_LS_LABEL_H) above where they paint: text_action_rects omitted the 行高/字间距 caption row that paint_text_section and push_text_input_rects both include, so the bottom half of each align toggle was a dead zone and the band above misfired. Add the missing LH_LS_LABEL_H term. Also refresh two tests left stale by the jian Button migration (kit-dropdown pressed-feedback radius 4→6; code Export-bundle hover wash now jian Ghost's button_hover, not a boosted alpha).
This commit is contained in:
parent
f3e7a149ef
commit
8a8c97f90a
|
|
@ -707,7 +707,7 @@ mod tests {
|
|||
.round_fills
|
||||
.iter()
|
||||
.any(|(fill, radius, color)| *fill == dropdown
|
||||
&& *radius == 4.0
|
||||
&& *radius == 6.0
|
||||
&& *color == expected),
|
||||
"pressed kit dropdown should paint shared pressed feedback"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ fn idle_bundle_hover_paints_neutral_feedback() {
|
|||
.iter()
|
||||
.any(|(r, c)| rect_eq(*r, bundle_rect)
|
||||
&& !color_eq(*c, theme.muted)
|
||||
&& c.a > theme.button_hover.a + 0.01),
|
||||
"hovered borderless Export AI Bundle should paint a visible wash over the transparent button"
|
||||
&& color_eq(*c, theme.button_hover)),
|
||||
"hovered borderless Export AI Bundle should paint jian Ghost's button_hover wash over the transparent button"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ pub fn text_action_rects(x0: f32, y: f32, usable_w: f32) -> Vec<(PropertyPanelAc
|
|||
+ FAMILY_ROW_GAP
|
||||
+ INPUT_HEIGHT
|
||||
+ 6.0
|
||||
// The 行高/字间距 caption row sits between the weight/size row and the
|
||||
// LH/LS inputs — paint_text_section + push_text_input_rects both
|
||||
// include it, so the align-row hit anchor must too (else the align
|
||||
// ToggleGroup hit rects drift 14px above where they paint).
|
||||
+ LH_LS_LABEL_H
|
||||
+ INPUT_HEIGHT
|
||||
+ 8.0
|
||||
+ ALIGN_LABEL_H;
|
||||
|
|
|
|||
Loading…
Reference in a new issue