Fix DatePicker and TimePicker separator alignment with VerticalContentAlignment - #22023
Conversation
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |
jsuarezruiz
left a comment
There was a problem hiding this comment.
The tests #21464 added assert that the CLR property round-trips but not apply a theme or inspect the visual tree, so they'd pass even if the template binding did nothing.
A render test would catch wrong scenarios. For example, tests/Avalonia.RenderTests/Controls/CommandBarTests.cs applies the Simple theme and compares baseline PNGs.
| VerticalAlignment="Stretch" | ||
| TemplatedControl.IsTemplateFocusTarget="True"> | ||
| <Grid Name="PART_ButtonContentGrid" ColumnDefinitions="78*,Auto,132*,Auto,78*" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> | ||
| <Grid Name="PART_ButtonContentGrid" ColumnDefinitions="78*,Auto,132*,Auto,78*"> |
There was a problem hiding this comment.
The fix seems correct, the alignment belonged on the text, not on the container, since PART_ButtonContentGrid also holds the separator Rectangles. Removing vertical alignment restores the pre-#21464 separator behavior while keeping the new property working.
|
You can test this PR using the following package version. |
…tAlignment (AvaloniaUI#22023) * Fix DatePicker and TimePicker separator alignment with VerticalContentAlignment * Fix DatePicker and TimePicker separator alignment in Simple Theme --------- Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
What does the pull request do?
Fixes #22022
What is the current behavior?
What is the updated/expected behavior with this PR?
Fixed issues
Fixes #22022