From 144a90d3e39ad53bf00e34677c902e2a7d3049f3 Mon Sep 17 00:00:00 2001 From: Murdo R Ergeaux Date: Sun, 13 Oct 2024 08:13:05 +0100 Subject: [PATCH] Remove unneeded PART_FirstSpace annotation from TimePickerPresenter --- .../DateTimePickers/TimePickerPresenter.cs | 1 - tests/Avalonia.Controls.UnitTests/TimePickerTests.cs | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs b/src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs index 082117ac6bd..9970efb9005 100644 --- a/src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs +++ b/src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs @@ -28,7 +28,6 @@ namespace Avalonia.Controls [TemplatePart("PART_PeriodSelector", typeof(DateTimePickerPanel), IsRequired = true)] [TemplatePart("PART_PeriodUpButton", typeof(RepeatButton))] [TemplatePart("PART_PickerContainer", typeof(Grid), IsRequired = true)] - [TemplatePart("PART_FirstSpacer", typeof(Rectangle), IsRequired = true)] [TemplatePart("PART_SecondSpacer", typeof(Rectangle), IsRequired = true)] [TemplatePart("PART_ThirdSpacer", typeof(Rectangle), IsRequired = true)] public class TimePickerPresenter : PickerPresenterBase diff --git a/tests/Avalonia.Controls.UnitTests/TimePickerTests.cs b/tests/Avalonia.Controls.UnitTests/TimePickerTests.cs index 221889eb10f..fdef8933205 100644 --- a/tests/Avalonia.Controls.UnitTests/TimePickerTests.cs +++ b/tests/Avalonia.Controls.UnitTests/TimePickerTests.cs @@ -433,11 +433,6 @@ private static IControlTemplate CreatePickerTemplate() Name = "PART_PickerContainer" }.RegisterInNameScope(scope); - var firstSpacer = new Rectangle - { - Name = "PART_FirstSpacer" - }.RegisterInNameScope(scope); - var secondSpacer = new Rectangle { Name = "PART_SecondSpacer" @@ -449,7 +444,7 @@ private static IControlTemplate CreatePickerTemplate() }.RegisterInNameScope(scope); var contentPanel = new StackPanel(); - contentPanel.Children.AddRange(new Control[] { acceptButton, hourSelector, minuteSelector, secondHost, secondSelector, periodHost, periodSelector, pickerContainer, firstSpacer, secondSpacer, thirdSpacer }); + contentPanel.Children.AddRange(new Control[] { acceptButton, hourSelector, minuteSelector, secondHost, secondSelector, periodHost, periodSelector, pickerContainer, secondSpacer, thirdSpacer }); return contentPanel; }); }