mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-14 02:26:50 -07:00
Modify how Calculator manages the visibility of the History button (#712)
* Modify how Calculator manages the History button + code cleaning * remove extra include
This commit is contained in:
parent
136ade6aa8
commit
e38e911bfa
9 changed files with 41 additions and 105 deletions
|
@ -12,7 +12,6 @@
|
|||
#include "CalcViewModel/Common/Automation/NarratorNotifier.h"
|
||||
#include "CalcViewModel/Common/AppResourceProvider.h"
|
||||
#include "CalcViewModel/Common/LocalizationSettings.h"
|
||||
#include "CalcViewModel/ViewState.h"
|
||||
#include "Views/MainPage.xaml.h"
|
||||
|
||||
using namespace CalculatorApp;
|
||||
|
@ -94,26 +93,6 @@ bool App::IsAnimationEnabled()
|
|||
return App::m_isAnimationEnabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the current application view state. The value
|
||||
/// will match one of the constants in the ViewState namespace.
|
||||
/// </summary>
|
||||
String ^ App::GetAppViewState()
|
||||
{
|
||||
String ^ newViewState;
|
||||
CoreWindow ^ window = CoreWindow::GetForCurrentThread();
|
||||
if ((window->Bounds.Width >= 560) && (window->Bounds.Height >= 356))
|
||||
{
|
||||
newViewState = ViewState::DockedView;
|
||||
}
|
||||
else
|
||||
{
|
||||
newViewState = ViewState::Snap;
|
||||
}
|
||||
|
||||
return newViewState;
|
||||
}
|
||||
|
||||
void App::AddWindowToMap(_In_ WindowFrameService ^ frameService)
|
||||
{
|
||||
reader_writer_lock::scoped_lock lock(m_windowsMapLock);
|
||||
|
@ -468,10 +447,5 @@ void App::DismissedEventHandler(SplashScreen ^ sender, Object ^ e)
|
|||
SetupJumpList();
|
||||
}
|
||||
|
||||
float App::GetAppWindowHeight()
|
||||
{
|
||||
CoreWindow ^ window = CoreWindow::GetForCurrentThread();
|
||||
return window->Bounds.Height;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue