mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Apply Avalonia 12 migration changes: replace SystemDecorations with WindowDecorations and remove ExtendClientAreaChromeHints/ExtendClientAreaTitleBarHeightHint usages; update BindingPlugins removal logic (no-op); switch clipboard usage to ClipboardExtensions.SetTextAsync; update Bitmap.CopyPixels calls to the new signature. Replace TextBox.Watermark with PlaceholderText, convert NumberBox styles to FANumberBox and adjust templates, change Checked/Unchecked handlers to IsCheckedChanged, and adapt FluentIcons usages (SymbolIconSource -> FASymbol/FAFont/FluentIcon equivalents). Fix MainWindow partial classes to inherit Window and correct missing variables/fields/usings. Add migration docs/specs/tasks under .trae and include a small TestFluentIcons project for icon testing.
113 lines
6.1 KiB
XML
113 lines
6.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:LanMountainDesktop.ViewModels"
|
|
xmlns:controls="using:LanMountainDesktop.Controls"
|
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
|
xmlns:fi="using:FluentIcons.Avalonia"
|
|
x:Class="LanMountainDesktop.Views.SettingsPages.NotificationSettingsPage"
|
|
x:DataType="vm:NotificationSettingsPageViewModel">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Classes="settings-page-container settings-page-animated">
|
|
|
|
<controls:IconText Icon="Alert"
|
|
Text="{Binding NotificationHeader}"
|
|
Margin="0,0,0,4" />
|
|
|
|
<ui:FASettingsExpander Header="{Binding EnableNotificationHeader}"
|
|
Description="{Binding EnableNotificationDescription}">
|
|
<ui:FASettingsExpander.IconSource>
|
|
<ui:FAFontIconSource Glyph="󰉴" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
</ui:FASettingsExpander.IconSource>
|
|
<ui:FASettingsExpander.Footer>
|
|
<ToggleSwitch IsChecked="{Binding IsNotificationEnabled}" />
|
|
</ui:FASettingsExpander.Footer>
|
|
</ui:FASettingsExpander>
|
|
|
|
<Separator Classes="settings-separator" />
|
|
|
|
<controls:IconText Icon="Alert"
|
|
Text="{Binding BehaviorHeader}"
|
|
Margin="0,0,0,4" />
|
|
|
|
<ui:FASettingsExpander Header="{Binding HoverPauseHeader}"
|
|
Description="{Binding HoverPauseDescription}">
|
|
<ui:FASettingsExpander.IconSource>
|
|
<ui:FAFontIconSource Glyph="󰉴" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
</ui:FASettingsExpander.IconSource>
|
|
<ui:FASettingsExpander.Footer>
|
|
<ToggleSwitch IsChecked="{Binding IsHoverPauseEnabled}" />
|
|
</ui:FASettingsExpander.Footer>
|
|
</ui:FASettingsExpander>
|
|
|
|
<ui:FASettingsExpander Header="{Binding ClickCloseHeader}"
|
|
Description="{Binding ClickCloseDescription}">
|
|
<ui:FASettingsExpander.IconSource>
|
|
<ui:FAFontIconSource Glyph="󰉴" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
</ui:FASettingsExpander.IconSource>
|
|
<ui:FASettingsExpander.Footer>
|
|
<ToggleSwitch IsChecked="{Binding IsClickCloseEnabled}" />
|
|
</ui:FASettingsExpander.Footer>
|
|
</ui:FASettingsExpander>
|
|
|
|
<ui:FASettingsExpander Header="{Binding MaxNotificationsHeader}"
|
|
Description="{Binding MaxNotificationsDescription}">
|
|
<ui:FASettingsExpander.IconSource>
|
|
<ui:FAFontIconSource Glyph="󰉴" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
</ui:FASettingsExpander.IconSource>
|
|
<ui:FASettingsExpander.Footer>
|
|
<ui:FANumberBox Value="{Binding MaxNotificationsPerPosition}"
|
|
Minimum="1"
|
|
Maximum="10"
|
|
Width="100"
|
|
SpinButtonPlacementMode="Inline" />
|
|
</ui:FASettingsExpander.Footer>
|
|
</ui:FASettingsExpander>
|
|
|
|
<Separator Classes="settings-separator" />
|
|
|
|
<controls:IconText Icon="Beaker"
|
|
Text="{Binding TestHeader}"
|
|
Margin="0,0,0,4" />
|
|
|
|
<ui:FASettingsExpander Header="{Binding TestNotificationHeader}"
|
|
Description="{Binding TestNotificationDescription}">
|
|
<ui:FASettingsExpander.IconSource>
|
|
<ui:FAFontIconSource Glyph="󰉴" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
</ui:FASettingsExpander.IconSource>
|
|
<ui:FASettingsExpander.Footer>
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<ComboBox Width="120"
|
|
ItemsSource="{Binding TestPositions}"
|
|
SelectedItem="{Binding SelectedTestPosition}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:SelectionOption">
|
|
<TextBlock Text="{Binding Label}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox Width="100"
|
|
ItemsSource="{Binding TestSeverities}"
|
|
SelectedItem="{Binding SelectedTestSeverity}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:SelectionOption">
|
|
<TextBlock Text="{Binding Label}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ui:FANumberBox Width="100"
|
|
Minimum="1"
|
|
Maximum="30"
|
|
SpinButtonPlacementMode="Inline"
|
|
Value="{Binding TestDurationSeconds}" />
|
|
<Button Command="{Binding SendTestCommand}"
|
|
Classes="accent">
|
|
<fi:SymbolIcon Symbol="Send" FontSize="16" />
|
|
</Button>
|
|
</StackPanel>
|
|
</ui:FASettingsExpander.Footer>
|
|
</ui:FASettingsExpander>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|