14 references to PanelGuideKind
Aspire.Tray.Tests (14)
Helpers\TrayPanelSvgRenderer.cs (4)
131
case
PanelGuideKind
.Column:
136
case
PanelGuideKind
.Center:
139
case
PanelGuideKind
.Baseline:
142
case
PanelGuideKind
.Box:
src\Aspire.Tray\Common\TrayPanel.cs (4)
959
_guides.Add(new(
PanelGuideKind
.Column, x, label, all));
969
_guides.Add(new(
PanelGuideKind
.Baseline, HeaderBaseline, "header baseline", new(TextLeft, 0, Width - TextLeft, HeaderHeight)));
1053
void Line(double y, string label, PanelRect bounds) => _guides.Add(new(
PanelGuideKind
.Center, y, label, bounds));
1054
void Box(PanelRect bounds, string label) => _guides.Add(new(
PanelGuideKind
.Box, bounds.CenterY, label, bounds));
src\Aspire.Tray\Common\TrayPanelScene.cs (1)
266
internal sealed record PanelGuide(
PanelGuideKind
Kind, double Position, string Label, PanelRect Bounds);
TrayPanelTests.cs (5)
875
Assert.True(lines.Any(guide => guide.Kind ==
PanelGuideKind
.Center && Math.Abs(guide.Position - capMiddle) < 0.01
876
|| guide.Kind ==
PanelGuideKind
.Baseline && Math.Abs(guide.Position - text.Baseline) < 0.01),
877
$"{name}: \"{text.Text}\" has its capitals centered at {capMiddle:F2}, on none of the lines {string.Join(", ", lines.Where(l => l.Kind !=
PanelGuideKind
.Column).Select(l => $"{l.Label} {l.Position}"))}");
888
var centers = scene.Guides.Where(guide => guide.Kind ==
PanelGuideKind
.Center).ToList();
905
foreach (var box in scene.Guides.Where(guide => guide.Kind ==
PanelGuideKind
.Box))