mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
add padding
This commit is contained in:
parent
5bed302091
commit
cca5c4c224
2 changed files with 20 additions and 10 deletions
|
@ -230,19 +230,19 @@
|
|||
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="32"/>
|
||||
<Setter Property="Margin" Value="12,0,0,17"/>
|
||||
<Setter Property="Margin" Value="0,0,0,17"/>
|
||||
</Style>
|
||||
<Style x:Key="CurrencySymbolMediumStyle"
|
||||
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="24"/>
|
||||
<Setter Property="Margin" Value="12,0,0,8"/>
|
||||
<Setter Property="Margin" Value="0,0,0,8"/>
|
||||
</Style>
|
||||
<Style x:Key="CurrencySymbolSmallStyle"
|
||||
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="17"/>
|
||||
<Setter Property="Margin" Value="12,0,0,7"/>
|
||||
<Setter Property="Margin" Value="0,0,0,7"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ValueContainerStyle" TargetType="Grid">
|
||||
|
@ -455,6 +455,17 @@
|
|||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="CurrencySymbolStates">
|
||||
<VisualState x:Name="CurrencySymbolLeftState"/>
|
||||
<VisualState x:Name="CurrencySymbolRightState">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Value1Container.Padding" Value="0,0,12,0"/>
|
||||
<Setter Target="Value2Container.Padding" Value="0,0,12,0"/>
|
||||
<Setter Target="CurrencySymbol1Block.(Grid.Column)" Value="2"/>
|
||||
<Setter Target="CurrencySymbol2Block.(Grid.Column)" Value="2"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
|
||||
<Grid x:Name="CurrencyLoadingGrid"
|
||||
|
@ -481,6 +492,8 @@
|
|||
<Grid x:Name="Value1Container"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,12,0"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{ThemeResource ValueContainerStyle}"
|
||||
FlowDirection="{x:Bind LayoutDirection}"
|
||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
||||
|
@ -536,6 +549,8 @@
|
|||
<Grid x:Name="Value2Container"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,12,0"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{ThemeResource ValueContainerStyle}"
|
||||
FlowDirection="{x:Bind LayoutDirection}"
|
||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
||||
|
|
|
@ -63,12 +63,7 @@ UnitConverter::UnitConverter() :
|
|||
|
||||
// Is currency symbol preference set to right side
|
||||
bool preferRight = LocalizationSettings::GetInstance().GetCurrencySymbolPrecedence() == 0;
|
||||
if (preferRight)
|
||||
{
|
||||
// Currency symbol should appear on the right. Reverse the order of children.
|
||||
Grid::SetColumn(CurrencySymbol1Block, 2);
|
||||
Grid::SetColumn(CurrencySymbol2Block, 2);
|
||||
}
|
||||
VisualStateManager::GoToState(this, preferRight ? "CurrencySymbolRightState" : "CurrencySymbolLeftState", false);
|
||||
|
||||
auto userSettings = ref new UISettings();
|
||||
m_isAnimationEnabled = userSettings->AnimationsEnabled;
|
||||
|
@ -265,7 +260,7 @@ void UnitConverter::OnPasteMenuItemClicked(_In_ Object^ sender, _In_ RoutedEvent
|
|||
|
||||
void UnitConverter::AnimateConverter()
|
||||
{
|
||||
|
||||
|
||||
if (App::IsAnimationEnabled())
|
||||
{
|
||||
AnimationStory->Begin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue