|
|
|
@ -25,6 +25,16 @@ namespace Avalonia.Direct2D1.RenderTests.Controls |
|
|
|
Setters = { new Setter(TextBlock.FontFamilyProperty, TestFontFamily) } |
|
|
|
}; |
|
|
|
|
|
|
|
private static Style OverflowLabelRectStyle => new Style(x => x.OfType<CommandBarButton>().Template().Name("PART_Label")) |
|
|
|
{ |
|
|
|
Setters = |
|
|
|
{ |
|
|
|
new Setter(TextBlock.WidthProperty, 50d), |
|
|
|
new Setter(TextBlock.HeightProperty, 10d), |
|
|
|
new Setter(TextBlock.BackgroundProperty, Brushes.Black), |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task CommandBar_Default_PrimaryCommands() |
|
|
|
{ |
|
|
|
@ -156,8 +166,7 @@ namespace Avalonia.Direct2D1.RenderTests.Controls |
|
|
|
Padding = new Thickness(4), |
|
|
|
Child = new CommandBarButton |
|
|
|
{ |
|
|
|
Label = "Open", |
|
|
|
FontFamily = TestFontFamily, |
|
|
|
Label = string.Empty, |
|
|
|
IsCompact = true, |
|
|
|
IsInOverflow = true, |
|
|
|
LabelPosition = CommandBarDefaultLabelPosition.Right, |
|
|
|
@ -175,8 +184,10 @@ namespace Avalonia.Direct2D1.RenderTests.Controls |
|
|
|
|
|
|
|
target.Styles.Add(new SimpleTheme()); |
|
|
|
target.Styles.Add(FontStyle); |
|
|
|
target.Styles.Add(OverflowLabelRectStyle); |
|
|
|
await RenderToFile(target); |
|
|
|
CompareImages(skipImmediate: true); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|