Originally created by: phantasmat2018
Status: Polish, good first issue.
The ButtonDefault, ButtonPrimary, ButtonDestructive, and ButtonIconOnly styles currently transition BorderThickness from 1px (default) to 2px on :IsKeyboardFocused. This causes a 1-pixel layout shift around the button when focused - neighboring elements micro-jump.
The same pattern was fixed on InputTextBox / InputComboBox / RevealablePasswordBox earlier: keep BorderThickness="2" always, change only BorderBrush color on focus (see Themes/Inputs.xaml comment block for rationale).
src/CapyBro/Themes/Buttons.xaml - all 4 button stylesInputs.xaml)<Setter Property="BorderThickness" Value="2" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True">
<!-- Only change colour, NOT thickness -->
<Setter Property="BorderBrush" Value="{DynamicResource BrandPrimaryBrush}" />
</Trigger>
</Style.Triggers>
Build + run, Tab through Settings to focus buttons one by one. Surrounding elements should NOT shift by 1 pixel on focus.
Optional: add a regression test similar to TypographyEnforcementTests if motivated - but visual verification is enough for this change.
BorderThicknessdotnet build /warnaserror greendotnet test green
Originally posted by: liam-gh
Made all the changes to Buttons.xaml and opened a PR. Before submitting I ran the quality gate from the contributing guide, "dotnet build /warnaserror" and "dotnet format --verify-no-changes" both fail with 134 pre-existing errors in the Models folder (CA1515, IDE0055) that have nothing to do with this change. These exist on main before my changes. Worth fixing before marking the gate as non-negotiable. Let me know if you want me to take a look at anything else.