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
+16 -15
View File
@@ -5,67 +5,68 @@ using CommunityToolkit.Mvvm.ComponentModel;
namespace CursorLang.Models;
/// <summary>
/// Настройки приложения. Все изменения применяются на лету: подсказка и окно
/// настроек привязаны к этим свойствам, а <c>SettingsService</c> сохраняет их на диск.
/// The application settings. Every change applies on the fly: the popup and the
/// settings window are bound to these properties, and <c>SettingsService</c> saves
/// them to disk.
/// </summary>
public sealed partial class AppSettings : ObservableObject
{
/// <summary>Язык интерфейса в виде кода культуры: «ru», «en».</summary>
/// <summary>The interface language as a culture code: "ru", "en".</summary>
[ObservableProperty]
private string _language = "en";
/// <summary>Оформление окна настроек.</summary>
/// <summary>The look of the settings window.</summary>
[ObservableProperty]
private AppTheme _theme = AppTheme.System;
[ObservableProperty]
private PopupPlacementMode _placementMode = PopupPlacementMode.AtCursor;
// Сторона и отступ хранятся отдельно для каждого режима: у курсора и у
// каретки удобны разные настройки, и переключение режима их не сбрасывает
// The side and the offset are stored per mode: the cursor and the caret call for
// different settings, and switching the mode does not reset them
[ObservableProperty]
private AnchorSide _cursorSide = AnchorSide.BottomRight;
/// <summary>Отступ от курсора в единицах WPF.</summary>
/// <summary>The offset from the cursor in WPF units.</summary>
[ObservableProperty]
private double _cursorOffset = 16;
[ObservableProperty]
private AnchorSide _caretSide = AnchorSide.BottomRight;
/// <summary>Отступ от каретки в единицах WPF.</summary>
/// <summary>The offset from the caret in WPF units.</summary>
[ObservableProperty]
private double _caretOffset = 16;
[ObservableProperty]
private ScreenPosition _screenPosition = ScreenPosition.BottomRight;
/// <summary>Отступ от края монитора в единицах WPF.</summary>
/// <summary>The offset from the monitor edge in WPF units.</summary>
[ObservableProperty]
private double _screenMargin = 24;
[ObservableProperty]
private double _fontSize = 20;
/// <summary>Непрозрачность подсказки: 1.0 — полностью непрозрачная.</summary>
/// <summary>The popup opacity: 1.0 is fully opaque.</summary>
[ObservableProperty]
private double _opacity = 0.9;
/// <summary>Сколько подсказка держится на экране, в миллисекундах.</summary>
/// <summary>How long the popup stays on screen, in milliseconds.</summary>
[ObservableProperty]
private double _durationMilliseconds = 500;
/// <summary>
/// Перехватывать Caps Lock и переключать по ней раскладку вместо смены регистра.
/// По умолчанию выключено: приложение не должно менять поведение системы,
/// пока его об этом не попросили.
/// Intercept Caps Lock and switch the layout with it instead of changing the case.
/// Off by default: the application must not change the behaviour of the system
/// until it is asked to.
/// </summary>
[ObservableProperty]
private bool _useCapsLockHotkey;
/// <summary>
/// С какого времени удержания Caps Lock переключение отменяется, в миллисекундах.
/// After how long a Caps Lock hold cancels the switch, in milliseconds.
/// </summary>
[ObservableProperty]
private double _capsLockHoldMilliseconds = 300;