[TextExtractor]Disable by default and warning to use Snipping Tool on Win11 (#29839)

* [TextExtractor] default enabled until Win10 + infobar in Settings page

* Fixing severity

* Fixing warning text

* Use the Windows 11 detection from Common.UI
This commit is contained in:
Laszlo Nemeth
2023-11-20 16:49:24 +01:00
committed by GitHub
parent d7f0d0e5c1
commit 5e666556f4
4 changed files with 23 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#include <common/interop/shared_constants.h>
#include <common/utils/logger_helper.h>
#include <common/utils/winapi_error.h>
#include <common/utils/package.h>
BOOL APIENTRY DllMain(HMODULE /*hModule*/,
DWORD ul_reason_for_call,
@@ -293,6 +294,13 @@ public:
{
return m_enabled;
}
// Returns whether the PowerToys should be enabled by default
virtual bool is_enabled_by_default() const override
{
// disabled by default for Windows 11 and enabled by default on Windows 10
return !package::IsWin11OrGreater();
}
};
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()