34 references to CenterY
Aspire.Tray.Tests (34)
LinuxTrayTests.cs (2)
165
var (x, y) = LinuxTrayPanel.ToPanelPoint(panel, geometry, control.CenterX, control.
CenterY
, scale);
168
Assert.Equal(target.
CenterY
, y, precision: 10);
src\Aspire.Tray\Common\TrayPanel.cs (3)
1157
void Box(PanelRect bounds, string label) => _guides.Add(new(PanelGuideKind.Box, bounds.
CenterY
, label, bounds));
1208
var iconY = compact ? banner.
CenterY
- 8 : banner.Y + 9;
1211
? new PanelRect(TextLeft, banner.
CenterY
- 9, NoticeTextWidth, 18)
src\Aspire.Tray\Common\TrayPanelScene.cs (1)
85
public double Baseline => ExplicitBaseline ?? Bounds.
CenterY
+ PanelFonts.CapHeight(Font) / 2;
src\Aspire.Tray\Common\WindowsTrayPanelPlacement.cs (1)
34
var y = Math.Clamp(anchor.
CenterY
- height / 2, top, bottom);
src\Aspire.Tray\Linux\LinuxPlasmaAnchor.cs (3)
60
if (!native.Contains(anchor.CenterX, anchor.
CenterY
))
91
+ Math.Pow(candidate.Bounds.
CenterY
- point.Y, 2));
92
if (Math.Abs(nearest.Bounds.CenterX - point.X) <= 4 && Math.Abs(nearest.Bounds.
CenterY
- point.Y) <= 4)
TrayPanelTests.cs (24)
144
Assert.True(panel.PointerMoved(row.HitBounds.X + 10, row.HitBounds.
CenterY
).Redraw);
462
panel.PointerDown(stop.HitBounds.CenterX, stop.HitBounds.
CenterY
);
463
var response = panel.PointerUp(more.HitBounds.CenterX, more.HitBounds.
CenterY
);
475
panel.PointerDown(stop.HitBounds.CenterX, stop.HitBounds.
CenterY
);
478
var response = panel.PointerUp(stop.HitBounds.CenterX, stop.HitBounds.
CenterY
);
493
Assert.True(panel.PointerMoved(row.HitBounds.X + 10, row.HitBounds.
CenterY
).Redraw);
495
Assert.False(panel.PointerMoved(row.HitBounds.X + 11, row.HitBounds.
CenterY
).Redraw);
978
var lines = scene.Guides.Where(guide => guide.Bounds.Contains(text.Bounds.CenterX, text.Bounds.
CenterY
)).ToList();
1006
Assert.True(centers.Any(guide => guide.Bounds.Contains(button.Bounds.CenterX, button.Bounds.
CenterY
) && guide.Position == button.Bounds.
CenterY
),
1007
$"{name}: {button.Key} is centered at y {button.Bounds.
CenterY
}, on no line");
1051
&& bounds.
CenterY
< TrayPanel.HeaderHeight);
1054
Assert.Equal(TrayPanel.HeaderHeight / 2, logo.Bounds.
CenterY
);
1060
Assert.Equal(status.Baseline - PanelFonts.CapHeight(PanelFontRole.Body) / 2, dot.Path.GetControlBounds().
CenterY
, 3);
1091
Assert.All(header, text => Assert.Equal(middle, text.Bounds.
CenterY
));
1094
back => Assert.Equal(middle, back.Bounds.
CenterY
));
1095
Assert.All(scene.Targets.TakeLast(3), button => Assert.Equal(scene.Height - TrayPanel.FooterHeight / 2, button.Bounds.
CenterY
));
1109
Assert.Equal(title.Bounds.
CenterY
, status.Bounds.
CenterY
);
1263
var fill = panel.Scene.Commands.OfType<FillPathCommand>().Last(fill => fill.Path.GetControlBounds().Contains(accept.Bounds.CenterX, accept.Bounds.
CenterY
)
1408
panel.PointerMoved(row.Bounds.X + 40, row.Bounds.
CenterY
);
1594
panel.PointerMoved(x, bounds.
CenterY
);
1595
panel.PointerDown(x, bounds.
CenterY
);
1596
return panel.PointerUp(x, bounds.
CenterY
);