Publish Zonghengjia Windows 0.3.13 client source

This commit is contained in:
2026-11-13 10:35:04 +08:00
parent 1590443809
commit 839434a313
55 changed files with 2324 additions and 963 deletions
+8 -2
View File
@@ -25,6 +25,8 @@ internal sealed class WindowChrome : IDisposable
private int _modeGeneration;
internal string LastMinMaxForTest { get; private set; } = "none";
internal bool LoginMode { get; private set; }
internal bool DashboardCloseSlot { get; set; }
internal Rectangle DashboardCloseBounds { get; private set; }
internal CaptionButton MinimizeButton { get; } = new(CaptionAction.Minimize);
@@ -152,12 +154,16 @@ internal sealed class WindowChrome : IDisposable
{
if (_disposed || _header.IsDisposed) return;
var width = Scale(46);
var height = Scale(CaptionHeight);
var tallHeader = DashboardCloseSlot && _header.ClientSize.Height >= Scale(64);
var height = Scale(tallHeader ? 36 : CaptionHeight);
var maximized = _form.WindowState == FormWindowState.Maximized;
// Keep the entire clickable button clear of the native resize band.
// Maximized windows have no resize band and use the screen edge again.
var inset = maximized ? 0 : Scale(6);
MinimizeButton.Bounds = new Rectangle(Math.Max(0, _header.ClientSize.Width - width - inset), inset, width, height);
var top = tallHeader ? Scale(17) : inset;
var right = _header.ClientSize.Width - inset;
DashboardCloseBounds = DashboardCloseSlot ? new Rectangle(right - width, top, width, height) : Rectangle.Empty;
MinimizeButton.Bounds = new Rectangle(Math.Max(0, right - width * (DashboardCloseSlot ? 2 : 1)), top, width, height);
_toolTip.SetToolTip(MinimizeButton, MinimizeButton.AccessibleName);
MinimizeButton.BringToFront();
MinimizeButton.Invalidate();