Windows 0.3.3 dashboard layout and speed presentation source delta; no private history or other platform changes
This commit is contained in:
@@ -7,21 +7,37 @@ internal sealed partial class MainForm
|
||||
{
|
||||
var checks = new Dictionary<string, bool>();
|
||||
var originalSize = ClientSize;
|
||||
ClientSize = new Size(ScaleLogical(480), ScaleLogical(360));
|
||||
SetTailnetTrafficVisibility(true);
|
||||
SetNodeTrafficPermission(true);
|
||||
LayoutDashboard();
|
||||
checks["proxy_speed_row_spans_dashboard"] = _trafficCard.Left == _statusCard.Left
|
||||
&& _trafficCard.Width == _statusCard.Width;
|
||||
checks["cumulative_strip_keeps_plot_space"] = _dailyCard.Height <= ScaleLogical(40)
|
||||
&& _trafficChart.Width >= ScaleLogical(340) && _speedTrendCard.Height >= ScaleLogical(45);
|
||||
UpdateConnectedTransportPresentation(true);
|
||||
DisplayTraffic(1024, 2048, "已计入代理总流量");
|
||||
checks["proxy_total_always_includes_tailnet_stream"] = _uploadMetric.ValueText == "1.0"
|
||||
&& _downloadMetric.ValueText == "2.0";
|
||||
SetNodeTrafficPermission(false);
|
||||
foreach (var size in new[] { new Size(480, 360), new Size(900, 360), new Size(960, 720), new Size(620, 550), new Size(900, 640) })
|
||||
{
|
||||
ClientSize = new Size(ScaleLogical(size.Width), ScaleLogical(size.Height));
|
||||
SetTailnetTrafficVisibility(false); LayoutDashboard();
|
||||
var baseline = (_trafficCard.Bounds, _dailyCard.Bounds, _footer.Bounds, _dashboardBody.Size);
|
||||
checks[$"no_tailnet_single_left_{size.Width}"] = !_tailnetTrafficCard.Visible
|
||||
&& _trafficCard.Top == _dailyCard.Top && _speedTrendCard.Bottom == _dailyCard.Bottom;
|
||||
&& _trafficCard.Width == _statusCard.Width && _speedTrendCard.Top > _dailyCard.Bottom;
|
||||
SetTailnetTrafficVisibility(true);
|
||||
checks[$"tailnet_only_subdivides_left_{size.Width}"] = _tailnetTrafficCard.Left == _trafficCard.Left
|
||||
&& _tailnetTrafficCard.Width == _trafficCard.Width && _tailnetTrafficCard.Top > _trafficCard.Bottom
|
||||
&& _dailyCard.Top == _trafficCard.Top && _dailyCard.Bottom == _speedTrendCard.Bottom;
|
||||
checks[$"tailnet_never_increases_page_{size.Width}"] = _dailyCard.Bounds == baseline.Item2
|
||||
&& _footer.Bounds == baseline.Item3 && _dashboardBody.Size == baseline.Item4
|
||||
&& _dailyCard.Top > _tailnetTrafficCard.Bottom && _speedTrendCard.Top > _dailyCard.Bottom;
|
||||
checks[$"tailnet_never_increases_page_{size.Width}"] = _footer.Bounds == baseline.Item3 && _dashboardBody.Size == baseline.Item4
|
||||
&& !_dashboardScrollBar.Visible && _dashboardBody.Location == Point.Empty;
|
||||
checks[$"all_card_controls_fit_{size.Width}"] = DashboardControlsFit();
|
||||
using(var headingGraphics=_nodeCard.CreateGraphics())
|
||||
checks[$"dense_headings_remain_complete_when_resized_{size.Width}"] = new[]
|
||||
{ _nodeHeading, _routeHeading, _actualModeHeading, _trafficHeading, _dailyHeading }
|
||||
.All(label=>TextRenderer.MeasureText(headingGraphics,label.Text,label.Font,Size.Empty,TextFormatFlags.SingleLine).Width<=label.Width);
|
||||
SetTailnetTrafficVisibility(false);
|
||||
checks[$"tailnet_hide_restores_geometry_{size.Width}"] = _trafficCard.Bounds == baseline.Item1
|
||||
&& _dailyCard.Bounds == baseline.Item2 && _footer.Bounds == baseline.Item3;
|
||||
@@ -41,7 +57,7 @@ internal sealed partial class MainForm
|
||||
DisplayTailnetTraffic(12345, 67890, "独立 UI 样本");
|
||||
checks["tailnet_never_double_counts_session_or_curve"] = session == (_sessionUp, _sessionDown)
|
||||
&& _trafficChart.PointCount == curveCount;
|
||||
checks["tailnet_values_are_independent_controls"] = _tailnetUploadMetric.ValueText == "12.06"
|
||||
checks["tailnet_values_are_independent_controls"] = _tailnetUploadMetric.ValueText == "12.1"
|
||||
&& _tailnetDownloadMetric.ValueText == "66.3" && _uploadMetric.ValueText == proxyValue;
|
||||
checks["tailnet_scope_and_already_accounted_are_explicit"] = _tailnetSampleLabel.Text.StartsWith("仅纵横家链路 · ")
|
||||
&& _tailnetUploadMetric.Hint == "已计入代理总流量";
|
||||
@@ -60,13 +76,13 @@ internal sealed partial class MainForm
|
||||
UpdateConnectedTransportPresentation(true);
|
||||
DisplayTraffic(1024, 2048, "互斥入口样本");
|
||||
DisplayTailnetTraffic(1024, 2048, "互斥入口样本");
|
||||
checks["tailnet_sample_is_not_duplicated_as_public_speed"] = _uploadMetric.ValueText == "—"
|
||||
&& _downloadMetric.ValueText == "—" && _uploadMetric.Hint == "未使用公网入口"
|
||||
&& _tailnetUploadMetric.ValueText == "1" && _tailnetDownloadMetric.ValueText == "2";
|
||||
checks["tailnet_sample_remains_in_overall_proxy_total"] = _uploadMetric.ValueText == "1.0"
|
||||
&& _downloadMetric.ValueText == "2.0" && _tailnetUploadMetric.ValueText == "1.0"
|
||||
&& _tailnetDownloadMetric.ValueText == "2.0" && session == (_sessionUp, _sessionDown);
|
||||
checks["actual_tailnet_transport_shows_section"] = _currentNodeUsesTailnet && _tailnetTrafficVisible;
|
||||
UpdateConnectedTransportPresentation(false);
|
||||
DisplayTraffic(3072, 4096, "公网样本");
|
||||
checks["public_sample_uses_only_public_speed_section"] = _uploadMetric.ValueText == "3" && _downloadMetric.ValueText == "4";
|
||||
checks["public_sample_uses_only_public_speed_section"] = _uploadMetric.ValueText == "3.0" && _downloadMetric.ValueText == "4.0";
|
||||
checks["public_transport_hides_section"] = !_currentNodeUsesTailnet && !_tailnetTrafficVisible;
|
||||
using var curve = new TrafficChart();
|
||||
var end = DateTimeOffset.Now;
|
||||
|
||||
Reference in New Issue
Block a user