Migrate codebase to Avalonia 12 APIs

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.
This commit is contained in:
lincube
2026-04-29 08:50:28 +08:00
parent a73ba32700
commit 9fb41378eb
54 changed files with 468 additions and 170 deletions

View File

@@ -0,0 +1,106 @@
# Avalonia 12 迁移计划
## 当前状态
项目已完成以下迁移准备:
* `Directory.Packages.props` 中 Avalonia 包已升级到 `12.0.1`
* `FluentAvaloniaUI` 已升级到 `3.0.0-preview1`
* `Avalonia.Diagnostics` 已替换为 `AvaloniaUI.DiagnosticsSupport`
* `Avalonia.Controls.WebView` 已升级到 `12.0.0`
* `ClassIsland.Markdown.Avalonia` 已升级到 `12.0.0`
## 构建错误清单26 errors
### 1. 窗口装饰 API 移除8 errors
**文件**`LanMountainDesktop/Views/SettingsWindow.axaml.cs`4 errors
* `ExtendClientAreaChromeHints` 不存在line 166, 179
* `SystemDecorations` 已过时,需改用 `WindowDecorations`line 168, 177
**文件**`LanMountainDesktop/Views/ComponentEditorWindow.axaml.cs`4 errors
* `ExtendClientAreaChromeHints` 不存在line 63, 72
* `SystemDecorations` 已过时,需改用 `WindowDecorations`line 65, 70
**AXAML 文件**13 个文件使用 `SystemDecorations` 属性(编译警告)
### 2. 变量/字段未找到8 errors
**文件**`LanMountainDesktop/Views/MainWindow.ComponentSystem.cs`
* `centerLeft` 不存在line 759, 766, 778
* `positions` 不存在line 1266
**文件**`LanMountainDesktop/Views/MainWindow.DesktopPaging.cs`
* `child` 不存在line 312
* `_isThreeFingerOrRightDragSwipeActive` 不存在line 517, 828, 847, 850
### 3. API 变更3 errors
**文件**`LanMountainDesktop/App.axaml.cs`
* `BindingPlugins` 不可访问line 532, 537
**文件**`LanMountainDesktop/Views/Components/DesktopComponentFailureView.cs`
* `IClipboard.SetTextAsync` 不存在line 187
**文件**`LanMountainDesktop/Services/MonetColorService.cs`
* `Bitmap.CopyPixels` 参数不匹配line 91
### 4. 第三方库变更1 error
**文件**`LanMountainDesktop/Views/SettingsWindow.axaml.cs`
* `FluentIcons.Avalonia.SymbolIconSource` 不存在line 215
### 5. 过时属性警告(需同步修复)
* `TextBox.Watermark``PlaceholderText`7 处 .cs + 7 处 .axaml
## 迁移步骤
### Phase 1: 修复窗口装饰 API高优先级
1. 重写 `SettingsWindow.ApplyChromeMode()` 使用 Avalonia 12 新 API
2. 重写 `ComponentEditorWindow.ApplyChromeMode()` 使用 Avalonia 12 新 API
3. 批量替换所有 `.axaml` 中的 `SystemDecorations``WindowDecorations`
### Phase 2: 修复 MainWindow 编译错误(高优先级)
1. 检查 `MainWindow.ComponentSystem.cs``centerLeft``positions` 的作用域问题
2. 检查 `MainWindow.DesktopPaging.cs``child``_isThreeFingerOrRightDragSwipeActive` 的作用域问题
3. 确认这些变量是否被意外删除或重命名
### Phase 3: 修复 Avalonia 12 API 变更(中优先级)
1. `App.axaml.cs`: 替换 `BindingPlugins.DataValidators` 的访问方式
2. `DesktopComponentFailureView.cs`: 使用新的剪贴板 API
3. `MonetColorService.cs`: 更新 `Bitmap.CopyPixels` 调用签名
### Phase 4: 修复第三方库变更(中优先级)
1. `SettingsWindow.axaml.cs`: 替换 `FluentIcons.Avalonia.SymbolIconSource` 为 v3 等效 API
### Phase 5: 清理过时属性(低优先级)
1. 批量替换 `Watermark``PlaceholderText`(所有 .cs 和 .axaml
## 验证步骤
* 每阶段修复后运行 `dotnet build LanMountainDesktop.slnx -c Debug`
* 最终运行 `dotnet test LanMountainDesktop.slnx -c Debug`

View File

@@ -0,0 +1,14 @@
# Checklist
- [ ] `SettingsWindow.ApplyChromeMode()` 不再使用 `ExtendClientAreaChromeHints``SystemDecorations`
- [ ] `ComponentEditorWindow.ApplyChromeMode()` 不再使用 `ExtendClientAreaChromeHints``SystemDecorations`
- [ ] 所有 `.axaml` 文件中的 `SystemDecorations` 已替换为 `WindowDecorations`
- [ ] `MainWindow.ComponentSystem.cs``centerLeft``positions` 变量已正确定义
- [ ] `MainWindow.DesktopPaging.cs``child``_isThreeFingerOrRightDragSwipeActive` 变量已正确定义
- [ ] `App.axaml.cs``BindingPlugins.DataValidators` 代码已移除
- [ ] `DesktopComponentFailureView.cs` 使用 `ClipboardExtensions.SetTextAsync`
- [ ] `MonetColorService.cs` 使用正确的 `Bitmap.CopyPixels` 签名
- [ ] `SettingsWindow.axaml.cs` 使用 `FluentIcons.Avalonia.FluentIcon` 替代 `SymbolIconSource`
- [ ] 所有 `TextBox.Watermark` 已替换为 `PlaceholderText`
- [ ] `dotnet build LanMountainDesktop.slnx -c Debug` 0 errors, 0 warnings过时 API 警告)
- [ ] `dotnet test LanMountainDesktop.slnx -c Debug` 全部通过

View File

@@ -0,0 +1,63 @@
# Avalonia 12 迁移规格
## Why
Avalonia 12 带来性能改进SkiaSharp 3.0、编译绑定默认开启、新的窗口装饰体系WindowDrawnDecorations和更简洁的 API 设计。项目当前已升级包引用,但存在 18 个编译错误和若干过时 API 警告,需要系统性修复以确保构建通过。
## What Changes
- **BREAKING**: 移除 `ExtendClientAreaChromeHints``SystemDecorations` 的使用,迁移到 `WindowDecorations`
- **BREAKING**: 移除 `BindingPlugins.DataValidators` 的使用v12 已移除绑定插件体系)
- **BREAKING**: 替换 `IClipboard.SetTextAsync``ClipboardExtensions.SetTextAsync`
- **BREAKING**: 更新 `Bitmap.CopyPixels` 调用签名(移除 `AlphaFormat` 参数)
- **BREAKING**: 替换 `FluentIcons.Avalonia.SymbolIconSource` 为 v3 等效 API
- 修复 `MainWindow.ComponentSystem.cs``MainWindow.DesktopPaging.cs` 中缺失的字段/变量
- 批量替换 `TextBox.Watermark``PlaceholderText`
## Impact
- 受影响代码:
- `LanMountainDesktop/Views/SettingsWindow.axaml.cs`
- `LanMountainDesktop/Views/ComponentEditorWindow.axaml.cs`
- `LanMountainDesktop/Views/MainWindow.ComponentSystem.cs`
- `LanMountainDesktop/Views/MainWindow.DesktopPaging.cs`
- `LanMountainDesktop/App.axaml.cs`
- `LanMountainDesktop/Views/Components/DesktopComponentFailureView.cs`
- `LanMountainDesktop/Services/MonetColorService.cs`
- 13 个 `.axaml` 文件(`SystemDecorations``WindowDecorations`
- 7 个 `.cs` 文件 + 7 个 `.axaml` 文件(`Watermark``PlaceholderText`
- 受影响规格:无现有规格直接关联
## ADDED Requirements
### Requirement: 窗口装饰 API 迁移
系统 SHALL 使用 Avalonia 12 的 `WindowDecorations` 属性替代已移除的 `SystemDecorations``ExtendClientAreaChromeHints`
#### Scenario: SettingsWindow 无边框模式
- **WHEN** `ApplyChromeMode(false)` 被调用
- **THEN** `WindowDecorations = WindowDecorations.BorderOnly``ExtendClientAreaToDecorationsHint = true`
#### Scenario: SettingsWindow 系统 Chrome 模式
- **WHEN** `ApplyChromeMode(true)` 被调用
- **THEN** `WindowDecorations = WindowDecorations.Full``ExtendClientAreaToDecorationsHint = true`
### Requirement: 剪贴板 API 迁移
系统 SHALL 使用 Avalonia 12 的 `ClipboardExtensions.SetTextAsync` 替代已移除的 `IClipboard.SetTextAsync`
### Requirement: Bitmap.CopyPixels 签名更新
系统 SHALL 使用新的 `CopyPixels` 签名,不再传入 `AlphaFormat` 参数。
### Requirement: FluentIcons v3 API 适配
系统 SHALL 使用 `FluentIcons.Avalonia.FluentIcon` 替代已移除的 `SymbolIconSource`
## MODIFIED Requirements
### Requirement: 编译绑定验证
- **修改前**`BindingPlugins.DataValidators.RemoveAt(0)` 移除默认数据注解验证插件
- **修改后**v12 默认禁用数据注解验证插件,无需手动移除
## REMOVED Requirements
### Requirement: ExtendClientAreaChromeHints 配置
**Reason**: Avalonia 12 移除此属性,由 `WindowDecorations` 统一管理
**Migration**: 删除所有 `ExtendClientAreaChromeHints` 赋值代码

View File

@@ -0,0 +1,39 @@
# Tasks
- [ ] Task 1: 修复窗口装饰 APIPhase 1
- [x] SubTask 1.1: 重写 `SettingsWindow.ApplyChromeMode()` 移除 `ExtendClientAreaChromeHints`
- [x] SubTask 1.2: 重写 `ComponentEditorWindow.ApplyChromeMode()` 移除 `ExtendClientAreaChromeHints`
- [x] SubTask 1.3: 批量替换所有 `.axaml` 中的 `SystemDecorations``WindowDecorations`
- [ ] SubTask 1.4: 验证构建错误减少
- [ ] Task 2: 修复 MainWindow 编译错误Phase 2
- [ ] SubTask 2.1: 修复 `MainWindow.ComponentSystem.cs``centerLeft``positions` 未定义错误
- [ ] SubTask 2.2: 修复 `MainWindow.DesktopPaging.cs``child``_isThreeFingerOrRightDragSwipeActive` 未定义错误
- [ ] SubTask 2.3: 验证构建错误减少
- [ ] Task 3: 修复 Avalonia 12 API 变更Phase 3
- [ ] SubTask 3.1: 移除 `App.axaml.cs``BindingPlugins.DataValidators` 代码
- [ ] SubTask 3.2: 替换 `DesktopComponentFailureView.cs``IClipboard.SetTextAsync``ClipboardExtensions.SetTextAsync`
- [ ] SubTask 3.3: 更新 `MonetColorService.cs``Bitmap.CopyPixels` 调用签名
- [ ] SubTask 3.4: 验证构建错误减少
- [ ] Task 4: 修复第三方库变更Phase 4
- [ ] SubTask 4.1: 替换 `SettingsWindow.axaml.cs``FluentIcons.Avalonia.SymbolIconSource``FluentIcon`
- [ ] SubTask 4.2: 验证构建错误减少
- [ ] Task 5: 清理过时属性Phase 5
- [ ] SubTask 5.1: 批量替换 `.cs` 文件中 `Watermark``PlaceholderText`
- [ ] SubTask 5.2: 批量替换 `.axaml` 文件中 `Watermark``PlaceholderText`
- [ ] SubTask 5.3: 验证无过时警告
- [ ] Task 6: 最终验证
- [ ] SubTask 6.1: `dotnet build LanMountainDesktop.slnx -c Debug` 0 errors
- [ ] SubTask 6.2: `dotnet test LanMountainDesktop.slnx -c Debug` 通过
# Task Dependencies
- Task 2 不依赖 Task 1可并行
- Task 3 不依赖 Task 1/2可并行
- Task 4 不依赖 Task 1/2/3可并行
- Task 5 依赖 Task 1/2/3/4低优先级最后执行
- Task 6 依赖所有前置任务

View File

@@ -2,7 +2,6 @@
<PropertyGroup> <PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageVersion Include="Avalonia" Version="12.0.1" /> <PackageVersion Include="Avalonia" Version="12.0.1" />
<PackageVersion Include="Avalonia.Controls.WebView" Version="12.0.0" /> <PackageVersion Include="Avalonia.Controls.WebView" Version="12.0.0" />
@@ -40,4 +39,4 @@
<PackageVersion Include="YamlDotNet" Version="16.3.0" /> <PackageVersion Include="YamlDotNet" Version="16.3.0" />
<PackageVersion Include="log4net" Version="3.3.0" /> <PackageVersion Include="log4net" Version="3.3.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -12,7 +12,7 @@
CanResize="False" CanResize="False"
ShowInTaskbar="False" ShowInTaskbar="False"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
SystemDecorations="None" WindowDecorations="None"
Background="#0B0B0B" Background="#0B0B0B"
TransparencyLevelHint="None" TransparencyLevelHint="None"
Icon="/Assets/logo.ico"> Icon="/Assets/logo.ico">

View File

@@ -13,7 +13,7 @@
Height="320" Height="320"
CanResize="False" CanResize="False"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
SystemDecorations="None" WindowDecorations="None"
Background="{DynamicResource SolidBackgroundFillColorBaseBrush}" Background="{DynamicResource SolidBackgroundFillColorBaseBrush}"
TransparencyLevelHint="None" TransparencyLevelHint="None"
Icon="/Assets/logo.ico"> Icon="/Assets/logo.ico">

View File

@@ -527,15 +527,8 @@ public partial class App : Application
private void DisableAvaloniaDataAnnotationValidation() private void DisableAvaloniaDataAnnotationValidation()
{ {
// Get an array of plugins to remove // Avalonia 12 中 BindingPlugins 已移除,数据验证插件不再需要手动禁用
var dataValidationPluginsToRemove = // 编译型绑定默认开启,数据注解验证行为已改变
BindingPlugins.DataValidators.OfType<DataAnnotationsValidationPlugin>().ToArray();
// remove each entry found
foreach (var plugin in dataValidationPluginsToRemove)
{
BindingPlugins.DataValidators.Remove(plugin);
}
} }
private void InitializePluginRuntime() private void InitializePluginRuntime()

View File

@@ -88,8 +88,6 @@ public sealed class MonetColorService
PixelFormat.Bgra8888, PixelFormat.Bgra8888,
AlphaFormat.Premul); AlphaFormat.Premul);
using var framebuffer = writeable.Lock(); using var framebuffer = writeable.Lock();
scaledBitmap.CopyPixels(framebuffer, AlphaFormat.Premul);
var byteCount = framebuffer.RowBytes * framebuffer.Size.Height; var byteCount = framebuffer.RowBytes * framebuffer.Size.Height;
if (byteCount <= 0 || framebuffer.Address == IntPtr.Zero) if (byteCount <= 0 || framebuffer.Address == IntPtr.Zero)
{ {
@@ -97,6 +95,11 @@ public sealed class MonetColorService
} }
var pixelBuffer = new byte[byteCount]; var pixelBuffer = new byte[byteCount];
scaledBitmap.CopyPixels(
new PixelRect(scaledBitmap.PixelSize),
framebuffer.Address,
byteCount,
framebuffer.RowBytes);
Marshal.Copy(framebuffer.Address, pixelBuffer, 0, byteCount); Marshal.Copy(framebuffer.Address, pixelBuffer, 0, byteCount);
var argbPixels = new List<uint>(framebuffer.Size.Width * framebuffer.Size.Height); var argbPixels = new List<uint>(framebuffer.Size.Width * framebuffer.Size.Height);

View File

@@ -70,11 +70,25 @@
<Setter Property="Foreground" Value="{DynamicResource AdaptiveTextPrimaryBrush}" /> <Setter Property="Foreground" Value="{DynamicResource AdaptiveTextPrimaryBrush}" />
</Style> </Style>
<Style Selector="ui|NumberBox"> <Style Selector="ui|FANumberBox">
<Setter Property="Background" Value="{DynamicResource AdaptiveButtonBackgroundBrush}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource AdaptiveButtonBorderBrush}" /> <Setter Property="CornerRadius" Value="{DynamicResource DesignCornerRadiusMd}" />
<Setter Property="Foreground" Value="{DynamicResource AdaptiveTextPrimaryBrush}" /> <Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
</Style>
<Style Selector="ui|FANumberBox /template/ Button#PART_SpinUp">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="4,4,0,0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
</Style>
<Style Selector="ui|FANumberBox /template/ Button#PART_SpinDown">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0,0,4,4" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
</Style> </Style>
<Style Selector="CheckBox"> <Style Selector="CheckBox">
@@ -125,7 +139,7 @@
<Setter Property="Background" Value="{DynamicResource AdaptiveNavItemSelectedBackgroundBrush}" /> <Setter Property="Background" Value="{DynamicResource AdaptiveNavItemSelectedBackgroundBrush}" />
</Style> </Style>
<Style Selector=".settings-scope ui|NumberBox"> <Style Selector=".settings-scope ui|FANumberBox">
<Setter Property="CornerRadius" Value="{DynamicResource DesignCornerRadiusSm}" /> <Setter Property="CornerRadius" Value="{DynamicResource DesignCornerRadiusSm}" />
<Setter Property="MinHeight" Value="34" /> <Setter Property="MinHeight" Value="34" />
</Style> </Style>

View File

@@ -16,7 +16,7 @@
CanResize="True" CanResize="True"
SizeToContent="Manual" SizeToContent="Manual"
ShowInTaskbar="False" ShowInTaskbar="False"
SystemDecorations="BorderOnly" WindowDecorations="BorderOnly"
Background="Transparent" Background="Transparent"
Title="Component Editor"> Title="Component Editor">
<Window.Resources> <Window.Resources>

View File

