mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 21:03:11 -07:00
Improve performance of SupplementaryResult + Modify the height of RowDltrUnits when UnitConverter is in Landscape (#249)
* Modify the height of RowDltrUnits when UnitConverter is in LandscapeLayout mode * clean * Use the same layout than the existing one while fixing the issue * Refactor SupplementaryItemsControl to improve performance, not rely on parents and not force the parent element to be HorizonAlignment="stretch" * take feedback into account * add HorizontalNoOverflowStackPanel to vcproj.filters * format conditionals * replace max by std::max
This commit is contained in:
parent
e9aea9237d
commit
ef3f5e9cbb
11 changed files with 151 additions and 82 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "CalcViewModel/Common/LocalizationService.h"
|
||||
#include "CalcViewModel/Common/LocalizationSettings.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace CalculatorApp;
|
||||
using namespace CalculatorApp::Common;
|
||||
using namespace CalculatorApp::Controls;
|
||||
|
@ -376,3 +377,10 @@ 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
|
||||
RowDltrUnits->MinHeight = max(48.0, e->NewSize.Height + 0.01);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue