1 write to _viewport
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\TrayPanel.cs (1)
807
_viewport
= new(0, HeaderHeight + noticeHeight, Width, Math.Max(0, height - chrome));
29 references to _viewport
Aspire.Tray.Tests (29)
src\Aspire.Tray\Common\TrayPanel.cs (29)
117
return
_viewport
;
376
_scroll = Math.Clamp(before - deltaY, 0, Math.Max(0, _contentHeight -
_viewport
.Height));
487
if (bottom >
_viewport
.Bottom)
489
_scroll += Math.Min(bottom -
_viewport
.Bottom, Math.Max(0, top -
_viewport
.Y));
526
if (bottom >
_viewport
.Bottom)
528
_scroll += bottom -
_viewport
.Bottom;
530
if (top <
_viewport
.Y)
532
_scroll -=
_viewport
.Y - top;
605
else if (target.Bounds.Y <
_viewport
.Y)
607
_scroll -=
_viewport
.Y - target.Bounds.Y;
609
else if (target.Bounds.Bottom >
_viewport
.Bottom)
611
_scroll += target.Bounds.Bottom -
_viewport
.Bottom;
808
_scroll = Math.Clamp(_scroll, 0, Math.Max(0, _contentHeight -
_viewport
.Height));
809
var listOrigin =
_viewport
.Y - _scroll;
839
commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0,
_viewport
.Y, Width, 1)), palette.Separator));
844
commands.Add(new PushClipCommand(
_viewport
));
851
var sink = top + item.Height <=
_viewport
.Y || top >=
_viewport
.Bottom ? hidden : commands;
887
if (_contentHeight >
_viewport
.Height &&
_viewport
.Height > 0)
889
var thumb = Math.Max(24,
_viewport
.Height *
_viewport
.Height / _contentHeight);
890
var travel =
_viewport
.Height - thumb - 8;
891
var thumbY =
_viewport
.Y + 4 + travel * _scroll / (_contentHeight -
_viewport
.Height);
910
var clip = IsChrome(focused.Kind) ? panel :
_viewport
;
1366
var hit = IsChrome(key.Kind) ? bounds : bounds.Intersect(
_viewport
);
1382
_accessible.Add(new(PanelAccessibleKey.For(label), PanelAccessibleRole.Text, text, bounds, chrome ? bounds : bounds.Intersect(
_viewport
)));