@@ -60,17 +60,13 @@ public partial class ComponentEditorWindow : Window
if (preferSystemChrome) if (preferSystemChrome)
{ {
ExtendClientAreaToDecorationsHint = true; ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.PreferSystemChrome; WindowDecorations = WindowDecorations.Full;
ExtendClientAreaTitleBarHeightHint = -1;
SystemDecorations = SystemDecorations.Full;
CustomTitleBarHost.IsVisible = false; CustomTitleBarHost.IsVisible = false;
return; return;
} }
SystemDecorations = SystemDecorations.BorderOnly; WindowDecorations = WindowDecorations.BorderOnly;
ExtendClientAreaToDecorationsHint = true; ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
ExtendClientAreaTitleBarHeightHint = 52;
CustomTitleBarHost.IsVisible = true; CustomTitleBarHost.IsVisible = true;
} }

View File

@@ -41,13 +41,11 @@
ColumnSpacing="4"> ColumnSpacing="4">
<ToggleButton x:Name="TickRadioButton" <ToggleButton x:Name="TickRadioButton"
Classes="component-editor-segmented-choice" Classes="component-editor-segmented-choice"
Checked="OnSecondHandChanged" IsCheckedChanged="OnSecondHandChanged" />
Unchecked="OnSecondHandChanged" />
<ToggleButton x:Name="SweepRadioButton" <ToggleButton x:Name="SweepRadioButton"
Grid.Column="1" Grid.Column="1"
Classes="component-editor-segmented-choice" Classes="component-editor-segmented-choice"
Checked="OnSecondHandChanged" IsCheckedChanged="OnSecondHandChanged" />
Unchecked="OnSecondHandChanged" />
</Grid> </Grid>
</Border> </Border>
</StackPanel> </StackPanel>

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
x:Class="LanMountainDesktop.Views.ComponentEditors.ShortcutComponentEditor" x:Class="LanMountainDesktop.Views.ComponentEditors.ShortcutComponentEditor"
@@ -20,7 +20,7 @@
<Grid ColumnDefinitions="*,Auto"> <Grid ColumnDefinitions="*,Auto">
<TextBox Text="{Binding TargetPath}" <TextBox Text="{Binding TargetPath}"
IsReadOnly="True" IsReadOnly="True"
Watermark="{Binding TargetPathPlaceholder}" PlaceholderText="{Binding TargetPathPlaceholder}"
Grid.Column="0" /> Grid.Column="0" />
<Button Content="{Binding BrowseButtonText}" <Button Content="{Binding BrowseButtonText}"
Click="OnBrowseClick" Click="OnBrowseClick"

View File

@@ -21,8 +21,7 @@
<ToggleSwitch x:Name="EnabledToggleSwitch" <ToggleSwitch x:Name="EnabledToggleSwitch"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
Checked="OnEnabledChanged" IsCheckedChanged="OnEnabledChanged" />
Unchecked="OnEnabledChanged" />
</Grid> </Grid>
</Border> </Border>

View File

@@ -77,13 +77,11 @@
ColumnSpacing="4"> ColumnSpacing="4">
<ToggleButton x:Name="TickRadioButton" <ToggleButton x:Name="TickRadioButton"
Classes="component-editor-segmented-choice" Classes="component-editor-segmented-choice"
Checked="OnSecondHandChanged" IsCheckedChanged="OnSecondHandChanged" />
Unchecked="OnSecondHandChanged" />
<ToggleButton x:Name="SweepRadioButton" <ToggleButton x:Name="SweepRadioButton"
Grid.Column="1" Grid.Column="1"
Classes="component-editor-segmented-choice" Classes="component-editor-segmented-choice"
Checked="OnSecondHandChanged" IsCheckedChanged="OnSecondHandChanged" />
Unchecked="OnSecondHandChanged" />
</Grid> </Grid>
</Border> </Border>
</StackPanel> </StackPanel>

View File

@@ -9,7 +9,7 @@
MinWidth="760" MinWidth="760"
MinHeight="500" MinHeight="500"
CanResize="True" CanResize="True"
SystemDecorations="Full" WindowDecorations="Full"
Title="Component Library" Title="Component Library"
Background="{DynamicResource AdaptiveSurfaceBaseBrush}"> Background="{DynamicResource AdaptiveSurfaceBaseBrush}">

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -75,7 +75,7 @@
Grid.Column="1" Grid.Column="1"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
HorizontalContentAlignment="Left" HorizontalContentAlignment="Left"
Watermark="https://example.com" PlaceholderText="https://example.com"
Text="https://www.bing.com" Text="https://www.bing.com"
KeyDown="OnAddressTextBoxKeyDown" /> KeyDown="OnAddressTextBoxKeyDown" />

View File

@@ -4,6 +4,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Input.Platform;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Layout; using Avalonia.Layout;
using Avalonia.Media; using Avalonia.Media;

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -72,7 +72,7 @@
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<TextBox x:Name="DialogRenameTextBox" <TextBox x:Name="DialogRenameTextBox"
IsVisible="False" IsVisible="False"
Watermark="Enter session name" PlaceholderText="Enter session name"
MinWidth="120" MinWidth="120"
VerticalContentAlignment="Center" /> VerticalContentAlignment="Center" />
<Grid ColumnDefinitions="*,*" <Grid ColumnDefinitions="*,*"

View File

@@ -577,7 +577,7 @@ public partial class StudySessionHistoryWidget : UserControl, IDesktopComponentW
CultureInfo.InvariantCulture, CultureInfo.InvariantCulture,
L("study.session_history.dialog.rename_message", "Set a new name for \"{0}\"."), L("study.session_history.dialog.rename_message", "Set a new name for \"{0}\"."),
label); label);
DialogRenameTextBox.Watermark = L("study.session_history.rename_placeholder", "Enter session name"); DialogRenameTextBox.PlaceholderText = L("study.session_history.rename_placeholder", "Enter session name");
if (string.IsNullOrWhiteSpace(DialogRenameTextBox.Text)) if (string.IsNullOrWhiteSpace(DialogRenameTextBox.Text))
{ {
DialogRenameTextBox.Text = label; DialogRenameTextBox.Text = label;

View File

@@ -6,7 +6,7 @@
x:Class="LanMountainDesktop.Views.DesktopWidgetWindow" x:Class="LanMountainDesktop.Views.DesktopWidgetWindow"
Title="Desktop Component" Title="Desktop Component"
ShowInTaskbar="False" ShowInTaskbar="False"
SystemDecorations="None" WindowDecorations="None"
Background="Transparent" Background="Transparent"
Topmost="False" Topmost="False"
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"

View File

@@ -16,7 +16,7 @@ using LanMountainDesktop.Services;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private const double PreviewRenderCellSizeMin = 42; private const double PreviewRenderCellSizeMin = 42;
private const double PreviewRenderCellSizeMax = 112; private const double PreviewRenderCellSizeMax = 112;

View File

@@ -28,7 +28,7 @@ using SymbolIcon = FluentIcons.Avalonia.SymbolIcon;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private readonly List<DesktopComponentPlacementSnapshot> _desktopComponentPlacements = []; private readonly List<DesktopComponentPlacementSnapshot> _desktopComponentPlacements = [];
private readonly Dictionary<int, Grid> _desktopPageComponentGrids = new(); private readonly Dictionary<int, Grid> _desktopPageComponentGrids = new();
@@ -755,7 +755,8 @@ public partial class MainWindow
return false; return false;
// 闁荤姳绶ょ槐鏇㈡偩缂佹鈻旀い鎾卞灪閿涚喖鏌涢弽褎鎯堥柣鎾寸懇閹啴宕熼銈嗘緰闂傚倸瀚幊宥囩礊閸涱垳纾? // 閻庡綊娼荤粻鎴﹀垂椤忓牆鍙?*, 婵炴垶鎼╅崢濂稿垂椤忓牆鍙?Auto, 闂佸憡鐟ラ崯鍧楀垂椤忓牆鍙?* // 闁荤姳绶ょ槐鏇㈡偩缂佹鈻旀い鎾卞灪閿涚喖鏌涢弽褎鎯堥柣鎾寸懇閹啴宕熼銈嗘緰闂傚倸瀚幊宥囩礊閸涱垳纾? // 閻庡綊娼荤粻鎴﹀垂椤忓牆鍙?*, 婵炴垶鎼╅崢濂稿垂椤忓牆鍙?Auto, 闂佸憡鐟ラ崯鍧楀垂椤忓牆鍙?*
// 婵炴垶鎼╅崣鍐ㄎ涢崸妤€绀岄柛婵嗗閸樼敻鎮橀悙鍙夊櫢闁煎灚鍨垮浼村礈瑜嬫禒? var centerLeft = (totalWidth - centerWidth) / 2; // 婵炴垶鎼╅崣鍐ㄎ涢崸妤€绀岄柛婵嗗閸樼敻鎮橀悙鍙夊櫢闁煎灚鍨垮浼村礈瑜嬫禒?
var centerLeft = (totalWidth - centerWidth) / 2;
var centerRight = centerLeft + centerWidth; var centerRight = centerLeft + centerWidth;
// 闁诲海鎳撻ˇ顖炲矗韫囨稒鈷掔痪鎯ь儑閻涒晠鏌ㄥ☉妯煎闁稿孩姘ㄥΣ鎰版偑閸涱垳顦? // 闁诲海鎳撻ˇ顖炲矗韫囨稒鈷掔痪鎯ь儑閻涒晠鏌ㄥ☉妯煎闁稿孩姘ㄥΣ鎰版偑閸涱垳顦?
@@ -1262,7 +1263,8 @@ public partial class MainWindow
/// 闂佸搫琚崕鍙夌珶濮椻偓瀹曪綁顢涘鍕闂佹眹鍔岀€氼厼霉濞戞瑧顩烽柨婵嗗缁夊绱? /// </summary> /// 闂佸搫琚崕鍙夌珶濮椻偓瀹曪綁顢涘鍕闂佹眹鍔岀€氼厼霉濞戞瑧顩烽柨婵嗗缁夊绱? /// </summary>
private string? FindAlternativePosition(string originalPosition) private string? FindAlternativePosition(string originalPosition)
{ {
// 闁诲繐绻戠换鍡涙儊椤栫偛绠ラ柍褜鍓熷鍨緞婵犲倽顔夐梺鐓庣-閺咁偄鈻撻幋鐐村鐎广儱娲ㄩ弸? var positions = new[] { "Left", "Center", "Right" }; // 闁诲繐绻戠换鍡涙儊椤栫偛绠ラ柍褜鍓熷鍨緞婵犲倽顔夐梺鐓庣-閺咁偄鈻撻幋鐐村鐎广儱娲ㄩ弸?
var positions = new[] { "Left", "Center", "Right" };
foreach (var position in positions) foreach (var position in positions)
{ {
if (position != originalPosition && CanAddComponentAtPosition(position)) if (position != originalPosition && CanAddComponentAtPosition(position))

View File

@@ -12,7 +12,7 @@ using LanMountainDesktop.Theme;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private static readonly TimeSpan DesktopEditCommitAnimationDuration = FluttermotionToken.Standard; private static readonly TimeSpan DesktopEditCommitAnimationDuration = FluttermotionToken.Standard;
private static readonly TimeSpan DesktopEditCancelAnimationDuration = FluttermotionToken.Fast; private static readonly TimeSpan DesktopEditCancelAnimationDuration = FluttermotionToken.Fast;

View File

@@ -22,7 +22,7 @@ using LanMountainDesktop.Theme;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private const int MinDesktopPageCount = 1; private const int MinDesktopPageCount = 1;
private const int MaxDesktopPageCount = 12; private const int MaxDesktopPageCount = 12;
@@ -75,7 +75,8 @@ public partial class MainWindow
private int? _desktopPageContextSettlingTargetIndex; private int? _desktopPageContextSettlingTargetIndex;
private int _desktopPageContextSettleRevision; private int _desktopPageContextSettleRevision;
// 婵犵數鍋為崹鍫曞箰閹间絸鍥箥椤旂懓浜鹃柛顭戝亯婢规ɑ銇勯婊冨妤犵偛顑呴埞鎴﹀窗?闂傚倷绀侀幉锟犳偡閿旂晫绠惧┑鐘叉搐閺嬩焦銇勯幘鍗炵仼缂佺媭鍨堕弻鈥崇暤椤旂厧鏁俊銈呮噺閻撶喖鏌嶉崫鍕灓闁绘帡绠栭弻? private bool _isThreeFingerOrRightDragSwipeActive; // 婵犵數鍋為崹鍫曞箰閹间絸鍥箥椤旂懓浜鹃柛顭戝亯婢规ɑ銇勯婊冨妤犵偛顑呴埞鎴﹀窗?闂傚倷绀侀幉锟犳偡閿旂晫绠惧┑鐘叉搐閺嬩焦銇勯幘鍗炵仼缂佺媭鍨堕弻鈥崇暤椤旂厧鏁俊銈呮噺閻撶喖鏌嶉崫鍕灓闁绘帡绠栭弻?
private bool _isThreeFingerOrRightDragSwipeActive;
private readonly HashSet<int> _activePointerIds = []; private readonly HashSet<int> _activePointerIds = [];
private int LauncherSurfaceIndex => Math.Max(MinDesktopPageCount, _desktopPageCount); private int LauncherSurfaceIndex => Math.Max(MinDesktopPageCount, _desktopPageCount);
@@ -307,7 +308,8 @@ public partial class MainWindow
// 闂傚倷绀侀幖顐⒚洪妶澶嬪仱闁靛ň鏅涢拑鐔封攽閸屻倖杈渁pPanel闂傚倷鐒﹂惇褰掑礉瀹€鍕惞婵帞妫渕闂備浇顕х换鎰崲閹版澘绠规い鎰跺瘜閺? LauncherRootTilePanel.Width = availableWidth; // 闂傚倷绀侀幖顐⒚洪妶澶嬪仱闁靛ň鏅涢拑鐔封攽閸屻倖杈渁pPanel闂傚倷鐒﹂惇褰掑礉瀹€鍕惞婵帞妫渕闂備浇顕х换鎰崲閹版澘绠规い鎰跺瘜閺? LauncherRootTilePanel.Width = availableWidth;
// 闂傚倷绀侀幖顐⒚洪妶澶嬪仱闁靛ň鏅涢拑鐔封攽閻樺弶鎼愮紒鐘劦閺屽秷顧侀柛鎾跺枎椤曪綁宕归銏㈢獮婵犵數濮寸€氼參骞夐妶澶嬧拺缂佸娉曠粻浼存煕閻旂顥嬬紒顔肩墕閻f繈宕熼鈧崜顓㈡⒑閸涘﹥澶勯柛瀣噹鍗遍柍褜鍓熼弻? foreach (var child in LauncherRootTilePanel.Children) // 闂傚倷绀侀幖顐⒚洪妶澶嬪仱闁靛ň鏅涢拑鐔封攽閻樺弶鎼愮紒鐘劦閺屽秷顧侀柛鎾跺枎椤曪綁宕归銏㈢獮婵犵數濮寸€氼參骞夐妶澶嬧拺缂佸娉曠粻浼存煕閻旂顥嬬紒顔肩墕閻f繈宕熼鈧崜顓㈡⒑閸涘﹥澶勯柛瀣噹鍗遍柍褜鍓熼弻?
foreach (var child in LauncherRootTilePanel.Children)
{ {
if (child is Button button) if (child is Button button)
{ {

View File

@@ -1,9 +1,10 @@
using System; using System;
using Avalonia.Controls;
using LanMountainDesktop.Services; using LanMountainDesktop.Services;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private void UpdateCurrentRenderBackendStatus() private void UpdateCurrentRenderBackendStatus()
{ {

View File

@@ -20,7 +20,7 @@ using LanMountainDesktop.Views.Components;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private TextBlock? CurrentRenderBackendLabelTextBlock => this.FindControl<TextBlock>("CurrentRenderBackendLabelTextBlock"); private TextBlock? CurrentRenderBackendLabelTextBlock => this.FindControl<TextBlock>("CurrentRenderBackendLabelTextBlock");
private TextBlock? CurrentRenderBackendValueTextBlock => this.FindControl<TextBlock>("CurrentRenderBackendValueTextBlock"); private TextBlock? CurrentRenderBackendValueTextBlock => this.FindControl<TextBlock>("CurrentRenderBackendValueTextBlock");

View File

@@ -1,11 +1,12 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Threading; using Avalonia.Threading;
using FluentAvalonia.UI.Controls; using FluentAvalonia.UI.Controls;
using LanMountainDesktop.Services; using LanMountainDesktop.Services;
namespace LanMountainDesktop.Views; namespace LanMountainDesktop.Views;
public partial class MainWindow public partial class MainWindow : Window
{ {
private bool _isSingleInstancePromptVisible; private bool _isSingleInstancePromptVisible;

View File

@@ -15,7 +15,7 @@
x:Class="LanMountainDesktop.Views.MainWindow" x:Class="LanMountainDesktop.Views.MainWindow"
x:DataType="vm:MainWindowViewModel" x:DataType="vm:MainWindowViewModel"
WindowState="FullScreen" WindowState="FullScreen"
SystemDecorations="None" WindowDecorations="None"
CanResize="False" CanResize="False"
UseLayoutRounding="True" UseLayoutRounding="True"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"

View File

@@ -4,7 +4,7 @@
xmlns:vm="using:LanMountainDesktop.Views" xmlns:vm="using:LanMountainDesktop.Views"
x:Class="LanMountainDesktop.Views.NotificationDialogWindow" x:Class="LanMountainDesktop.Views.NotificationDialogWindow"
x:DataType="vm:NotificationDialogViewModel" x:DataType="vm:NotificationDialogViewModel"
SystemDecorations="None" WindowDecorations="None"
Background="Transparent" Background="Transparent"
ShowInTaskbar="False" ShowInTaskbar="False"
Topmost="True" Topmost="True"
@@ -12,7 +12,6 @@
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
TransparencyLevelHint="Transparent" TransparencyLevelHint="Transparent"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"> ExtendClientAreaTitleBarHeightHint="-1">
<Border x:Name="DialogCard" <Border x:Name="DialogCard"

View File

@@ -5,7 +5,7 @@
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
x:Class="LanMountainDesktop.Views.NotificationWindow" x:Class="LanMountainDesktop.Views.NotificationWindow"
x:DataType="vm:NotificationViewModel" x:DataType="vm:NotificationViewModel"
SystemDecorations="None" WindowDecorations="None"
Background="Transparent" Background="Transparent"
ShowInTaskbar="False" ShowInTaskbar="False"
Topmost="True" Topmost="True"
@@ -13,7 +13,6 @@
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
TransparencyLevelHint="Transparent" TransparencyLevelHint="Transparent"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"> ExtendClientAreaTitleBarHeightHint="-1">
<Window.Styles> <Window.Styles>

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -69,7 +69,7 @@
Title="{Binding VersionLabel}" Title="{Binding VersionLabel}"
Message="{Binding VersionText}"> Message="{Binding VersionText}">
<ui:FAInfoBar.IconSource> <ui:FAInfoBar.IconSource>
<fi:SymbolIconSource Symbol="Info" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FAInfoBar.IconSource> </ui:FAInfoBar.IconSource>
</ui:FAInfoBar> </ui:FAInfoBar>
@@ -77,14 +77,14 @@
Title="{Binding CodenameLabel}" Title="{Binding CodenameLabel}"
Message="{Binding CodenameText}"> Message="{Binding CodenameText}">
<ui:FAInfoBar.IconSource> <ui:FAInfoBar.IconSource>
<fi:SymbolIconSource Symbol="Bookmark" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FAInfoBar.IconSource> </ui:FAInfoBar.IconSource>
</ui:FAInfoBar> </ui:FAInfoBar>
<ui:FASettingsExpander Header="Project resources" <ui:FASettingsExpander Header="Project resources"
IsExpanded="True"> IsExpanded="True">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Document" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<ui:FASettingsExpanderItem.Footer> <ui:FASettingsExpanderItem.Footer>

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -16,7 +16,7 @@
<ui:FASettingsExpander Header="{Binding ThemeModeLabel}" <ui:FASettingsExpander Header="{Binding ThemeModeLabel}"
Description="{Binding ThemeModeDescription}"> Description="{Binding ThemeModeDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="WeatherMoon" /> <ui:FASymbolIconSource Symbol="{x:Static ui:FASymbol.WeatherMoon}" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="200" <ComboBox Width="200"
@@ -33,7 +33,7 @@
<ui:FASettingsExpander Header="{Binding UseSystemChromeLabel}"> <ui:FASettingsExpander Header="{Binding UseSystemChromeLabel}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Window" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding UseSystemChrome}" /> <ToggleSwitch IsChecked="{Binding UseSystemChrome}" />
@@ -43,7 +43,7 @@
<ui:FASettingsExpander Header="{Binding ThemeColorModeLabel}" <ui:FASettingsExpander Header="{Binding ThemeColorModeLabel}"
Description="{Binding ThemeColorSourceDescription}"> Description="{Binding ThemeColorSourceDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="PaintBrush" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="240" <ComboBox Width="240"
@@ -61,7 +61,7 @@
<ui:FASettingsExpander Header="{Binding SystemMaterialLabel}" <ui:FASettingsExpander Header="{Binding SystemMaterialLabel}"
Description="{Binding SystemMaterialDescription}"> Description="{Binding SystemMaterialDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="WindowDevTools" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -79,7 +79,7 @@
<ui:FASettingsExpander Header="{Binding ThemeColorLabel}" <ui:FASettingsExpander Header="{Binding ThemeColorLabel}"
Description="{Binding ThemeColorSourceDescription}"> Description="{Binding ThemeColorSourceDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Color" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<StackPanel Spacing="12"> <StackPanel Spacing="12">

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -15,7 +15,7 @@
<ui:FASettingsExpander Header="{Binding ComponentsHeader}" <ui:FASettingsExpander Header="{Binding ComponentsHeader}"
IsExpanded="True"> IsExpanded="True">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Apps" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<Grid ColumnDefinitions="Auto,*,Auto" ColumnSpacing="16"> <Grid ColumnDefinitions="Auto,*,Auto" ColumnSpacing="16">
@@ -76,7 +76,7 @@
<ui:FASettingsExpander Header="{Binding CornerRadiusStyleLabel}" <ui:FASettingsExpander Header="{Binding CornerRadiusStyleLabel}"
Description="{Binding CornerRadiusStyleDescription}"> Description="{Binding CornerRadiusStyleDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ShapeOrganic" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:ui="using:FluentAvalonia.UI.Controls" xmlns:ui="using:FluentAvalonia.UI.Controls"
@@ -14,14 +14,14 @@
Message="These options are intended for debugging, diagnostics, and local plugin development." Message="These options are intended for debugging, diagnostics, and local plugin development."
Margin="0,0,0,16"> Margin="0,0,0,16">
<ui:FAInfoBar.IconSource> <ui:FAInfoBar.IconSource>
<fi:SymbolIconSource Symbol="Info" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FAInfoBar.IconSource> </ui:FAInfoBar.IconSource>
</ui:FAInfoBar> </ui:FAInfoBar>
<ui:FASettingsExpander Header="Developer mode" <ui:FASettingsExpander Header="Developer mode"
Description="Enable developer-focused startup helpers and diagnostics."> Description="Enable developer-focused startup helpers and diagnostics.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="DeveloperBoard" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding IsDevModeEnabled}" /> <ToggleSwitch IsChecked="{Binding IsDevModeEnabled}" />
@@ -31,7 +31,7 @@
<ui:FASettingsExpander Header="Three-finger desktop swipe" <ui:FASettingsExpander Header="Three-finger desktop swipe"
Description="Enable desktop page switching gestures when the current platform supports them."> Description="Enable desktop page switching gestures when the current platform supports them.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Gesture" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding EnableThreeFingerSwipe}" /> <ToggleSwitch IsChecked="{Binding EnableThreeFingerSwipe}" />
@@ -41,7 +41,7 @@
<ui:FASettingsExpander Header="Fused desktop experience" <ui:FASettingsExpander Header="Fused desktop experience"
Description="Enable the fused desktop shell and its related experimental entry points."> Description="Enable the fused desktop shell and its related experimental entry points.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Apps" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding EnableFusedDesktop}" /> <ToggleSwitch IsChecked="{Binding EnableFusedDesktop}" />
@@ -53,11 +53,11 @@
<ui:FASettingsExpander Header="Development plugin path" <ui:FASettingsExpander Header="Development plugin path"
Description="Load a local plugin output directory for iterative debugging without packaging."> Description="Load a local plugin output directory for iterative debugging without packaging.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="FolderLink" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<TextBox Text="{Binding DevPluginPath}" <TextBox Text="{Binding DevPluginPath}"
Watermark="C:\path\to\plugin\bin\Debug\net10.0" PlaceholderText="C:\path\to\plugin\bin\Debug\net10.0"
Width="360" Width="360"
MinWidth="200" /> MinWidth="200" />
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
@@ -68,7 +68,7 @@
<ui:FASettingsExpander Header="Developer startup arguments" <ui:FASettingsExpander Header="Developer startup arguments"
Description="Use these launch arguments or environment variables to start the app in development scenarios."> Description="Use these launch arguments or environment variables to start the app in development scenarios.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="WindowConsole" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<StackPanel Margin="0,8,0,0" <StackPanel Margin="0,8,0,0"

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -14,7 +14,7 @@
<ui:FASettingsExpander Header="{Binding LanguageHeader}"> <ui:FASettingsExpander Header="{Binding LanguageHeader}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Settings" /> <ui:FASymbolIconSource Symbol="{x:Static ui:FASymbol.Settings}" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -32,7 +32,7 @@
<ui:FASettingsExpander Header="{Binding TimeZoneHeader}" <ui:FASettingsExpander Header="{Binding TimeZoneHeader}"
Description="{Binding TimeZoneDescription}"> Description="{Binding TimeZoneDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Clock" /> <ui:FASymbolIconSource Symbol="{x:Static ui:FASymbol.Clock}" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="240" <ComboBox Width="240"
@@ -49,7 +49,7 @@
<ui:FASettingsExpander Header="{Binding PreviewHeader}"> <ui:FASettingsExpander Header="{Binding PreviewHeader}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Calendar" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<Grid ColumnDefinitions="Auto,*" <Grid ColumnDefinitions="Auto,*"
@@ -82,7 +82,7 @@
Description="{Binding RuntimeDescription}" Description="{Binding RuntimeDescription}"
IsExpanded="True"> IsExpanded="True">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="DeveloperBoard" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -107,7 +107,7 @@
Description="{Binding FadeTransitionDescription}" Description="{Binding FadeTransitionDescription}"
IsVisible="{Binding IsSlideTransitionAvailable}"> IsVisible="{Binding IsSlideTransitionAvailable}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Window" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding EnableFadeTransition}" <ToggleSwitch IsChecked="{Binding EnableFadeTransition}"
@@ -119,7 +119,7 @@
Description="Use a slide-in startup transition on supported Windows builds. This option disables the fade transition." Description="Use a slide-in startup transition on supported Windows builds. This option disables the fade transition."
IsVisible="{Binding IsSlideTransitionAvailable}"> IsVisible="{Binding IsSlideTransitionAvailable}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Gesture" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding EnableSlideTransition}" /> <ToggleSwitch IsChecked="{Binding EnableSlideTransition}" />
@@ -129,7 +129,7 @@
<ui:FASettingsExpander Header="Show in taskbar" <ui:FASettingsExpander Header="Show in taskbar"
Description="Keep the main window visible in the taskbar while the desktop host is running."> Description="Keep the main window visible in the taskbar while the desktop host is running.">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Window" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding ShowInTaskbar}" /> <ToggleSwitch IsChecked="{Binding ShowInTaskbar}" />

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -61,7 +61,7 @@
Description="{Binding AppearanceDescription}" Description="{Binding AppearanceDescription}"
IsExpanded="True"> IsExpanded="True">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="{x:Static symbol:Symbol.Apps}" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<Grid ColumnDefinitions="*,Auto"> <Grid ColumnDefinitions="*,Auto">
@@ -85,7 +85,7 @@
Description="{Binding HiddenDescription}" Description="{Binding HiddenDescription}"
IsExpanded="True"> IsExpanded="True">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Apps" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<StackPanel Spacing="8"> <StackPanel Spacing="8">
@@ -103,7 +103,7 @@
Description="{Binding TypeLabel}" Description="{Binding TypeLabel}"
IsClickEnabled="False"> IsClickEnabled="False">
<ui:FASettingsExpanderItem.IconSource> <ui:FASettingsExpanderItem.IconSource>
<fi:SymbolIconSource Symbol="{Binding IconSymbol}" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpanderItem.IconSource> </ui:FASettingsExpanderItem.IconSource>
<ui:FASettingsExpanderItem.Footer> <ui:FASettingsExpanderItem.Footer>
<Button Command="{Binding RestoreCommand}" <Button Command="{Binding RestoreCommand}"

View File

@@ -16,7 +16,7 @@
<ui:FASettingsExpander Header="{Binding EnableNotificationHeader}" <ui:FASettingsExpander Header="{Binding EnableNotificationHeader}"
Description="{Binding EnableNotificationDescription}"> Description="{Binding EnableNotificationDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Alert" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding IsNotificationEnabled}" /> <ToggleSwitch IsChecked="{Binding IsNotificationEnabled}" />
@@ -32,7 +32,7 @@
<ui:FASettingsExpander Header="{Binding HoverPauseHeader}" <ui:FASettingsExpander Header="{Binding HoverPauseHeader}"
Description="{Binding HoverPauseDescription}"> Description="{Binding HoverPauseDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="CursorHover" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding IsHoverPauseEnabled}" /> <ToggleSwitch IsChecked="{Binding IsHoverPauseEnabled}" />
@@ -42,7 +42,7 @@
<ui:FASettingsExpander Header="{Binding ClickCloseHeader}" <ui:FASettingsExpander Header="{Binding ClickCloseHeader}"
Description="{Binding ClickCloseDescription}"> Description="{Binding ClickCloseDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="CursorClick" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding IsClickCloseEnabled}" /> <ToggleSwitch IsChecked="{Binding IsClickCloseEnabled}" />
@@ -52,10 +52,10 @@
<ui:FASettingsExpander Header="{Binding MaxNotificationsHeader}" <ui:FASettingsExpander Header="{Binding MaxNotificationsHeader}"
Description="{Binding MaxNotificationsDescription}"> Description="{Binding MaxNotificationsDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="NumberSymbol" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ui:NumberBox Value="{Binding MaxNotificationsPerPosition}" <ui:FANumberBox Value="{Binding MaxNotificationsPerPosition}"
Minimum="1" Minimum="1"
Maximum="10" Maximum="10"
Width="100" Width="100"
@@ -72,7 +72,7 @@
<ui:FASettingsExpander Header="{Binding TestNotificationHeader}" <ui:FASettingsExpander Header="{Binding TestNotificationHeader}"
Description="{Binding TestNotificationDescription}"> Description="{Binding TestNotificationDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Beaker" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
@@ -94,7 +94,7 @@
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
<ui:NumberBox Width="100" <ui:FANumberBox Width="100"
Minimum="1" Minimum="1"
Maximum="30" Maximum="30"
SpinButtonPlacementMode="Inline" SpinButtonPlacementMode="Inline"

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:ui="using:FluentAvalonia.UI.Controls" xmlns:ui="using:FluentAvalonia.UI.Controls"
@@ -11,14 +11,14 @@
<ui:FASettingsExpander Header="{Binding RefreshButtonText}" <ui:FASettingsExpander Header="{Binding RefreshButtonText}"
Description="{Binding StatusMessage}"> Description="{Binding StatusMessage}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ShoppingBag" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<Grid ColumnDefinitions="*,Auto" <Grid ColumnDefinitions="*,Auto"
ColumnSpacing="12"> ColumnSpacing="12">
<TextBox x:Name="SearchTextBox" <TextBox x:Name="SearchTextBox"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Watermark="{Binding SearchPlaceholder}" PlaceholderText="{Binding SearchPlaceholder}"
Focusable="True" Focusable="True"
IsTabStop="True" /> IsTabStop="True" />
<Button Grid.Column="1" <Button Grid.Column="1"

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -12,7 +12,7 @@
<ui:FASettingsExpander Header="{Binding RefreshButtonText}" <ui:FASettingsExpander Header="{Binding RefreshButtonText}"
Description="{Binding StatusMessage}"> Description="{Binding StatusMessage}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ArrowSync" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<Button Command="{Binding RefreshCommand}" <Button Command="{Binding RefreshCommand}"
@@ -31,7 +31,7 @@
<DataTemplate x:DataType="vm:InstalledPluginItemViewModel"> <DataTemplate x:DataType="vm:InstalledPluginItemViewModel">
<ui:FASettingsExpander> <ui:FASettingsExpander>
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="PuzzleCube" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Header> <ui:FASettingsExpander.Header>
<StackPanel> <StackPanel>

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -15,7 +15,7 @@
<ui:FASettingsExpander Header="{Binding CrashUploadHeader}" <ui:FASettingsExpander Header="{Binding CrashUploadHeader}"
Description="{Binding CrashUploadDescription}"> Description="{Binding CrashUploadDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ShieldDismiss" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding UploadAnonymousCrashData}" /> <ToggleSwitch IsChecked="{Binding UploadAnonymousCrashData}" />
@@ -25,7 +25,7 @@
<ui:FASettingsExpander Header="{Binding UsageUploadHeader}" <ui:FASettingsExpander Header="{Binding UsageUploadHeader}"
Description="{Binding UsageUploadDescription}"> Description="{Binding UsageUploadDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Info" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding UploadAnonymousUsageData}" /> <ToggleSwitch IsChecked="{Binding UploadAnonymousUsageData}" />

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -15,7 +15,7 @@
<ui:FASettingsExpander Header="{Binding ClockHeader}" <ui:FASettingsExpander Header="{Binding ClockHeader}"
Description="{Binding ClockDescription}"> Description="{Binding ClockDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Clock" /> <ui:FASymbolIconSource Symbol="{x:Static ui:FASymbol.Clock}" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding ShowClock}" /> <ToggleSwitch IsChecked="{Binding ShowClock}" />
@@ -93,7 +93,7 @@
<ui:FASettingsExpander Header="{Binding TextCapsuleHeader}" <ui:FASettingsExpander Header="{Binding TextCapsuleHeader}"
Description="{Binding TextCapsuleDescription}"> Description="{Binding TextCapsuleDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="TextQuote" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding ShowTextCapsule}" /> <ToggleSwitch IsChecked="{Binding ShowTextCapsule}" />
@@ -110,7 +110,7 @@
Height="100" Height="100"
IsEnabled="{Binding ShowTextCapsule}" IsEnabled="{Binding ShowTextCapsule}"
Text="{Binding TextCapsuleContent}" Text="{Binding TextCapsuleContent}"
Watermark="Enter Markdown text..." /> PlaceholderText="Enter Markdown text..." />
</Grid> </Grid>
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
@@ -147,7 +147,7 @@
<ui:FASettingsExpander Header="{Binding NetworkSpeedHeader}" <ui:FASettingsExpander Header="{Binding NetworkSpeedHeader}"
Description="{Binding NetworkSpeedDescription}"> Description="{Binding NetworkSpeedDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ArrowBidirectionalUpDown" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding ShowNetworkSpeed}" /> <ToggleSwitch IsChecked="{Binding ShowNetworkSpeed}" />
@@ -239,7 +239,7 @@
<ui:FASettingsExpander Header="{Binding SpacingHeader}" <ui:FASettingsExpander Header="{Binding SpacingHeader}"
Description="{Binding SpacingDescription}"> Description="{Binding SpacingDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Apps" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="180" <ComboBox Width="180"
@@ -257,7 +257,7 @@
ColumnSpacing="16"> ColumnSpacing="16">
<TextBlock Text="{Binding CustomSpacingLabel}" <TextBlock Text="{Binding CustomSpacingLabel}"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
<ui:NumberBox Grid.Column="1" <ui:FANumberBox Grid.Column="1"
Width="160" Width="160"
Minimum="0" Minimum="0"
Maximum="30" Maximum="30"
@@ -278,7 +278,7 @@
<ui:FASettingsExpander Header="{Binding StatusBarShadowHeader}" <ui:FASettingsExpander Header="{Binding StatusBarShadowHeader}"
Description="{Binding StatusBarShadowDescription}"> Description="{Binding StatusBarShadowDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Square" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding StatusBarShadowEnabled}" /> <ToggleSwitch IsChecked="{Binding StatusBarShadowEnabled}" />

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:ui="using:FluentAvalonia.UI.Controls" xmlns:ui="using:FluentAvalonia.UI.Controls"
@@ -13,7 +13,7 @@
Header="{Binding MasterSwitchHeader}" Header="{Binding MasterSwitchHeader}"
Description="{Binding MasterSwitchDescription}"> Description="{Binding MasterSwitchDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="DataHistogram" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding StudyEnabled}" /> <ToggleSwitch IsChecked="{Binding StudyEnabled}" />
@@ -26,7 +26,7 @@
Description="{Binding NoiseMonitoringDescription}" Description="{Binding NoiseMonitoringDescription}"
IsEnabled="{Binding StudyEnabled}"> IsEnabled="{Binding StudyEnabled}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Mic" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<!-- 闁插洭娉︽0鎴犲芳 --> <!-- 闁插洭娉︽0鎴犲芳 -->
@@ -93,7 +93,7 @@
Description="{Binding FocusTimerDescription}" Description="{Binding FocusTimerDescription}"
IsEnabled="{Binding StudyEnabled}"> IsEnabled="{Binding StudyEnabled}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Timer" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<!-- 娑撴挻鏁為弮鍫曟毐 --> <!-- 娑撴挻鏁為弮鍫曟毐 -->
@@ -231,7 +231,7 @@
Description="{Binding AlertDescription}" Description="{Binding AlertDescription}"
IsEnabled="{Binding StudyEnabled}"> IsEnabled="{Binding StudyEnabled}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Alert" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<!-- 閸n亪鐓堕幍鎾存焽閹绘劙鍟?--> <!-- 閸n亪鐓堕幍鎾存焽閹绘劙鍟?-->
@@ -273,7 +273,7 @@
Description="{Binding DisplayDescription}" Description="{Binding DisplayDescription}"
IsEnabled="{Binding StudyEnabled}"> IsEnabled="{Binding StudyEnabled}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Eye" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<!-- 閺勫墽銇氱€圭偞妞傞崚鍡氱 --> <!-- 閺勫墽銇氱€圭偞妞傞崚鍡氱 -->

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -167,7 +167,7 @@
Header="{Binding UpdateChannelLabel}" Header="{Binding UpdateChannelLabel}"
Description="{Binding SelectedUpdateChannelDescription}"> Description="{Binding SelectedUpdateChannelDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="BranchFork" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -185,7 +185,7 @@
IsClickEnabled="True" IsClickEnabled="True"
Command="{Binding ForceCheckUpdateCommand}"> Command="{Binding ForceCheckUpdateCommand}">
<ui:FASettingsExpanderItem.IconSource> <ui:FASettingsExpanderItem.IconSource>
<fi:SymbolIconSource Symbol="ArrowSync" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpanderItem.IconSource> </ui:FASettingsExpanderItem.IconSource>
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
</ui:FASettingsExpander> </ui:FASettingsExpander>
@@ -194,7 +194,7 @@
Header="{Binding UpdateSourceLabel}" Header="{Binding UpdateSourceLabel}"
Description="{Binding SelectedUpdateSourceDescription}"> Description="{Binding SelectedUpdateSourceDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="GlobeArrowForward" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -213,7 +213,7 @@
Header="{Binding UpdateModeLabel}" Header="{Binding UpdateModeLabel}"
Description="{Binding SelectedUpdateModeDescription}"> Description="{Binding SelectedUpdateModeDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Options" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="260" <ComboBox Width="260"
@@ -232,10 +232,10 @@
Header="{Binding DownloadThreadsLabel}" Header="{Binding DownloadThreadsLabel}"
Description="{Binding DownloadThreadsDescription}"> Description="{Binding DownloadThreadsDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ArrowDownload" /> <ui:FAFontIconSource Glyph="&#xF06C0;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ui:NumberBox Width="160" <ui:FANumberBox Width="160"
Minimum="1" Minimum="1"
Maximum="128" Maximum="128"
SpinButtonPlacementMode="Inline" SpinButtonPlacementMode="Inline"

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:controls="using:LanMountainDesktop.Controls" xmlns:controls="using:LanMountainDesktop.Controls"
@@ -206,7 +206,7 @@
<ui:FASettingsExpander Header="{Binding WallpaperTypeLabel}"> <ui:FASettingsExpander Header="{Binding WallpaperTypeLabel}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Layer" /> <ui:FAFontIconSource Glyph="&#xF02A0;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="200" <ComboBox Width="200"
@@ -225,7 +225,7 @@
IsVisible="{Binding IsImage}" IsVisible="{Binding IsImage}"
Margin="0,4,0,0"> Margin="0,4,0,0">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="FolderOpen" /> <ui:FAFontIconSource Glyph="&#xF0274;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
@@ -246,7 +246,7 @@
IsVisible="{Binding IsSystemWallpaper}" IsVisible="{Binding IsSystemWallpaper}"
Margin="0,4,0,0"> Margin="0,4,0,0">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Clock" /> <ui:FAFontIconSource Glyph="&#xF0168;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
@@ -277,7 +277,7 @@
IsVisible="{Binding IsImage}" IsVisible="{Binding IsImage}"
Margin="0,4,0,0"> Margin="0,4,0,0">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Maximize" /> <ui:FAFontIconSource Glyph="&#xF0A20;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="200" <ComboBox Width="200"
@@ -297,7 +297,7 @@
IsVisible="{Binding IsSystemWallpaper}" IsVisible="{Binding IsSystemWallpaper}"
Margin="0,4,0,0"> Margin="0,4,0,0">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Maximize" /> <ui:FAFontIconSource Glyph="&#xF0A20;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="200" <ComboBox Width="200"

View File

@@ -1,4 +1,4 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LanMountainDesktop.ViewModels" xmlns:vm="using:LanMountainDesktop.ViewModels"
xmlns:models="using:LanMountainDesktop.Models" xmlns:models="using:LanMountainDesktop.Models"
@@ -47,7 +47,7 @@
<Button Classes="settings-accent-button" <Button Classes="settings-accent-button"
Command="{Binding RefreshPreviewCommand}" Command="{Binding RefreshPreviewCommand}"
Content="{Binding RefreshButtonText}" /> Content="{Binding RefreshButtonText}" />
<ui:ProgressRing IsIndeterminate="True" <ui:FAProgressRing IsIndeterminate="True"
IsVisible="{Binding IsRefreshingPreview}" IsVisible="{Binding IsRefreshingPreview}"
Width="28" Width="28"
Height="28" Height="28"
@@ -60,7 +60,7 @@
Header="{Binding LocationSourceHeader}" Header="{Binding LocationSourceHeader}"
Description="{Binding LocationSourceDescription}"> Description="{Binding LocationSourceDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="WeatherMoon" /> <ui:FAFontIconSource Glyph="&#xF0504;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ComboBox Width="220" <ComboBox Width="220"
@@ -85,7 +85,7 @@
Description="{Binding CitySearchDescription}" Description="{Binding CitySearchDescription}"
IsVisible="{Binding IsCitySearchMode}"> IsVisible="{Binding IsCitySearchMode}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Search" /> <ui:FAFontIconSource Glyph="&#xF03F4;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<Button Classes="settings-accent-button" <Button Classes="settings-accent-button"
@@ -98,7 +98,7 @@
ColumnSpacing="12"> ColumnSpacing="12">
<TextBox x:Name="SearchKeywordTextBox" <TextBox x:Name="SearchKeywordTextBox"
Text="{Binding SearchKeyword}" Text="{Binding SearchKeyword}"
Watermark="{Binding SearchPlaceholder}" PlaceholderText="{Binding SearchPlaceholder}"
Focusable="True" Focusable="True"
IsTabStop="True" /> IsTabStop="True" />
<Button Grid.Column="1" <Button Grid.Column="1"
@@ -106,7 +106,7 @@
Content="{Binding SearchButtonText}" /> Content="{Binding SearchButtonText}" />
</Grid> </Grid>
<ui:ProgressRing IsIndeterminate="True" <ui:FAProgressRing IsIndeterminate="True"
IsVisible="{Binding IsSearching}" IsVisible="{Binding IsSearching}"
Width="24" Width="24"
Height="24" Height="24"
@@ -123,9 +123,10 @@
<DataTemplate x:DataType="models:WeatherLocation"> <DataTemplate x:DataType="models:WeatherLocation">
<Grid ColumnDefinitions="Auto,*" <Grid ColumnDefinitions="Auto,*"
ColumnSpacing="12"> ColumnSpacing="12">
<fi:SymbolIcon Classes="icon-s" <ui:FAFontIcon Classes="icon-s"
Margin="0,2,0,0" Margin="0,2,0,0"
Symbol="City" /> Glyph="&#xF0950;"
FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
<StackPanel Grid.Column="1" <StackPanel Grid.Column="1"
Spacing="4"> Spacing="4">
<TextBlock Classes="settings-item-label" <TextBlock Classes="settings-item-label"
@@ -148,7 +149,7 @@
Description="{Binding CoordinatesDescription}" Description="{Binding CoordinatesDescription}"
IsVisible="{Binding IsCoordinatesMode}"> IsVisible="{Binding IsCoordinatesMode}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Location" /> <ui:FAFontIconSource Glyph="&#xF02BC;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<Button Classes="settings-accent-button" <Button Classes="settings-accent-button"
@@ -183,14 +184,14 @@
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<TextBox x:Name="LocationKeyTextBox" <TextBox x:Name="LocationKeyTextBox"
Text="{Binding LocationKey}" Text="{Binding LocationKey}"
Watermark="{Binding LocationKeyPlaceholder}" PlaceholderText="{Binding LocationKeyPlaceholder}"
Focusable="True" Focusable="True"
IsTabStop="True" /> IsTabStop="True" />
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
<ui:FASettingsExpanderItem> <ui:FASettingsExpanderItem>
<TextBox x:Name="LocationNameTextBox" <TextBox x:Name="LocationNameTextBox"
Text="{Binding LocationName}" Text="{Binding LocationName}"
Watermark="{Binding LocationNamePlaceholder}" PlaceholderText="{Binding LocationNamePlaceholder}"
Focusable="True" Focusable="True"
IsTabStop="True" /> IsTabStop="True" />
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
@@ -200,7 +201,7 @@
Header="{Binding LocationServicesHeader}" Header="{Binding LocationServicesHeader}"
Description="{Binding LocationServicesDescription}"> Description="{Binding LocationServicesDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Location" /> <ui:FAFontIconSource Glyph="&#xF02BC;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<Button Classes="settings-accent-button" <Button Classes="settings-accent-button"
@@ -224,7 +225,7 @@
</Grid> </Grid>
</ui:FASettingsExpanderItem> </ui:FASettingsExpanderItem>
<ui:FASettingsExpanderItem IsVisible="{Binding IsRefreshingLocation}"> <ui:FASettingsExpanderItem IsVisible="{Binding IsRefreshingLocation}">
<ui:ProgressRing IsIndeterminate="True" <ui:FAProgressRing IsIndeterminate="True"
IsVisible="{Binding IsRefreshingLocation}" IsVisible="{Binding IsRefreshingLocation}"
Width="28" Width="28"
Height="28" Height="28"
@@ -236,7 +237,7 @@
Header="{Binding AlertFilterHeader}" Header="{Binding AlertFilterHeader}"
Description="{Binding AlertFilterDescription}"> Description="{Binding AlertFilterDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="Warning" /> <ui:FAFontIconSource Glyph="&#xF04E8;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<TextBox x:Name="ExcludedAlertsTextBox" <TextBox x:Name="ExcludedAlertsTextBox"
@@ -254,7 +255,7 @@
Header="{Binding RequestHeader}" Header="{Binding RequestHeader}"
Description="{Binding RequestDescription}"> Description="{Binding RequestDescription}">
<ui:FASettingsExpander.IconSource> <ui:FASettingsExpander.IconSource>
<fi:SymbolIconSource Symbol="ShieldDismiss" /> <ui:FAFontIconSource Glyph="&#xF0BC4;" FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
</ui:FASettingsExpander.IconSource> </ui:FASettingsExpander.IconSource>
<ui:FASettingsExpander.Footer> <ui:FASettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding NoTlsRequests}" /> <ToggleSwitch IsChecked="{Binding NoTlsRequests}" />

View File

@@ -11,7 +11,7 @@
MinHeight="480" MinHeight="480"
CanResize="True" CanResize="True"
WindowStartupLocation="Manual" WindowStartupLocation="Manual"
SystemDecorations="BorderOnly" WindowDecorations="BorderOnly"
FontFamily="{DynamicResource AppFontFamily}" FontFamily="{DynamicResource AppFontFamily}"
Background="Transparent" Background="Transparent"
Title="{Binding Title}"> Title="{Binding Title}">

View File

@@ -163,9 +163,7 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
if (_useSystemChrome) if (_useSystemChrome)
{ {
ExtendClientAreaToDecorationsHint = true; ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.PreferSystemChrome; WindowDecorations = WindowDecorations.Full;
ExtendClientAreaTitleBarHeightHint = -1;
SystemDecorations = SystemDecorations.Full;
if (WindowTitleBarHost is { }) if (WindowTitleBarHost is { })
{ {
@@ -174,10 +172,8 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
return; return;
} }
SystemDecorations = SystemDecorations.BorderOnly; WindowDecorations = WindowDecorations.BorderOnly;
ExtendClientAreaToDecorationsHint = true; ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
ExtendClientAreaTitleBarHeightHint = 48;
if (WindowTitleBarHost is { }) if (WindowTitleBarHost is { })
{ {
@@ -212,11 +208,7 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
{ {
Content = page.Title, Content = page.Title,
Tag = page.PageId, Tag = page.PageId,
IconSource = new FluentIcons.Avalonia.SymbolIconSource IconSource = CreateSettingsIconSource(MapIcon(page.IconKey))
{
Symbol = MapIcon(page.IconKey),
IconVariant = FluentIcons.Common.IconVariant.Regular
}
}); });
previousCategory = page.Category; previousCategory = page.Category;
@@ -748,4 +740,29 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
_ => Symbol.Settings _ => Symbol.Settings
}; };
} }
private static FAFontIconSource CreateSettingsIconSource(Symbol symbol)
{
var symbolIcon = new FluentIcons.Avalonia.SymbolIcon
{
Symbol = symbol,
IconVariant = FluentIcons.Common.IconVariant.Regular
};
// 使用反射获取 IconText 和 IconFont
var iconTextProp = typeof(FluentIcons.Avalonia.SymbolIcon).GetProperty("IconText", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var iconFontProp = typeof(FluentIcons.Avalonia.SymbolIcon).GetProperty("IconFont", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var iconText = iconTextProp?.GetValue(symbolIcon) as string ?? "?";
var iconFont = iconFontProp?.GetValue(symbolIcon);
var fontFamily = iconFont?.GetType().GetProperty("FontFamily")?.GetValue(iconFont) as Avalonia.Media.FontFamily
?? new Avalonia.Media.FontFamily("avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons");
return new FAFontIconSource
{
Glyph = iconText,
FontFamily = fontFamily,
FontSize = 16
};
}
} }

