mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
Use the same layout than the existing one while fixing the issue
This commit is contained in:
parent
0e0ae4ae43
commit
0f1d6c29cf
3 changed files with 20 additions and 7 deletions
|
@ -347,6 +347,7 @@
|
|||
<Setter Target="RowUnit1.Height" Value="2*"/>
|
||||
<Setter Target="RowDisplay2.Height" Value="4*"/>
|
||||
<Setter Target="RowUnit2.Height" Value="2*"/>
|
||||
<Setter Target="RowDltrUnits.Height" Value="2*"/>
|
||||
<Setter Target="CurrencyLoadingGrid.(Grid.ColumnSpan)" Value="2"/>
|
||||
<Setter Target="ConverterNumPad.(Grid.Row)" Value="1"/>
|
||||
<Setter Target="ConverterNumPad.(Grid.RowSpan)" Value="5"/>
|
||||
|
@ -585,11 +586,15 @@
|
|||
TabIndex="4"
|
||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
|
||||
|
||||
<Grid x:Name="SupplementaryResultsPanelInGrid"
|
||||
<StackPanel x:Name="SupplementaryResultsPanelInGrid"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Margin="12,0,12,0"
|
||||
MinHeight="48"
|
||||
Margin="12,0,6,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
FlowDirection="{x:Bind LayoutDirection}"
|
||||
SizeChanged="SupplementaryResultsPanelInGrid_SizeChanged"
|
||||
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
|
||||
<local:SupplementaryResults x:Name="SupplementaryResults"
|
||||
HorizontalAlignment="Left"
|
||||
|
@ -643,7 +648,7 @@
|
|||
</TextBlock>
|
||||
</ContentControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<Grid x:Name="ConverterNumPad"
|
||||
Grid.Row="6"
|
||||
|
|
|
@ -385,3 +385,10 @@ void UnitConverter::HideProgressRing()
|
|||
|
||||
CurrencyLoadingProgressRing->IsActive = false;
|
||||
}
|
||||
|
||||
|
||||
void CalculatorApp::UnitConverter::SupplementaryResultsPanelInGrid_SizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e)
|
||||
{
|
||||
//We add 0.01 to be sure to not create an infinite loop with SizeChanged events cascading due to float approximation
|
||||
RowDltrUnits->MinHeight = max(48, e->NewSize.Height + 0.01);
|
||||
}
|
||||
|
|
|
@ -88,5 +88,6 @@ namespace CalculatorApp
|
|||
Windows::UI::Xaml::DispatcherTimer^ m_delayTimer;
|
||||
|
||||
bool m_isAnimationEnabled;
|
||||
void SupplementaryResultsPanelInGrid_SizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue