Browse Source
Merge branch 'master' into fixes/Issue_6100
pull/6151/head
Max Katz
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
74 additions and
5 deletions
-
src/Avalonia.Controls.DataGrid/DataGridRows.cs
-
src/Avalonia.Controls/GridLength.cs
-
src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
-
src/Avalonia.Controls/RowDefinitions.cs
-
src/Avalonia.Visuals/Media/BoxShadow.cs
-
src/Avalonia.Visuals/Media/BoxShadows.cs
|
|
|
@ -425,7 +425,7 @@ namespace Avalonia.Controls |
|
|
|
UpdateDisplayedRows(DisplayData.FirstScrollingSlot, CellsHeight); |
|
|
|
} |
|
|
|
|
|
|
|
if (DisplayData.FirstScrollingSlot < slot && DisplayData.LastScrollingSlot > slot) |
|
|
|
if (DisplayData.FirstScrollingSlot < slot && (DisplayData.LastScrollingSlot > slot || DisplayData.LastScrollingSlot == -1)) |
|
|
|
{ |
|
|
|
// The row is already displayed in its entirety
|
|
|
|
return true; |
|
|
|
|
|
|
|
@ -77,6 +77,12 @@ namespace Avalonia.Controls |
|
|
|
/// </summary>
|
|
|
|
public static GridLength Auto => new GridLength(0, GridUnitType.Auto); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets an instance of <see cref="GridLength"/> that indicates that a row or column should
|
|
|
|
/// fill its content.
|
|
|
|
/// </summary>
|
|
|
|
public static GridLength Star => new GridLength(1, GridUnitType.Star); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the unit of the <see cref="GridLength"/>.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
@ -511,8 +511,8 @@ namespace Avalonia.Controls.Presenters |
|
|
|
else if (scrollable.IsLogicalScrollEnabled) |
|
|
|
{ |
|
|
|
Viewport = scrollable.Viewport; |
|
|
|
Extent = scrollable.Extent; |
|
|
|
Offset = scrollable.Offset; |
|
|
|
Extent = scrollable.Extent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System.Linq; |
|
|
|
using Avalonia.Collections; |
|
|
|
|
|
|
|
namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
@ -25,6 +24,11 @@ namespace Avalonia.Controls |
|
|
|
AddRange(GridLength.ParseLengths(s).Select(x => new RowDefinition(x))); |
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return string.Join(",", this.Select(x => x.Height)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Parses a string representation of row definitions collection.
|
|
|
|
/// </summary>
|
|
|
|
@ -32,4 +36,4 @@ namespace Avalonia.Controls |
|
|
|
/// <returns>The <see cref="RowDefinitions"/>.</returns>
|
|
|
|
public static RowDefinitions Parse(string s) => new RowDefinitions(s); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System.Globalization; |
|
|
|
using System.Text; |
|
|
|
using Avalonia.Animation.Animators; |
|
|
|
using Avalonia.Utilities; |
|
|
|
|
|
|
|
@ -75,6 +76,46 @@ namespace Avalonia.Media |
|
|
|
return rv; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
var sb = new StringBuilder(); |
|
|
|
|
|
|
|
if (IsEmpty) |
|
|
|
{ |
|
|
|
return "none"; |
|
|
|
} |
|
|
|
|
|
|
|
if (IsInset) |
|
|
|
{ |
|
|
|
sb.Append("inset"); |
|
|
|
} |
|
|
|
|
|
|
|
if (OffsetX != 0.0) |
|
|
|
{ |
|
|
|
sb.AppendFormat(" {0}", OffsetX.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
if (OffsetY != 0.0) |
|
|
|
{ |
|
|
|
sb.AppendFormat(" {0}", OffsetY.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
if (Blur != 0.0) |
|
|
|
{ |
|
|
|
sb.AppendFormat(" {0}", Blur.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
if (Spread != 0.0) |
|
|
|
{ |
|
|
|
sb.AppendFormat(" {0}", Spread.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
sb.AppendFormat(" {0}", Color.ToString()); |
|
|
|
|
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public static unsafe BoxShadow Parse(string s) |
|
|
|
{ |
|
|
|
if(s == null) |
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.ComponentModel; |
|
|
|
using System.Text; |
|
|
|
using Avalonia.Animation.Animators; |
|
|
|
|
|
|
|
namespace Avalonia.Media |
|
|
|
@ -43,6 +43,24 @@ namespace Avalonia.Media |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
var sb = new StringBuilder(); |
|
|
|
|
|
|
|
if (Count == 0) |
|
|
|
{ |
|
|
|
return "none"; |
|
|
|
} |
|
|
|
|
|
|
|
foreach (var boxShadow in this) |
|
|
|
{ |
|
|
|
sb.AppendFormat("{0} ", boxShadow.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
return sb.ToString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)] |
|
|
|
public struct BoxShadowsEnumerator |
|
|
|
{ |
|
|
|
|