mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Dev file previewer]Various improvements (#18259)
* Made file too big string variable * Performance improvements * Add progress bar to indicate loading * Added Logging * Added name to log files * Push * Updated expect.txt * Push * * Fixes small bug I sometimes encountered by unloading the application * Fixes bug where sometimes the loading bar kept stuck (on "file is too big" screen * Update expect.txt * Resolved review comments Added LogTrace() function * Unifying tasks * Removed unneccesary log message * * Added margin to loading bar and text. * Changed color of background to monaco dark skin color * Centred loading bar * Changed logger path * Changed log path * Fixed align of loading label * Fix label size and position Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
@@ -25,6 +25,22 @@ namespace PTSettingsHelper
|
||||
return result;
|
||||
}
|
||||
|
||||
std::wstring get_local_low_folder_location()
|
||||
{
|
||||
PWSTR local_app_path;
|
||||
winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppDataLow, 0, NULL, &local_app_path));
|
||||
std::wstring result{ local_app_path };
|
||||
CoTaskMemFree(local_app_path);
|
||||
|
||||
result += L"\\Microsoft\\PowerToys";
|
||||
std::filesystem::path save_path(result);
|
||||
if (!std::filesystem::exists(save_path))
|
||||
{
|
||||
std::filesystem::create_directories(save_path);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::wstring get_module_save_folder_location(std::wstring_view powertoy_key)
|
||||
{
|
||||
std::wstring result = get_root_save_folder_location();
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace PTSettingsHelper
|
||||
std::wstring get_module_save_file_location(std::wstring_view powertoy_key);
|
||||
std::wstring get_module_save_folder_location(std::wstring_view powertoy_name);
|
||||
std::wstring get_root_save_folder_location();
|
||||
std::wstring get_local_low_folder_location();
|
||||
|
||||
void save_module_settings(std::wstring_view powertoy_name, json::JsonObject& settings);
|
||||
json::JsonObject load_module_settings(std::wstring_view powertoy_name);
|
||||
|
||||
Reference in New Issue
Block a user