Verify Views files against decompiled, extract embedded types
Fixed files: - SkiaImageButton.cs: Added SVG support with multi-path search - SkiaNavigationPage.cs: Added LinuxApplication.IsGtkMode check - SkiaRefreshView.cs: Added ICommand support (Command, CommandParameter) - SkiaTemplatedView.cs: Added missing using statements Extracted embedded types to separate files (matching decompiled pattern): - From SkiaMenuBar.cs: MenuBarItem, MenuItem, SkiaMenuFlyout, MenuItemClickedEventArgs - From SkiaNavigationPage.cs: NavigationEventArgs - From SkiaTabbedPage.cs: TabItem - From SkiaVisualStateManager.cs: SkiaVisualStateGroupList, SkiaVisualStateGroup, SkiaVisualState, SkiaVisualStateSetter - From SkiaSwipeView.cs: SwipeItem, SwipeStartedEventArgs, SwipeEndedEventArgs - From SkiaFlyoutPage.cs: FlyoutLayoutBehavior (already separate) - From SkiaIndicatorView.cs: IndicatorShape (already separate) - From SkiaBorder.cs: SkiaFrame - From SkiaCarouselView.cs: PositionChangedEventArgs - From SkiaCollectionView.cs: SkiaSelectionMode, ItemsLayoutOrientation - From SkiaContentPresenter.cs: LayoutAlignment Verified matching decompiled: - SkiaContextMenu.cs, SkiaFlexLayout.cs, SkiaGraphicsView.cs Build: 0 errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -313,31 +313,3 @@ public class SkiaRenderingEngine : IDisposable
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class ResourceCache : IDisposable
|
||||
{
|
||||
private readonly Dictionary<string, SKTypeface> _typefaces = new();
|
||||
private bool _disposed;
|
||||
|
||||
public SKTypeface GetTypeface(string fontFamily, SKFontStyle style)
|
||||
{
|
||||
var key = $"{fontFamily}_{style.Weight}_{style.Width}_{style.Slant}";
|
||||
if (!_typefaces.TryGetValue(key, out var typeface))
|
||||
{
|
||||
typeface = SKTypeface.FromFamilyName(fontFamily, style) ?? SKTypeface.Default;
|
||||
_typefaces[key] = typeface;
|
||||
}
|
||||
return typeface;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
foreach (var tf in _typefaces.Values) tf.Dispose();
|
||||
_typefaces.Clear();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!_disposed) { Clear(); _disposed = true; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user