Windows 0.3.4 connection resilience and fixed-grid source delta; no private history or other platform changes

This commit is contained in:
2026-11-05 03:41:46 +00:00
parent aff1a50d35
commit 991b029b37
25 changed files with 629 additions and 96 deletions
+7 -4
View File
@@ -116,11 +116,14 @@ internal sealed class MetricCard : CardPanel
if(Height<S(40))
{
var speed=Glyph is DashboardIcon.Upload or DashboardIcon.Download;
using var denseFont=Brand.Font(speed?8.5f:7.5f,FontStyle.Bold);
using var denseFont=Brand.Font(8f,FontStyle.Bold);
var prefix=speed?(Glyph==DashboardIcon.Download?"↓ 下载":"↑ 上传"):Heading.Replace("代理流量", "");
TextRenderer.DrawText(g,$"{prefix} {ValueText} {UnitText}",denseFont,ClientRectangle,
Glyph==DashboardIcon.Download?Brand.DeepBlue:Brand.Navy,
ChartAxis.PaintFlags|TextFormatFlags.VerticalCenter|TextFormatFlags.HorizontalCenter|TextFormatFlags.SingleLine|TextFormatFlags.EndEllipsis);
var denseFlags=ChartAxis.PaintFlags|TextFormatFlags.VerticalCenter|TextFormatFlags.SingleLine|TextFormatFlags.NoPadding|TextFormatFlags.EndEllipsis;
var unitLeft=Width-S(40);
TextRenderer.DrawText(g,prefix,denseFont,new Rectangle(S(4),0,S(38),Height),Brand.Muted,denseFlags);
TextRenderer.DrawText(g,ValueText,denseFont,new Rectangle(S(44),0,Math.Max(1,unitLeft-S(48)),Height),Brand.Navy,denseFlags|TextFormatFlags.Right);
TextRenderer.DrawText(g,UnitText,denseFont,new Rectangle(unitLeft,0,S(36),Height),
Glyph==DashboardIcon.Download?Brand.Cyan:Brand.DeepBlue,denseFlags);
return;
}
var narrow = Width < S(180);