mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
take feedback into account
This commit is contained in:
parent
c62340b6bf
commit
717039a4bc
4 changed files with 5 additions and 9 deletions
|
@ -33,10 +33,12 @@ bool HorizontalNoOverflowStackPanel::ShouldPrioritizeLastItem()
|
|||
|
||||
Size HorizontalNoOverflowStackPanel::ArrangeOverride(Size finalSize)
|
||||
{
|
||||
float posX = 0;
|
||||
if (Children->Size == 0)
|
||||
{
|
||||
return finalSize;
|
||||
}
|
||||
|
||||
float posX = 0;
|
||||
auto lastChild = Children->GetAt(Children->Size - 1);
|
||||
float lastChildWidth = 0;
|
||||
if (Children->Size > 2 && ShouldPrioritizeLastItem())
|
||||
|
|
|
@ -64,8 +64,7 @@ Windows::UI::Xaml::DataTemplate^ SupplementaryResultDataTemplateSelector::Select
|
|||
}
|
||||
}
|
||||
|
||||
SupplementaryResults::SupplementaryResults() :
|
||||
m_data(ref new Vector<SupplementaryResult^>)
|
||||
SupplementaryResults::SupplementaryResults()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
|
|
@ -72,10 +72,5 @@ namespace CalculatorApp
|
|||
SupplementaryResults();
|
||||
DEPENDENCY_PROPERTY_OWNER(SupplementaryResults);
|
||||
DEPENDENCY_PROPERTY_WITH_DEFAULT(Windows::Foundation::Collections::IIterable<ViewModel::SupplementaryResult^>^, Results, nullptr);
|
||||
private:
|
||||
void RefreshData();
|
||||
void OnLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void OnConverterPropertyChanged(Platform::Object^ sender, Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e);
|
||||
Windows::Foundation::Collections::IObservableVector<ViewModel::SupplementaryResult^>^ m_data;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ void UnitConverter::HideProgressRing()
|
|||
CurrencyLoadingProgressRing->IsActive = false;
|
||||
}
|
||||
|
||||
|
||||
// The function will make sure the UI will have enough space to display supplementary results and currency information
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue