[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:
Aaron Junker
2022-08-16 19:32:49 +02:00
committed by GitHub
parent 733041ba2b
commit 405d79e72f
9 changed files with 273 additions and 42 deletions

View File

@@ -297,7 +297,10 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
}
auto settingsRootPath = PTSettingsHelper::get_root_save_folder_location();
settingsRootPath = settingsRootPath + L"\\";
settingsRootPath += L"\\";
auto localLowPath = PTSettingsHelper::get_local_low_folder_location();
localLowPath += L"\\logs\\";
const auto tempDir = temp_directory_path();
auto reportDir = temp_directory_path() / "PowerToys\\";
@@ -314,12 +317,24 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
// Remove updates folder contents
DeleteFolder(reportDir / "Updates");
}
catch (...)
{
printf("Failed to copy PowerToys folder\n");
return 1;
}
try
{
copy(localLowPath, reportDir, copy_options::recursive);
}
catch (...)
{
printf("Failed to copy logs saved in LocalLow\n");
return 1;
}
#ifndef _DEBUG
InstallationFolder::ReportStructure(reportDir);
#endif