feat(build): use modern dialog styles on Windows, closes #4709 (#4840)

This commit is contained in:
Lucas Fernandes Nogueira
2022-08-02 18:53:34 -03:00
committed by GitHub
parent 75d3d677ae
commit 5c5c42edb6
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-build": patch
---
Enhance the dialog style on Windows via the manifest dependency `Microsoft.Windows.Common-Controls v6.0.0.0`.

View File

@@ -334,6 +334,26 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
if window_icon_path.exists() {
let mut res = WindowsResource::new();
res.set_manifest(
r#"
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
"#,
);
if let Some(sdk_dir) = &attributes.windows_attributes.sdk_dir {
if let Some(sdk_dir_str) = sdk_dir.to_str() {
res.set_toolkit_path(sdk_dir_str);