Always-on-Top mode implemented (#579)
This commit is contained in:
committed by
Pepe Rivera
parent
af8322617f
commit
796d171960
@@ -668,10 +668,11 @@ void KeyboardShortcutManager::OnAcceleratorKeyActivated(CoreDispatcher ^, Accele
|
||||
if (nullptr != vm)
|
||||
{
|
||||
ViewMode toMode = NavCategory::GetViewModeForVirtualKey(static_cast<MyVirtualKey>(key));
|
||||
if (NavCategory::IsValidViewMode(toMode))
|
||||
auto nvi = dynamic_cast<MUXC::NavigationViewItem ^>(menuItems->GetAt(NavCategory::GetFlatIndex(toMode)));
|
||||
if (nvi && nvi->IsEnabled && NavCategory::IsValidViewMode(toMode))
|
||||
{
|
||||
vm->Mode = toMode;
|
||||
navView->SelectedItem = menuItems->GetAt(NavCategory::GetFlatIndex(toMode));
|
||||
navView->SelectedItem = nvi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@ namespace CalculatorApp
|
||||
return true;
|
||||
}
|
||||
|
||||
void TraceLogger::LogVisualStateChanged(ViewMode mode, wstring_view state) const
|
||||
void TraceLogger::LogVisualStateChanged(ViewMode mode, wstring_view state, bool isAlwaysOnTop) const
|
||||
{
|
||||
if (!GetTraceLoggingProviderEnabled())
|
||||
{
|
||||
@@ -128,6 +128,7 @@ namespace CalculatorApp
|
||||
fields.AddGuid(L"SessionGuid", sessionGuid);
|
||||
fields.AddString(L"CalcMode", NavCategory::GetFriendlyName(mode)->Data());
|
||||
fields.AddString(L"VisualState", state);
|
||||
fields.AddBoolean(L"IsAlwaysOnTop", isAlwaysOnTop);
|
||||
fields.AddUInt64(PDT_PRIVACY_DATA_TAG, PDT_PRODUCT_AND_SERVICE_USAGE);
|
||||
LogLevel2Event(EVENT_NAME_VISUAL_STATE_CHANGED, fields);
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ namespace CalculatorApp
|
||||
void LogDateCalculationModeUsed(bool AddSubtractMode);
|
||||
void UpdateWindowCount(size_t windowCount = 0);
|
||||
bool IsWindowIdInLog(int windowId);
|
||||
void LogVisualStateChanged(CalculatorApp::Common::ViewMode mode, std::wstring_view state) const;
|
||||
void LogVisualStateChanged(CalculatorApp::Common::ViewMode mode, std::wstring_view state, bool isAlwaysOnTop = false) const;
|
||||
void LogWindowCreated(CalculatorApp::Common::ViewMode mode, int windowId);
|
||||
void LogConverterInputReceived(CalculatorApp::Common::ViewMode mode) const;
|
||||
void LogNavBarOpened() const;
|
||||
|
Reference in New Issue
Block a user