mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[bootstrapper] progress bar UI polishing (#9644)
* Formatting, coding style, variable & function name * Progress dialog: label position and background
This commit is contained in:
@@ -10,21 +10,25 @@ std::optional<RcResource> RcResource::create(int resource_id, const std::wstring
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const HGLOBAL memHandle = LoadResource(nullptr, resHandle);
|
||||
if (!memHandle)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const size_t resSize = SizeofResource(nullptr, resHandle);
|
||||
if (!resSize)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto res = static_cast<const std::byte*>(LockResource(memHandle));
|
||||
if (!res)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return RcResource{ res, resSize };
|
||||
}
|
||||
|
||||
@@ -35,6 +39,7 @@ bool RcResource::saveAsFile(const std::filesystem::path destination)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
installerFile.write(reinterpret_cast<const char*>(_memory), _size);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user