Skip to content

Commit fd1d83a

Browse files
committed
fix: complete CS1591 zero-out across all Avalonia Shell provider implementations
- AvaloniaThemeProvider: constructor, ThemeChanged, GetThemeMode, GetAccentColor, GetIsHighContrast - AvaloniaWindowChromeProvider: GetTransparencyState, GetChromeMetrics - FallbackThemeProvider: ThemeChanged, GetThemeMode, GetAccentColor, GetIsHighContrast - NullGlobalShortcutProvider: all members - SharpHookGlobalShortcutProvider: all members - WebViewOverlayHost: OverlayHitTestResult enum members Made-with: Cursor
1 parent 2b8aa06 commit fd1d83a

File tree

6 files changed

+33
-1
lines changed

6 files changed

+33
-1
lines changed

src/Agibuild.Fulora.Avalonia/Shell/AvaloniaThemeProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ public sealed class AvaloniaThemeProvider : IPlatformThemeProvider, IDisposable
1414
{
1515
private bool _disposed;
1616

17+
/// <summary>Initializes a new instance of the <see cref="AvaloniaThemeProvider"/> class.</summary>
1718
public AvaloniaThemeProvider()
1819
{
1920
if (Application.Current is { } app)
2021
app.ActualThemeVariantChanged += OnThemeVariantChanged;
2122
}
2223

24+
/// <inheritdoc />
2325
public event EventHandler? ThemeChanged;
2426

27+
/// <inheritdoc />
2528
public string GetThemeMode()
2629
{
2730
var variant = Application.Current?.ActualThemeVariant;
@@ -30,6 +33,7 @@ public string GetThemeMode()
3033
return "system";
3134
}
3235

36+
/// <inheritdoc />
3337
public string? GetAccentColor()
3438
{
3539
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -39,6 +43,7 @@ public string GetThemeMode()
3943
return null;
4044
}
4145

46+
/// <inheritdoc />
4247
public bool GetIsHighContrast()
4348
{
4449
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))

src/Agibuild.Fulora.Avalonia/Shell/AvaloniaWindowChromeProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ await Dispatcher.UIThread.InvokeAsync(() =>
121121
}
122122
}
123123

124+
/// <inheritdoc />
124125
public TransparencyEffectiveState GetTransparencyState()
125126
{
126127
TrackedWindow? primary;
@@ -154,6 +155,7 @@ public TransparencyEffectiveState GetTransparencyState()
154155
};
155156
}
156157

158+
/// <inheritdoc />
157159
public WindowChromeMetrics GetChromeMetrics()
158160
{
159161
TrackedWindow? primary;

src/Agibuild.Fulora.Avalonia/Shell/FallbackThemeProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ namespace Agibuild.Fulora.Shell;
88
/// </summary>
99
public sealed class FallbackThemeProvider : IPlatformThemeProvider
1010
{
11+
/// <inheritdoc />
1112
public event EventHandler? ThemeChanged
1213
{
1314
add { }
1415
remove { }
1516
}
1617

18+
/// <inheritdoc />
1719
public string GetThemeMode() => "system";
20+
21+
/// <inheritdoc />
1822
public string? GetAccentColor() => null;
23+
24+
/// <inheritdoc />
1925
public bool GetIsHighContrast() => false;
2026
}

src/Agibuild.Fulora.Avalonia/Shell/NullGlobalShortcutProvider.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,22 @@ namespace Agibuild.Fulora.Shell;
55
/// </summary>
66
public sealed class NullGlobalShortcutProvider : IGlobalShortcutPlatformProvider
77
{
8+
/// <inheritdoc />
89
public bool IsSupported => false;
910

11+
/// <inheritdoc />
1012
public event Action<string>? ShortcutActivated
1113
{
1214
add { }
1315
remove { }
1416
}
1517

18+
/// <inheritdoc />
1619
public bool Register(string id, ShortcutKey key, ShortcutModifiers modifiers) => false;
20+
21+
/// <inheritdoc />
1722
public bool Unregister(string id) => false;
23+
24+
/// <inheritdoc />
1825
public void Dispose() { }
1926
}

src/Agibuild.Fulora.Avalonia/Shell/SharpHookGlobalShortcutProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ public sealed class SharpHookGlobalShortcutProvider : IGlobalShortcutPlatformPro
1818
private TaskPoolGlobalHook? _hook;
1919
private bool _disposed;
2020

21+
/// <inheritdoc />
2122
public bool IsSupported =>
2223
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
2324
RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ||
2425
(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) &&
2526
Environment.GetEnvironmentVariable("WAYLAND_DISPLAY") is null);
2627

28+
/// <inheritdoc />
2729
public event Action<string>? ShortcutActivated;
2830

31+
/// <inheritdoc />
2932
public bool Register(string id, ShortcutKey key, ShortcutModifiers modifiers)
3033
{
3134
ObjectDisposedException.ThrowIf(_disposed, this);
@@ -40,6 +43,7 @@ public bool Register(string id, ShortcutKey key, ShortcutModifiers modifiers)
4043
return true;
4144
}
4245

46+
/// <inheritdoc />
4347
public bool Unregister(string id)
4448
{
4549
ObjectDisposedException.ThrowIf(_disposed, this);
@@ -55,6 +59,7 @@ public bool Unregister(string id)
5559
return true;
5660
}
5761

62+
/// <inheritdoc />
5863
public void Dispose()
5964
{
6065
if (_disposed) return;

src/Agibuild.Fulora.Avalonia/WebViewOverlayHost.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
namespace Agibuild.Fulora;
77

88
/// <summary>Result of hit-testing a point against the overlay.</summary>
9-
public enum OverlayHitTestResult { Overlay, Passthrough }
9+
public enum OverlayHitTestResult
10+
{
11+
/// <summary>The point hits the overlay; handle it in the overlay.</summary>
12+
Overlay,
13+
14+
/// <summary>The point should pass through to the WebView.</summary>
15+
Passthrough,
16+
}
1017

1118
/// <summary>
1219
/// Manages a transparent companion window for rendering Avalonia controls above a WebView.

0 commit comments

Comments
 (0)