b89223fa54
- 定位改为 水平(左/中/右) × 垂直(上/中/下) + 边缘留白,取代四角枚举 - 完成类通知在目标窗口已聚焦时用更短停留(FocusedDurationSeconds) - 托盘左键单击直接打开设置,右键菜单仅保留退出 - 修复 host 拉起用 UseShellExecute=true,脱离钩子 stdout 管道,避免 Claude 卡在 running stop hook
85 lines
3.3 KiB
XML
85 lines
3.3 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:u="https://irihi.tech/ursa"
|
||
xmlns:vm="clr-namespace:Notify.ViewModels"
|
||
xmlns:m="clr-namespace:Notify.Models"
|
||
x:Class="Notify.Views.SettingsWindow"
|
||
x:DataType="vm:SettingsViewModel"
|
||
Width="420"
|
||
SizeToContent="Height"
|
||
CanResize="False"
|
||
WindowStartupLocation="CenterScreen"
|
||
Icon="/Assets/claude.ico"
|
||
Title="弹窗设置">
|
||
|
||
<StackPanel Margin="20" Spacing="16">
|
||
|
||
<TextBlock Text="弹窗设置"
|
||
FontSize="18"
|
||
FontWeight="Bold" />
|
||
|
||
<u:Form LabelPosition="Left" LabelWidth="120">
|
||
|
||
<u:FormItem Label="停留时长(秒)">
|
||
<u:NumericIntUpDown Value="{Binding DurationSeconds}" Minimum="1" Maximum="60" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="聚焦时停留(秒)">
|
||
<u:NumericIntUpDown Value="{Binding FocusedDurationSeconds}" Minimum="1" Maximum="60" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="水平方向">
|
||
<ComboBox ItemsSource="{Binding Horizontals}"
|
||
SelectedItem="{Binding Horizontal}"
|
||
HorizontalAlignment="Stretch" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="垂直方向">
|
||
<ComboBox ItemsSource="{Binding Verticals}"
|
||
SelectedItem="{Binding Vertical}"
|
||
HorizontalAlignment="Stretch" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="边缘留白(DIP)">
|
||
<u:NumericIntUpDown Value="{Binding Margin}" Minimum="0" Maximum="200" Step="2" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="不透明度">
|
||
<u:NumericDoubleUpDown Value="{Binding Opacity}" Minimum="0.3" Maximum="1.0" Step="0.05" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="最多同时显示">
|
||
<u:NumericIntUpDown Value="{Binding MaxVisible}" Minimum="1" Maximum="10" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="宽度(DIP)">
|
||
<u:NumericDoubleUpDown Value="{Binding Width}" Minimum="240" Maximum="600" Step="10" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="淡入淡出(毫秒)">
|
||
<u:NumericIntUpDown Value="{Binding FadeMilliseconds}" Minimum="0" Maximum="2000" Step="50" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="播放提示音">
|
||
<ToggleSwitch IsChecked="{Binding PlaySound}" />
|
||
</u:FormItem>
|
||
|
||
<u:FormItem Label="跨所有桌面显示">
|
||
<ToggleSwitch IsChecked="{Binding ShowOnAllDesktops}" />
|
||
</u:FormItem>
|
||
|
||
</u:Form>
|
||
|
||
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
|
||
<TextBlock Text="{Binding StatusText}"
|
||
VerticalAlignment="Center"
|
||
Foreground="#FF4CAF50" />
|
||
<Button Content="测试弹窗" Command="{Binding TestToastCommand}" />
|
||
<Button Content="保存"
|
||
Classes="Primary"
|
||
Command="{Binding SaveCommand}" />
|
||
</StackPanel>
|
||
|
||
</StackPanel>
|
||
</Window>
|