1 write to _viewport
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\TrayPanel.cs (1)
935_viewport = new(0, HeaderHeight + noticeHeight, Width, Math.Max(0, height - chrome));
32 references to _viewport
Aspire.Tray.Tests (32)
src\Aspire.Tray\Common\TrayPanel.cs (32)
145return _viewport; 392SetScrollOffset(_scroll + (y < thumb.Y ? -_viewport.Height : _viewport.Height)); 445_scroll = Math.Clamp(scroll, 0, Math.Max(0, _contentHeight - _viewport.Height)); 478trackTop = _viewport.Y + ScrollbarInset; 479trackHeight = _viewport.Height - 2 * ScrollbarInset; 480scrollRange = _contentHeight - _viewport.Height; 488var thumbHeight = Math.Min(trackHeight, Math.Max(ScrollbarMinimumThumbHeight, trackHeight * _viewport.Height / _contentHeight)); 592if (bottom > _viewport.Bottom) 594_scroll += Math.Min(bottom - _viewport.Bottom, Math.Max(0, top - _viewport.Y)); 631if (bottom > _viewport.Bottom) 633_scroll += bottom - _viewport.Bottom; 635if (top < _viewport.Y) 637_scroll -= _viewport.Y - top; 710else if (target.Bounds.Y < _viewport.Y) 712_scroll -= _viewport.Y - target.Bounds.Y; 714else if (target.Bounds.Bottom > _viewport.Bottom) 716_scroll += target.Bounds.Bottom - _viewport.Bottom; 936_scroll = Math.Clamp(_scroll, 0, Math.Max(0, _contentHeight - _viewport.Height)); 937var listOrigin = _viewport.Y - _scroll; 968commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, _viewport.Y, Width, 1)), palette.Separator)); 973commands.Add(new PushClipCommand(_viewport)); 980var sink = top + item.Height <= _viewport.Y || top >= _viewport.Bottom ? hidden : commands; 1036var clip = IsChrome(focused.Kind) ? panel : _viewport; 1066if (_viewport.Y > HeaderHeight) 1069Line(HeaderHeight + 8 + 17, "notice", new(0, HeaderHeight, Width, _viewport.Y - HeaderHeight)); 1092if (top + item.Height <= _viewport.Y || top >= _viewport.Bottom) 1625var hit = IsChrome(key.Kind) ? bounds : bounds.Intersect(_viewport); 1641_accessible.Add(new(PanelAccessibleKey.For(label), PanelAccessibleRole.Text, text, bounds, chrome ? bounds : bounds.Intersect(_viewport)));