View File

@@ -3,7 +3,7 @@
xmlns:fi="using:FluentIcons.Avalonia" xmlns:fi="using:FluentIcons.Avalonia"
x:Class="LanMountainDesktop.Views.StudySessionReportWindow" x:Class="LanMountainDesktop.Views.StudySessionReportWindow"
x:CompileBindings="False" x:CompileBindings="False"
SystemDecorations="None" WindowDecorations="None"
Background="Transparent" Background="Transparent"
ShowInTaskbar="False" ShowInTaskbar="False"
Topmost="True" Topmost="True"
@@ -12,7 +12,6 @@
Height="600" Height="600"
TransparencyLevelHint="Transparent" TransparencyLevelHint="Transparent"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1" ExtendClientAreaTitleBarHeightHint="-1"
WindowStartupLocation="CenterOwner"> WindowStartupLocation="CenterOwner">

View File

@@ -1,11 +1,10 @@
<Window xmlns="https://github.com/avaloniaui" <Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="LanMountainDesktop.Views.TransparentOverlayWindow" x:Class="LanMountainDesktop.Views.TransparentOverlayWindow"
SystemDecorations="None" WindowDecorations="None"
CanResize="False" CanResize="False"
ShowInTaskbar="False" ShowInTaskbar="False"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
Background="Transparent" Background="Transparent"
Title="LanMountainDesktop Fused Desktop"> Title="LanMountainDesktop Fused Desktop">
<!-- <!--

View File

@@ -0,0 +1,29 @@
using System;
using System.Linq;
using FluentAvalonia.UI.Controls;
class Test
{
static void Main()
{
var faSymbols = new System.Collections.Generic.HashSet<string>(Enum.GetNames(typeof(FASymbol)));
// 从错误信息中提取的图标名称
var usedIcons = new[]
{
"Info", "Color", "Apps", "Code", "Home", "Settings",
"WeatherMoon", "Search", "Location", "City", "Warning",
"ShieldDismiss", "Shield", "Announcements", "Package",
"StatusCircle", "Book", "BranchFork", "ArrowSync",
"GlobeArrowForward", "Options", "Store", "Layer",
"FolderOpen", "Clock", "Maximize"
};
Console.WriteLine("Checking icon availability in FASymbol:");
foreach (var icon in usedIcons.Distinct().OrderBy(i => i))
{
bool exists = faSymbols.Contains(icon);
Console.WriteLine($" {icon}: {(exists ? "OK" : "MISSING")}");
}
}
}

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAvaloniaUI" />
<PackageReference Include="FluentIcons.Avalonia" />
</ItemGroup>
</Project>

11
test_fluenticons.cs Normal file
View File

@@ -0,0 +1,11 @@
using System;
using FluentIcons.Avalonia;
class Test
{
static void Main()
{
// 尝试创建 SymbolIconSource
var source = new SymbolIconSource();
}
}