UI: leave no gap between the rows of a menu
The app's item spacing left 4 px between two menu entries where neither highlighted and a click did nothing. Menus (context menus, the menu bar, menu buttons and their submenus) now use a menu style with no row gap and rows taller by that gap, so they keep their size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
afaa4bdeeb
@@ -195,3 +195,17 @@ fn timeline_property_names_have_the_property_menu() {
|
||||
choose(&mut h, scale, "editValue");
|
||||
assert_eq!(h.state().dialog, Some(Dialog::Form));
|
||||
}
|
||||
|
||||
/// The rows of a context menu touch: a gap between two entries highlighted neither and
|
||||
/// swallowed a click there.
|
||||
#[test]
|
||||
fn context_menu_rows_leave_no_gap_between_them() {
|
||||
let mut h = harness();
|
||||
let p = rect(&h, "project.empty").center();
|
||||
right_click(&mut h, p);
|
||||
let rows = ["newComp", "newFolder", "import"].map(|key| rect(&h, &format!("project.context.{key}")));
|
||||
for pair in rows.windows(2) {
|
||||
assert!((pair[1].top() - pair[0].bottom()).abs() < 0.5, "gap between {:?} and {:?}", pair[0], pair[1]);
|
||||
}
|
||||
snapshot(&mut h, "project-rows");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user