1 write to _viewport
aspire-tray (1)
src\Aspire.Tray\Common\TrayPanel.cs (1)
830
_viewport
= new(0, HeaderHeight + noticeHeight, Width, Math.Max(0, height - chrome));
33 references to _viewport
aspire-tray (33)
src\Aspire.Tray\Common\TrayPanel.cs (33)
139
return
_viewport
;
398
_scroll = Math.Clamp(before - deltaY, 0, Math.Max(0, _contentHeight -
_viewport
.Height));
509
if (bottom >
_viewport
.Bottom)
511
_scroll += Math.Min(bottom -
_viewport
.Bottom, Math.Max(0, top -
_viewport
.Y));
548
if (bottom >
_viewport
.Bottom)
550
_scroll += bottom -
_viewport
.Bottom;
552
if (top <
_viewport
.Y)
554
_scroll -=
_viewport
.Y - top;
627
else if (target.Bounds.Y <
_viewport
.Y)
629
_scroll -=
_viewport
.Y - target.Bounds.Y;
631
else if (target.Bounds.Bottom >
_viewport
.Bottom)
633
_scroll += target.Bounds.Bottom -
_viewport
.Bottom;
831
_scroll = Math.Clamp(_scroll, 0, Math.Max(0, _contentHeight -
_viewport
.Height));
832
var listOrigin =
_viewport
.Y - _scroll;
862
commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0,
_viewport
.Y, Width, 1)), palette.Separator));
867
commands.Add(new PushClipCommand(
_viewport
));
874
var sink = top + item.Height <=
_viewport
.Y || top >=
_viewport
.Bottom ? hidden : commands;
910
if (_contentHeight >
_viewport
.Height &&
_viewport
.Height > 0)
912
var thumb = Math.Max(24,
_viewport
.Height *
_viewport
.Height / _contentHeight);
913
var travel =
_viewport
.Height - thumb - 8;
914
var thumbY =
_viewport
.Y + 4 + travel * _scroll / (_contentHeight -
_viewport
.Height);
933
var clip = IsChrome(focused.Kind) ? panel :
_viewport
;
963
if (
_viewport
.Y > HeaderHeight)
966
Line(HeaderHeight + 8 + 17, "notice", new(0, HeaderHeight, Width,
_viewport
.Y - HeaderHeight));
989
if (top + item.Height <=
_viewport
.Y || top >=
_viewport
.Bottom)
1515
var hit = IsChrome(key.Kind) ? bounds : bounds.Intersect(
_viewport
);
1531
_accessible.Add(new(PanelAccessibleKey.For(label), PanelAccessibleRole.Text, text, bounds, chrome ? bounds : bounds.Intersect(
_viewport
)));