Skip to content

GroupBox bottom border is clipped in certain situations #21052

@MrJul

Description

@MrJul

Describe the bug

At some specific sizes, the bottom border of the GroupBox is incorrectly clipped:

Image

To Reproduce

With WithInterFont():

<StackPanel Margin="10">
  <StackPanel.Resources>
    <!-- Problematic font sizes: 2, 5, 12, 15, 19, 22, 25, ... -->
    <x:Double x:Key="GroupBoxHeaderFontSize">19</x:Double>
  </StackPanel.Resources>
  <GroupBox Header="Border Clipping" BorderThickness="1" BorderBrush="Red" Padding="0">
    <TextBlock>Why is the bottom border being clipped?</TextBlock>
  </GroupBox>
</StackPanel>

Expected behavior

The bottom border isn't clipped.

Avalonia version

12.0.0-rc1, master

OS

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions