From 09d4e2f1a1bc206c80d8d3287d070c70ec7fd63d Mon Sep 17 00:00:00 2001
From: chunhualin1 <chunhualin1@lenovo.com>
Date: 星期五, 14 八月 2026 20:00:52 +0800
Subject: [PATCH] Merge branch 'master' of http://git.linmoli.cn/r/Moli.Desktop
---
src/Moli.Desktop.Tests/Layout/LayoutManagerTests.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/Moli.Desktop.Tests/Layout/LayoutManagerTests.cs b/src/Moli.Desktop.Tests/Layout/LayoutManagerTests.cs
index 3de75b6..50d0eb4 100644
--- a/src/Moli.Desktop.Tests/Layout/LayoutManagerTests.cs
+++ b/src/Moli.Desktop.Tests/Layout/LayoutManagerTests.cs
@@ -28,7 +28,7 @@
Assert.Equal(LayoutManager.MinHeight, result.Value.Bounds.Height);
Assert.Equal(LayoutManager.MaxScale, result.Value.Scale);
Assert.Equal(LayoutManager.MinOpacity, result.Value.Opacity);
- Assert.Equal(DisplayPriority.AppLayer, manager.Update(layout.InstanceId, new WidgetLayoutPatch { DisplayPriority = DisplayPriority.AppLayer }).Value?.DisplayPriority);
+ Assert.Equal(DisplayLayer.AppTop, manager.Update(layout.InstanceId, new WidgetLayoutPatch { DisplayLayer = DisplayLayer.AppTop }).Value?.DisplayLayer);
Assert.True(result.Value.Bounds.Right >= monitor.WorkArea.X + LayoutManager.MinVisibleDip);
Assert.True(result.Value.Bounds.Bottom >= monitor.WorkArea.Y + LayoutManager.MinVisibleDip);
}
@@ -47,6 +47,19 @@
}
[Fact]
+ public async Task Update_AllowsUnlockingLockedWidget()
+ {
+ var (manager, monitor, _) = await CreateLoadedManagerAsync();
+ var plugin = CreatePlugin(locked: true);
+ var layout = manager.CreateFromPlugin(plugin, monitor.Id);
+
+ var result = manager.Update(layout.InstanceId, new WidgetLayoutPatch { IsLocked = false });
+
+ Assert.True(result.Succeeded);
+ Assert.False(result.Value?.IsLocked);
+ }
+
+ [Fact]
public async Task ReconcileMonitors_MovesMissingSecondaryMonitorToPrimary()
{
var (manager, _, diagnostics) = await CreateLoadedManagerAsync();
--
Gitblit v1.9.1