Compare commits

..

7 Commits

Author SHA1 Message Date
lincube
f8073c2020 fix.修复合并产生的问题。 2026-04-29 12:07:26 +08:00
lincube
ae3938ce83 Merge remote-tracking branch 'origin/main' into Avalonia12
# Conflicts:
#	LanMountainDesktop.Launcher/LanMountainDesktop.Launcher.csproj
2026-04-29 11:49:48 +08:00
lincube
0f8e51fb68 Update icon glyphs and symbol mappings
Replace and refine icon sources across settings pages and controls: many FAFontIconSource glyphs were updated to specific Seagull Fluent Icons codepoints, some FASymbolIconSource usages were replaced with FAFontIconSource, and a number of symbol-to-Symbol enum mappings were adjusted (e.g. "Bell" -> AlertOn, "Shield" -> ShieldLock). Also clarified a comment in SettingsWindow and fixed a trailing newline in StudySettingsPage. Changes standardize icon visuals and bridge FluentIcons glyphs into FluentAvalonia icon sources.
2026-04-29 11:01:58 +08:00
lincube
93d6d93815 Migrate to Avalonia 12 and Plugin SDK v5
Upgrade project to the Avalonia 12 baseline and Plugin SDK v5: centralize Avalonia packages, remove legacy WebView.Avalonia usage (use NativeWebView/WebView2 EnvironmentRequested), and update Fluent/Material icon/package usages. Bump multiple package/project versions to 5.0.0 and Avalonia 12.0.1, update plugin template and README/docs to SDK v5, and add PLUGIN_SDK_V5_MIGRATION.md.

Also fix runtime/behavior bugs: make DataLocationResolver use a fixed bootstrap launcher data path and avoid recursive ResolveDataRoot; add legacy-state handling and extraction in OobeStateService; and update component settings tests to reflect migrated storage (DB/backup) and reset cache for test reloads. Various csproj, tests, and docs updated to reflect the migration and ensure build/test compatibility.
2026-04-29 10:16:25 +08:00
lincube
9fb41378eb 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.
2026-04-29 08:50:28 +08:00
lincube
a73ba32700 Enable centralized package versioning
Add <Project> and <PropertyGroup> with <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> to Directory.Packages.props to enable centralized package version management across the repository. This allows package versions to be controlled from this single file instead of individual project files.
2026-04-25 22:51:43 +08:00
lincube
d310fc50ac ava12升级 2026-04-25 22:51:18 +08:00
2 changed files with 2 additions and 70 deletions

View File

@@ -68,7 +68,6 @@ public partial class MainWindow : Window
private long _desktopSwipeLastTimestamp;
private double _desktopSwipeVelocityX;
private double _desktopSwipeBaseOffset;
private int? _desktopSwipePointerId;
private bool _desktopPageContextInitialized;
private bool _desktopPageContextEditMode;
private int _desktopPageContextActiveMask;
@@ -516,7 +515,6 @@ public partial class MainWindow : Window
if (isThreeFinger || isRightDrag)
{
ClearDesktopPageContextSettle(refreshContext: false);
// 婵犵數鍋為崹鍫曞箰閹间絸鍥箥椤旂懓浜?闂傚倷绀侀幉锟犳偡閿旂晫绠惧┑鐘叉搐閺嬩焦銇勯幘鍗炵仼缂佺媭鍨堕弻鈥崇暤椤旂厧鏁俊銈勬缁诲棙銇勯弽銊d粶闁稿鎸搁悾鐑藉炊閳哄﹥鏁ら梻鍌欑劍鐎笛呯矙閹烘挾鈹嶆繛宸簼閸婂鏌ㄩ弮鍥撳ù婧垮€濋弻娑㈠Ψ閿濆懎顬堝銈忕稻閻擄繝寮婚敓鐘查唶婵犲灚鍔栨缂傚倷绶¢崰鏍矓閻㈢數鐭夐柟鐑橆殔鐎氬鏌涢…鎴濅簻闁衡偓椤撶喓绠鹃悗娑欘焽閻鎮介娑辨疁閽樼喖鏌涘☉娆愮稇闁藉啰鍠栭弻鏇熷緞濡櫣浠紓浣插亾濠㈣埖鍔栭悡鐔兼煃鏉炴媽鍏岄柟鐣屽█閹粙顢涘☉娆戠▏濡炪倖娲╃紞渚€宕洪埀顒併亜閹哄秶鍔嶉柛娆忕箻閹鏁愭惔鈥茬敖闂佽鐏氶崝鎴﹀蓟? ClearDesktopPageContextSettle(refreshContext: false);
_isThreeFingerOrRightDragSwipeActive = true;
_isDesktopSwipeActive = true;
@@ -527,8 +525,6 @@ public partial class MainWindow : Window
_desktopSwipeVelocityX = 0;
_desktopSwipeLastTimestamp = Stopwatch.GetTimestamp();
_desktopSwipeBaseOffset = -_currentDesktopSurfaceIndex * _desktopSurfacePageWidth;
_desktopSwipePointerId = pointerId;
e.Handled = true;
// 闂傚倷绀侀幖顐ょ矓閺夋嚚娲煛閸滀焦鏅╅梺鎼炲劘閸斿酣銆呴弻銉﹀€甸柨婵嗗€瑰▍鍡樸亜閹邦喗娅曢柍褜鍓涢幊鎾诲箟闄囬妵鎰板礃椤斻垹娲崺锟犲川椤旈棿鍝楅梻浣虹《濡插懘宕㈤崜褏鐭嗗鑸靛姈閳锋帡鏌涢幇鈺佸缂佺嫏鍕╀簻闁圭儤鎸鹃妴鎺旂磼鏉堛劌娴€规洜鍠栭、鏃堝椽娴i晲缂撻梻鍌欑閹诧紕鎹㈤崒婊呯煋閻庡灚鐡曟慨? e.Handled = true;
return;
@@ -536,7 +532,6 @@ public partial class MainWindow : Window
}
// 闂傚倷绀侀幉锟犫€﹂崶顒€绐楅柟閭﹀墾閼板灝銆掑锝呬壕閻庤娲╃换婵嗩嚕閹绢喗鍋勫瀣閳诲本绻濋悽闈浶㈤柨鏇樺劦瀹曞綊宕归锝呭伎闂佸啿鎼幊蹇涙倿婵犳碍鐓涢柛鏇ㄥ亞缁犳娊鎮? if (IsInteractivePointerSource(e.Source))
if (IsInteractivePointerSource(e.Source))
{
return;
}
@@ -560,13 +555,6 @@ public partial class MainWindow : Window
_desktopSwipeVelocityX = 0;
_desktopSwipeLastTimestamp = Stopwatch.GetTimestamp();
_desktopSwipeBaseOffset = -_currentDesktopSurfaceIndex * _desktopSurfacePageWidth;
_desktopSwipePointerId = pointerId;
}
private bool IsDesktopSwipePointer(IPointer? pointer)
{
return !_desktopSwipePointerId.HasValue ||
pointer is not null && pointer.Id == _desktopSwipePointerId.Value;
}
private static bool IsInteractivePointerSource(object? source)
@@ -748,11 +736,6 @@ public partial class MainWindow : Window
private void OnDesktopPagesPointerMoved(object? sender, PointerEventArgs e)
{
if (_isDesktopSwipeActive && !IsDesktopSwipePointer(e.Pointer))
{
return;
}
if (!_isDesktopSwipeActive || !TryGetPointerPositionInDesktopViewport(e, out var pointerInViewport))
{
return;
@@ -814,11 +797,6 @@ public partial class MainWindow : Window
{
var pointerId = e.Pointer?.Id ?? 0;
_activePointerIds.Remove(pointerId);
if (_isDesktopSwipeActive && !IsDesktopSwipePointer(e.Pointer))
{
return;
}
if (EndDesktopSwipeInteraction(e.Pointer))
{
@@ -830,17 +808,7 @@ public partial class MainWindow : Window
{
var pointerId = e.Pointer?.Id ?? 0;
_activePointerIds.Remove(pointerId);
if (!_isDesktopSwipeActive || !IsDesktopSwipePointer(e.Pointer))
{
return;
}
if (e.Pointer?.Captured == DesktopPagesViewport)
{
return;
}
EndDesktopSwipeInteraction(e.Pointer);
}
@@ -861,7 +829,6 @@ public partial class MainWindow : Window
_isDesktopSwipeDirectionLocked = false;
_isThreeFingerOrRightDragSwipeActive = false;
_activePointerIds.Clear();
_desktopSwipePointerId = null;
_desktopSwipeVelocityX = 0;
_desktopSwipeLastTimestamp = 0;
if (wasDirectionLocked)
@@ -884,7 +851,6 @@ public partial class MainWindow : Window
_isDesktopSwipeDirectionLocked = false;
_isThreeFingerOrRightDragSwipeActive = false;
_activePointerIds.Clear();
_desktopSwipePointerId = null;
if (pointer?.Captured == DesktopPagesViewport)
{

View File

@@ -34,7 +34,6 @@ public partial class TransparentOverlayWindow : Window
private Point _swipeLastPoint;
private double _swipeVelocityX;
private long _swipeLastTimestamp;
private int? _swipePointerId;
// 三指/右键拖动状态
private bool _isThreeFingerOrRightDragSwipeActive;
@@ -625,7 +624,6 @@ public partial class TransparentOverlayWindow : Window
_swipeLastPoint = pointerPos;
_swipeVelocityX = 0;
_swipeLastTimestamp = Stopwatch.GetTimestamp();
_swipePointerId = pointerId;
e.Handled = true;
}
else
@@ -636,12 +634,6 @@ public partial class TransparentOverlayWindow : Window
protected override void OnPointerMoved(PointerEventArgs e)
{
if (_isSwipeActive && !IsSwipePointer(e.Pointer))
{
base.OnPointerMoved(e);
return;
}
if (!_isSwipeActive)
{
base.OnPointerMoved(e);
@@ -694,12 +686,6 @@ public partial class TransparentOverlayWindow : Window
{
var pointerId = e.Pointer?.Id ?? 0;
_activePointerIds.Remove(pointerId);
if (_isSwipeActive && !IsSwipePointer(e.Pointer))
{
base.OnPointerReleased(e);
return;
}
if (_isSwipeActive)
{
@@ -717,19 +703,7 @@ public partial class TransparentOverlayWindow : Window
{
var pointerId = e.Pointer?.Id ?? 0;
_activePointerIds.Remove(pointerId);
if (_isSwipeActive && !IsSwipePointer(e.Pointer))
{
base.OnPointerCaptureLost(e);
return;
}
if (_isSwipeActive && e.Pointer?.Captured == this)
{
base.OnPointerCaptureLost(e);
return;
}
if (_isSwipeActive)
{
EndSwipeInteraction(e.Pointer);
@@ -751,12 +725,6 @@ public partial class TransparentOverlayWindow : Window
return false;
}
}
private bool IsSwipePointer(IPointer? pointer)
{
return !_swipePointerId.HasValue ||
pointer is not null && pointer.Id == _swipePointerId.Value;
}
private void UpdateSwipeVelocity(Point currentPoint)
{
@@ -786,7 +754,6 @@ public partial class TransparentOverlayWindow : Window
_isSwipeDirectionLocked = false;
_isThreeFingerOrRightDragSwipeActive = false;
_activePointerIds.Clear();
_swipePointerId = null;
_swipeVelocityX = 0;
_swipeLastTimestamp = 0;
}
@@ -802,7 +769,6 @@ public partial class TransparentOverlayWindow : Window
_isSwipeDirectionLocked = false;
_isThreeFingerOrRightDragSwipeActive = false;
_activePointerIds.Clear();
_swipePointerId = null;
if (pointer?.Captured == this)
{