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}"
|
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||||
TargetType="TextBlock">
|
TargetType="TextBlock">
|
||||||
<Setter Property="FontSize" Value="32"/>
|
<Setter Property="FontSize" Value="32"/>
|
||||||
<Setter Property="Margin" Value="12,0,0,17"/>
|
<Setter Property="Margin" Value="0,0,0,17"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="CurrencySymbolMediumStyle"
|
<Style x:Key="CurrencySymbolMediumStyle"
|
||||||
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||||
TargetType="TextBlock">
|
TargetType="TextBlock">
|
||||||
<Setter Property="FontSize" Value="24"/>
|
<Setter Property="FontSize" Value="24"/>
|
||||||
<Setter Property="Margin" Value="12,0,0,8"/>
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="CurrencySymbolSmallStyle"
|
<Style x:Key="CurrencySymbolSmallStyle"
|
||||||
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
BasedOn="{StaticResource CurrencySymbolBaseStyle}"
|
||||||
TargetType="TextBlock">
|
TargetType="TextBlock">
|
||||||
<Setter Property="FontSize" Value="17"/>
|
<Setter Property="FontSize" Value="17"/>
|
||||||
<Setter Property="Margin" Value="12,0,0,7"/>
|
<Setter Property="Margin" Value="0,0,0,7"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ValueContainerStyle" TargetType="Grid">
|
<Style x:Key="ValueContainerStyle" TargetType="Grid">
|
||||||
|
@ -455,6 +455,17 @@
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</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>
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
|
||||||
<Grid x:Name="CurrencyLoadingGrid"
|
<Grid x:Name="CurrencyLoadingGrid"
|
||||||
|
@ -481,6 +492,8 @@
|
||||||
<Grid x:Name="Value1Container"
|
<Grid x:Name="Value1Container"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Padding="0,0,12,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Style="{ThemeResource ValueContainerStyle}"
|
Style="{ThemeResource ValueContainerStyle}"
|
||||||
FlowDirection="{x:Bind LayoutDirection}"
|
FlowDirection="{x:Bind LayoutDirection}"
|
||||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
||||||
|
@ -536,6 +549,8 @@
|
||||||
<Grid x:Name="Value2Container"
|
<Grid x:Name="Value2Container"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Padding="0,0,12,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Style="{ThemeResource ValueContainerStyle}"
|
Style="{ThemeResource ValueContainerStyle}"
|
||||||
FlowDirection="{x:Bind LayoutDirection}"
|
FlowDirection="{x:Bind LayoutDirection}"
|
||||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
||||||
|
|
|
@ -63,12 +63,7 @@ UnitConverter::UnitConverter() :
|
||||||
|
|
||||||
// Is currency symbol preference set to right side
|
// Is currency symbol preference set to right side
|
||||||
bool preferRight = LocalizationSettings::GetInstance().GetCurrencySymbolPrecedence() == 0;
|
bool preferRight = LocalizationSettings::GetInstance().GetCurrencySymbolPrecedence() == 0;
|
||||||
if (preferRight)
|
VisualStateManager::GoToState(this, preferRight ? "CurrencySymbolRightState" : "CurrencySymbolLeftState", false);
|
||||||
{
|
|
||||||
// Currency symbol should appear on the right. Reverse the order of children.
|
|
||||||
Grid::SetColumn(CurrencySymbol1Block, 2);
|
|
||||||
Grid::SetColumn(CurrencySymbol2Block, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto userSettings = ref new UISettings();
|
auto userSettings = ref new UISettings();
|
||||||
m_isAnimationEnabled = userSettings->AnimationsEnabled;
|
m_isAnimationEnabled = userSettings->AnimationsEnabled;
|
||||||
|
@ -265,7 +260,7 @@ void UnitConverter::OnPasteMenuItemClicked(_In_ Object^ sender, _In_ RoutedEvent
|
||||||
|
|
||||||
void UnitConverter::AnimateConverter()
|
void UnitConverter::AnimateConverter()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (App::IsAnimationEnabled())
|
if (App::IsAnimationEnabled())
|
||||||
{
|
{
|
||||||
AnimationStory->Begin();
|
AnimationStory->Begin();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue