feat: 定位模型重做、聚焦短显、托盘交互与 host spawn 修复
- 定位改为 水平(左/中/右) × 垂直(上/中/下) + 边缘留白,取代四角枚举 - 完成类通知在目标窗口已聚焦时用更短停留(FocusedDurationSeconds) - 托盘左键单击直接打开设置,右键菜单仅保留退出 - 修复 host 拉起用 UseShellExecute=true,脱离钩子 stdout 管道,避免 Claude 卡在 running stop hook
This commit is contained in:
@@ -18,7 +18,10 @@ public partial class SettingsViewModel : ObservableObject
|
||||
|
||||
var s = settings.Current;
|
||||
DurationSeconds = s.DurationSeconds;
|
||||
Corner = s.Corner;
|
||||
FocusedDurationSeconds = s.FocusedDurationSeconds;
|
||||
Horizontal = s.Horizontal;
|
||||
Vertical = s.Vertical;
|
||||
Margin = s.Margin;
|
||||
Opacity = s.Opacity;
|
||||
MaxVisible = s.MaxVisible;
|
||||
PlaySound = s.PlaySound;
|
||||
@@ -27,14 +30,24 @@ public partial class SettingsViewModel : ObservableObject
|
||||
ShowOnAllDesktops = s.ShowOnAllDesktops;
|
||||
}
|
||||
|
||||
public IReadOnlyList<ToastCorner> Corners { get; } =
|
||||
[ToastCorner.TopLeft, ToastCorner.TopRight, ToastCorner.BottomLeft, ToastCorner.BottomRight];
|
||||
public IReadOnlyList<HEdge> Horizontals { get; } = [HEdge.Left, HEdge.Center, HEdge.Right];
|
||||
|
||||
public IReadOnlyList<VEdge> Verticals { get; } = [VEdge.Top, VEdge.Center, VEdge.Bottom];
|
||||
|
||||
[ObservableProperty]
|
||||
public partial int DurationSeconds { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial ToastCorner Corner { get; set; }
|
||||
public partial int FocusedDurationSeconds { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial HEdge Horizontal { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial VEdge Vertical { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial int Margin { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial double Opacity { get; set; }
|
||||
@@ -63,7 +76,10 @@ public partial class SettingsViewModel : ObservableObject
|
||||
_settings.Save(new ToastSettings
|
||||
{
|
||||
DurationSeconds = DurationSeconds,
|
||||
Corner = Corner,
|
||||
FocusedDurationSeconds = FocusedDurationSeconds,
|
||||
Horizontal = Horizontal,
|
||||
Vertical = Vertical,
|
||||
Margin = Margin,
|
||||
Opacity = Opacity,
|
||||
MaxVisible = MaxVisible,
|
||||
PlaySound = PlaySound,
|
||||
|
||||
Reference in New Issue
Block a user