Publish Zonghengjia Windows 0.3.18 client source
This commit is contained in:
+30
-21
@@ -6,8 +6,8 @@ internal sealed partial class MainForm
|
||||
private bool WideDashboardPresentation => ClientSize.Width >= ScaleLogical(840) && ClientSize.Height >= ScaleLogical(480);
|
||||
private bool CompactPresentation => !WideDashboardPresentation;
|
||||
private readonly Font _compactStatusFont=Brand.Font(9.5f,FontStyle.Bold);
|
||||
private readonly Font _wideStatusFont=Brand.Font(20f,FontStyle.Bold);
|
||||
private readonly Font _denseStatusFont=Brand.Font(16f,FontStyle.Bold);
|
||||
private readonly Font _wideStatusFont=Brand.Font(17f,FontStyle.Bold);
|
||||
private readonly Font _denseStatusFont=Brand.Font(15f,FontStyle.Bold);
|
||||
private readonly Font _wideChartFont=Brand.Font(9f);
|
||||
private readonly Font _compactChartFont=Brand.Font(7.5f);
|
||||
private readonly Font _compactFieldFont=Brand.Font(7.5f, FontStyle.Bold);
|
||||
@@ -80,7 +80,7 @@ internal sealed partial class MainForm
|
||||
LayoutWindowChrome();
|
||||
if (_welcomeLabel.Parent == _brandHeader)
|
||||
{
|
||||
_welcomeLabel.Visible=_dashboardView.Visible;
|
||||
_welcomeLabel.Visible=false;
|
||||
_logoutButton.Visible=_dashboardView.Visible;
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,8 @@ internal sealed partial class MainForm
|
||||
{
|
||||
_welcomeLabel.Parent=_brandHeader;
|
||||
_logoutButton.Parent=_brandHeader;
|
||||
_welcomeLabel.Visible=_logoutButton.Visible=_dashboardView.Visible;
|
||||
_welcomeLabel.Visible=false;
|
||||
_logoutButton.Visible=_dashboardView.Visible;
|
||||
LayoutCompactDashboardActions();
|
||||
_accountLabel.Visible=_identityBadge.Visible=false;
|
||||
}
|
||||
@@ -141,19 +142,19 @@ internal sealed partial class MainForm
|
||||
_nodeIcon.Visible=_modeIcon.Visible=false;
|
||||
_scheduleBadge.Visible=false;
|
||||
var leftWidth=_modeCard.Left-S(8);
|
||||
_selectionHeading.Bounds=R(10,1,34,20);
|
||||
_routeHeading.Bounds=R(10,23,34,20);
|
||||
_selectionHeading.Bounds=R(10,2,34,20);
|
||||
_routeHeading.Bounds=R(10,22,34,20);
|
||||
_routeHeading.Text="模式";
|
||||
var fieldLeft=S(46); var fieldWidth=leftWidth-fieldLeft;
|
||||
var fieldLeft=S(44); var fieldWidth=leftWidth-fieldLeft;
|
||||
var splitWidth=Math.Max(S(84),(fieldWidth-S(4))/2);
|
||||
_connectionModeCombo.Bounds=new(fieldLeft,S(1),_manualNodeCombo.Visible?splitWidth:fieldWidth,S(20));
|
||||
_manualNodeCombo.Bounds=new(_connectionModeCombo.Right+S(4),S(1),Math.Max(S(60),fieldWidth-splitWidth-S(4)),S(20));
|
||||
_routeCombo.Bounds=new(fieldLeft,S(23),fieldWidth,S(20));
|
||||
_connectionModeCombo.Bounds=new(fieldLeft,S(2),_manualNodeCombo.Visible?splitWidth:fieldWidth,S(20));
|
||||
_manualNodeCombo.Bounds=new(_connectionModeCombo.Right+S(4),S(2),Math.Max(S(60),fieldWidth-splitWidth-S(4)),S(20));
|
||||
_routeCombo.Bounds=new(fieldLeft,S(22),fieldWidth,S(20));
|
||||
_nodeHeading.Text="节点";
|
||||
_nodeHeading.Bounds=R(8,1,34,20);
|
||||
_currentNodeLabel.Bounds=new(S(44),S(1),_modeCard.Width-S(46),S(20));
|
||||
_actualModeHeading.Bounds=R(8,23,34,20);
|
||||
_routeReadOnly.Bounds=new(S(44),S(23),_modeCard.Width-S(46),S(20));
|
||||
_nodeHeading.Bounds=R(10,2,34,20);
|
||||
_currentNodeLabel.Bounds=new(fieldLeft,S(2),_modeCard.Width-fieldLeft-S(2),S(20));
|
||||
_actualModeHeading.Bounds=R(10,22,34,20);
|
||||
_routeReadOnly.Bounds=new(fieldLeft,S(22),_modeCard.Width-fieldLeft-S(2),S(20));
|
||||
foreach(var label in new[]{_selectionHeading,_routeHeading,_nodeHeading,_actualModeHeading,_currentNodeLabel})
|
||||
{ label.TextAlign=ContentAlignment.MiddleLeft; label.Padding=Padding.Empty; }
|
||||
_selectionHeading.Font = _routeHeading.Font = _nodeHeading.Font = _actualModeHeading.Font = _compactFieldFont;
|
||||
@@ -170,17 +171,25 @@ internal sealed partial class MainForm
|
||||
_tailnetUploadMetric.Bounds=_uploadMetric.Bounds;
|
||||
_tailnetDownloadMetric.Bounds=_downloadMetric.Bounds;
|
||||
}
|
||||
_trendHeading.Text="本机代理趋势 · "+(_selectionUiConnected?(_currentNodeUsesTailnet?"Tailscale":"公网入口"):"未连接");
|
||||
_trendHeading.Bounds=new(S(10),S(2),_speedTrendCard.Width-S(120),S(18));
|
||||
_trendHeading.Text = !_selectionUiConnected ? "本机代理趋势" :
|
||||
_currentNodeUsesTailnet ? "代理趋势 · Tailscale" : "代理趋势 · 公网入口";
|
||||
var headerTop = S(2);
|
||||
var headerHeight = S(20);
|
||||
var inset = S(10);
|
||||
var headingWidth = S(116);
|
||||
var rangeWidth = S(78);
|
||||
var rangeLeft = _speedTrendCard.Width - rangeWidth - inset;
|
||||
_trendHeading.Bounds = new(inset, headerTop, headingWidth, headerHeight);
|
||||
_trendHeading.TextAlign=ContentAlignment.MiddleLeft;
|
||||
_historyRangeCombo.Bounds=new(_speedTrendCard.Width-S(98),S(2),S(88),S(18));
|
||||
var legendWidth = Math.Max(S(90), (_speedTrendCard.Width - S(118)) / 2);
|
||||
_uploadLegend.Bounds=new(S(10),S(20),legendWidth,S(16));
|
||||
_downloadLegend.Bounds=new(_uploadLegend.Right,S(20),legendWidth,S(16));
|
||||
_historyRangeCombo.Bounds = new(rangeLeft, headerTop, rangeWidth, headerHeight);
|
||||
var legendLeft = _trendHeading.Right + S(4);
|
||||
var legendWidth = Math.Max(1, (rangeLeft - S(5) - legendLeft) / 2);
|
||||
_uploadLegend.Bounds = new(legendLeft, headerTop, legendWidth, headerHeight);
|
||||
_downloadLegend.Bounds = new(_uploadLegend.Right, headerTop, legendWidth, headerHeight);
|
||||
_uploadLegend.TextAlign=_downloadLegend.TextAlign=ContentAlignment.MiddleLeft;
|
||||
_uploadLegend.Visible=_downloadLegend.Visible=true;
|
||||
_trafficChart.Font=_compactChartFont;
|
||||
_trafficChart.Bounds=new(S(8),S(36),_speedTrendCard.Width-S(16),Math.Max(S(22),_speedTrendCard.Height-S(40)));
|
||||
_trafficChart.Bounds = new(S(8), S(23), _speedTrendCard.Width - S(16), Math.Max(1, _speedTrendCard.Height - S(27)));
|
||||
_historyStatus.Visible=false;
|
||||
_sampleLabel.Visible=false;
|
||||
_planLabel.Visible=false;
|
||||
|
||||
Reference in New Issue
Block a user