Center button content globally: add Buttons.axaml style and include it
This commit is contained in:
parent
e1150d9e51
commit
a314829e91
2 changed files with 16 additions and 0 deletions
|
@ -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>
|
||||
|
|
15
src/AdvancedCalculator/Styles/Buttons.axaml
Normal file
15
src/AdvancedCalculator/Styles/Buttons.axaml
Normal 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>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue