desktop tray: card as tall as its content, card and menu open from the tray icon's edge (never over the taskbar); menu permission files
This commit is contained in:
parent
6782ac6078
commit
da7ca48ab4
17 changed files with 185 additions and 26 deletions
|
|
@ -83,6 +83,17 @@ fn root_opens_away_from_the_taskbar_and_stays_inside() {
|
|||
assert_eq!(y, GAP);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tray_root_sits_just_above_the_icon_never_over_the_taskbar() {
|
||||
// icon in a bottom taskbar (the icon is below the work area): bottom edge exactly GAP above the icon's top
|
||||
let icon = Anchor::Tray { x: 1800.0, y: 1044.0, w: 32.0, h: 32.0 };
|
||||
let (_, y) = place_menu(icon, (260.0, 300.0), WORK);
|
||||
assert_eq!(y + 300.0, 1040.0 - GAP);
|
||||
// even when the reported work area wrongly includes the taskbar, the panel stays above the icon
|
||||
let (_, y) = place_menu(icon, (260.0, 300.0), (0.0, 0.0, 1920.0, 1080.0));
|
||||
assert!(y + 300.0 <= 1044.0 - GAP);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn submenus_open_beside_and_flip_left_at_the_edge() {
|
||||
let (x, _) = place_menu(Anchor::Beside { left: 1600.0, right: 1880.0, top: 100.0 }, (280.0, 200.0), WORK);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue