mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Replace UI DispatcherTimer polling with a StudySnapshotRenderGate across multiple widgets to queue and apply only the latest analytics snapshot; components updated include StudyDeductionReasonsWidget, StudyEnvironmentWidget, StudyInterruptDensityWidget, StudyNoiseCurveWidget. Add StudySnapshotRenderGate implementation to coordinate rendering and monitoring leases and update subscription/lease lifecycle handling (subscribe/unsubscribe, Acquire/Dispose leases, Clear/Dispose gate). Rewrite chart controls (StudyNoiseCurveChartControl and StudyNoiseDistributionScatterChartControl) to use stable logical-time origins, split series into static vs dynamic tails, add geometry/sample caching, stable jitter/coordinate mapping helpers, and expose internal helpers & counts for testing. Add unit tests (StudyComponentRenderingTests) covering the render gate and chart behaviors (layer counts, logical X mapping, stable jitter, cache rebuild). These changes improve rendering correctness and performance by avoiding redundant renders and enabling deterministic chart layout.
24 lines
658 B
C#
24 lines
658 B
C#
using System;
|
|
using Avalonia.Controls;
|
|
using LanMountainDesktop.Models;
|
|
using LanMountainDesktop.Services.Settings;
|
|
|
|
namespace LanMountainDesktop.Services;
|
|
|
|
public interface IMaterialColorService
|
|
{
|
|
MaterialColorSnapshot GetMaterialColorSnapshot();
|
|
|
|
MaterialColorSnapshot BuildMaterialColorPreview(ThemeAppearanceSettingsState pendingState);
|
|
|
|
event EventHandler<MaterialColorSnapshot>? MaterialColorChanged;
|
|
|
|
void ApplyThemeResources(IResourceDictionary resources);
|
|
|
|
MaterialSurfaceSnapshot GetSurface(MaterialSurfaceRole role);
|
|
|
|
void ApplyWindowMaterial(Window window, MaterialSurfaceRole role);
|
|
|
|
void RefreshWallpaperColors();
|
|
}
|