Browse Source

Fix SimpleTheme for TimePicker (#16758)

* Fix control template for TimePicker in Simple theme

* Tidy template declarations in TimePicker.cs
pull/17021/head
VisualMelon 2 years ago
committed by GitHub
parent
commit
add5ef02a0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      src/Avalonia.Controls/DateTimePickers/TimePicker.cs
  2. 6
      src/Avalonia.Themes.Simple/Controls/TimePicker.xaml

6
src/Avalonia.Controls/DateTimePickers/TimePicker.cs

@ -24,9 +24,9 @@ namespace Avalonia.Controls
[TemplatePart("PART_Popup", typeof(Popup))] [TemplatePart("PART_Popup", typeof(Popup))]
[TemplatePart("PART_SecondColumnDivider", typeof(Rectangle))] [TemplatePart("PART_SecondColumnDivider", typeof(Rectangle))]
[TemplatePart("PART_SecondPickerHost", typeof(Border))] [TemplatePart("PART_SecondPickerHost", typeof(Border))]
[TemplatePart("PART_ThirdColumnDivider", typeof(Rectangle))] [TemplatePart("PART_ThirdColumnDivider", typeof(Rectangle))]
[TemplatePart("PART_ThirdPickerHost", typeof(Border))] [TemplatePart("PART_ThirdPickerHost", typeof(Border))]
[TemplatePart("PART_FourthPickerHost", typeof(Border))] [TemplatePart("PART_FourthPickerHost", typeof(Border))]
[PseudoClasses(":hasnotime")] [PseudoClasses(":hasnotime")]
public class TimePicker : TemplatedControl public class TimePicker : TemplatedControl
{ {

6
src/Avalonia.Themes.Simple/Controls/TimePicker.xaml

@ -173,12 +173,6 @@
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" /> FontWeight="{TemplateBinding FontWeight}" />
</Border> </Border>
<Rectangle Name="PART_ThirdColumnDivider"
Grid.Column="5"
Width="{DynamicResource TimePickerSpacerThemeWidth}"
HorizontalAlignment="Center"
Fill="{DynamicResource TimePickerSpacerFill}" />
</Grid> </Grid>
</Button> </Button>

Loading…
Cancel
Save