56 references to Width
Aspire.Tray.Tests (56)
LinuxTrayTests.cs (3)
102
Assert.Equal(new PanelRect(x, y, TrayPanel.
Width
, 180), bounds);
110
Assert.Equal(new PanelRect(-1080, 34, TrayPanel.
Width
, 300), bounds);
146
Assert.Equal(TrayPanel.
Width
* scale, bounds.Width);
src\Aspire.Tray\Common\TrayPanel.cs (37)
66
public const double TrailingCenter =
Width
- LeadingCenter;
379
&& x >=
Width
- ScrollbarHitAreaWidth && x <=
Width
491
thumb = new(
Width
- 7, thumbTop, 4, thumbHeight);
935
_viewport = new(0, HeaderHeight + noticeHeight,
Width
, Math.Max(0, height - chrome));
941
var panel = new PanelRect(0, 0,
Width
, height);
942
var footer = new PanelRect(0, height - FooterHeight,
Width
, FooterHeight);
945
commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, footer.Y,
Width
, 1)), palette.Separator));
948
commands.Add(new FillPathCommand(PanelPath.RoundedRect(new(0, 0,
Width
, HeaderHeight), CornerRadius, CornerRadius, 0, 0), palette.Gutter));
949
commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, HeaderHeight - 1,
Width
, 1)), palette.Separator));
968
commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, _viewport.Y,
Width
, 1)), palette.Separator));
1043
return new(
Width
, height, commands, targets, accessible) { Guides = _guides };
1054
var all = new PanelRect(0, 0,
Width
, height);
1058
(TrailingCenter, "trailing center"), (
Width
- EdgeMargin, "edge"), (RowContentRight, "button edge"),
1059
(
Width
- RowInset, "row/card edge")
1065
Line(HeaderHeight / 2, "header", new(0, 0,
Width
, HeaderHeight));
1069
Line(HeaderHeight + 8 + 17, "notice", new(0, HeaderHeight,
Width
, _viewport.Y - HeaderHeight));
1072
_guides.Add(new(PanelGuideKind.Baseline, HeaderBaseline, "header baseline", new(TextLeft, 0,
Width
- TextLeft, HeaderHeight)));
1082
Line(footerTop + FooterHeight / 2, "footer", new(0, footerTop,
Width
, FooterHeight));
1096
var span = new PanelRect(0, top,
Width
, item.Height);
1124
Line(middle, "action", new(0, itemTop,
Width
, ActionItemHeight));
1151
Box(new(
Width
/ 2 - 16, top + 20, 32, 32), "empty art");
1160
private const double NoticeTextWidth =
Width
- EdgeMargin - TextLeft;
1187
var statusBounds = new PanelRect(statusLeft, middle - 8,
Width
- EdgeMargin - statusLeft, 16);
1200
var banner = new PanelRect(RowInset, compact ? HeaderHeight : HeaderHeight + 8,
Width
- 2 * RowInset, height);
1226
var art = new PanelRect(
Width
/ 2 - 16, top + 20, 32, 32);
1235
var titleBounds = new PanelRect(20, top + 62,
Width
- 40, 20);
1236
var hintBounds = new PanelRect(44, top + 84,
Width
- 88, 34);
1263
var toggle = new PanelRect(RowInset, top + 4,
Width
- 2 * RowInset, 24);
1286
var row = new PanelRect(RowInset, top + 2,
Width
- 2 * RowInset, RowHeight - 4);
1304
:
Width
- EdgeMargin;
1404
var card = new PanelRect(RowInset, top,
Width
- 2 * RowInset, height - ActionListGap);
1476
var card = new PanelRect(RowInset, top + 4,
Width
- 2 * RowInset, ConfirmHeight - 8);
1535
var title = new PanelRect(TextLeft, (HeaderHeight - 20) / 2,
Width
- EdgeMargin - TextLeft, 20);
1543
var row = new PanelRect(RowInset, top + 2,
Width
- 2 * RowInset, SettingsRowHeight - 4);
1569
var name = new PanelRect(20, top + 4,
Width
- 40, 20);
1579
var bounds = new PanelRect(20, y,
Width
- 40, 16);
src\Aspire.Tray\Linux\LinuxTrayPanel.cs (2)
430
if (workarea.Width < (TrayPanel.
Width
+ 8) * _scale
468
var width = TrayPanel.
Width
* scale;
TrayPanelTests.cs (14)
74
Assert.Equal(TrayPanel.
Width
, scene.Width);
141
Assert.Equal(TrayPanel.
Width
- TrayPanel.EdgeMargin - TrayPanel.TextLeft, nameText.Bounds.Width);
142
Assert.Equal(TrayPanel.
Width
- TrayPanel.EdgeMargin - TrayPanel.TextLeft, detailText.Bounds.Width);
155
Assert.Equal(TrayPanel.
Width
- TrayPanel.EdgeMargin - TrayPanel.TextLeft, nameText.Bounds.Width);
529
var x = TrayPanel.
Width
- 5;
543
var x = TrayPanel.
Width
- 5;
558
var x = TrayPanel.
Width
- 5;
576
var x = TrayPanel.
Width
- 5;
1028
row => Assert.True(row.Bounds.X == TrayPanel.RowInset && row.Bounds.Right == TrayPanel.
Width
- TrayPanel.RowInset, $"{name}: {row.Key} at {row.Bounds}"));
1061
Assert.Equal(TrayPanel.
Width
- TrayPanel.EdgeMargin, status.Bounds.Right);
1080
Assert.Contains(gutters, bounds => Near(bounds, new(0, 0, TrayPanel.
Width
, TrayPanel.HeaderHeight)));
1081
Assert.Contains(gutters, bounds => Near(bounds, new(0, scene.Height - TrayPanel.FooterHeight, TrayPanel.
Width
, TrayPanel.FooterHeight)));
1084
Assert.Contains(new PanelRect(0, TrayPanel.HeaderHeight - 1, TrayPanel.
Width
, 1), separators);
1085
Assert.Contains(new PanelRect(0, scene.Height - TrayPanel.FooterHeight, TrayPanel.
Width
, 1), separators);