Skip to content

Commit

Permalink
chore: Adjust for mac catalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Feb 28, 2025
1 parent 3fd6e0d commit df3266d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,13 @@ public override void DidZoom(UIScrollView scrollView)
// obvious what it would be in the case of a list).
Owner.XamlParent?.ScrollViewer?.Presenter?.OnNativeZoom((float)Owner.ZoomScale);
}
#endif

private void OnAnimatedScrollEnded()
{
_isInAnimatedScroll = false;
InvokeOnScroll();
}
#endif

private void InvokeOnScroll()
{
Expand Down
47 changes: 0 additions & 47 deletions src/Uno.UI/UI/Xaml/Controls/ListViewBase/NativeListViewBase.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -604,53 +604,6 @@ void ScrollInner()
}
}

private UICollectionViewScrollPosition ConvertSnapPointsAlignmentToScrollPosition()
{
var snapPointsType = (CollectionViewLayout as VirtualizingPanelLayout)?.SnapPointsType;

if (snapPointsType != SnapPointsType.MandatorySingle)
{
return UICollectionViewScrollPosition.None;
}

var scrollDirection = ScrollOrientation;
var snapPointsAlignment = (CollectionViewLayout as VirtualizingPanelLayout)?.SnapPointsAlignment;

switch (scrollDirection)
{
case Orientation.Horizontal:
{
switch (snapPointsAlignment)
{
case SnapPointsAlignment.Center:
return UICollectionViewScrollPosition.CenteredHorizontally;
case SnapPointsAlignment.Near:
return UICollectionViewScrollPosition.Left;
case SnapPointsAlignment.Far:
return UICollectionViewScrollPosition.Right;
}

throw new InvalidOperationException();
}
case Orientation.Vertical:
{
switch (snapPointsAlignment)
{
case SnapPointsAlignment.Center:
return UICollectionViewScrollPosition.CenteredVertically;
case SnapPointsAlignment.Near:
return UICollectionViewScrollPosition.Top;
case SnapPointsAlignment.Far:
return UICollectionViewScrollPosition.Bottom;
}

throw new InvalidOperationException();
}
}

return UICollectionViewScrollPosition.None;
}

private UICollectionViewScrollPosition ConvertScrollAlignmentForGroups(ScrollIntoViewAlignment alignment)
{
if (alignment == ScrollIntoViewAlignment.Default && this.Log().IsEnabled(LogLevel.Warning))
Expand Down

0 comments on commit df3266d

Please sign in to comment.