fixed comment into code

This commit is contained in:
2026-08-09 20:02:23 +05:00
parent 778fc1034b
commit 7e4e569d53
34 changed files with 332 additions and 306 deletions
+6 -6
View File
@@ -8,8 +8,8 @@ using Microsoft.Win32;
namespace CursorLang.Services;
/// <summary>
/// Держит в ресурсах приложения палитру выбранной темы и подменяет её
/// при смене настройки — окна перекрашиваются без перезапуска.
/// Keeps the palette of the chosen theme in the application resources and swaps it
/// when the setting changes — the windows are recoloured without a restart.
/// </summary>
public sealed class ThemeService : IThemeService, IDisposable
{
@@ -29,7 +29,7 @@ public sealed class ThemeService : IThemeService, IDisposable
Apply();
}
/// <summary>Тема, которую видит пользователь: <c>System</c> здесь уже разрешён.</summary>
/// <summary>The theme the user sees: <c>System</c> is already resolved here.</summary>
public AppTheme CurrentTheme => _current;
public void Register(Window window)
@@ -60,8 +60,8 @@ public sealed class ThemeService : IThemeService, IDisposable
_windows.Clear();
}
/// <summary>Тема приложений в настройках Windows.</summary>
private static AppTheme DetectSystemTheme()
/// <summary>The app theme from the Windows settings.</summary>
internal static AppTheme DetectSystemTheme()
{
try
{
@@ -84,7 +84,7 @@ public sealed class ThemeService : IThemeService, IDisposable
}
}
// Windows сообщает о смене оформления не из потока интерфейса
// Windows reports a theme change from outside the interface thread
private void OnUserPreferenceChanged(object? sender, UserPreferenceChangedEventArgs e) =>
Application.Current?.Dispatcher.InvokeAsync(Apply);