Center button content globally: add Buttons.axaml style and include it

This commit is contained in:
Codex CLI 2025-08-27 17:36:24 -05:00
commit a314829e91
2 changed files with 16 additions and 0 deletions

View file

@ -6,6 +6,7 @@
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://AdvancedCalculator/Styles/Buttons.axaml"/>
<StyleInclude Source="avares://AdvancedCalculator/Styles/Typography.axaml"/>
<StyleInclude Source="avares://AdvancedCalculator/Styles/Scroll.axaml"/>
</Application.Styles>

View file

@ -0,0 +1,15 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Center content inside all buttons -->
<Style Selector="Button">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<!-- Keep toggle buttons consistent -->
<Style Selector="ToggleButton">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Styles>