Skip to content

Commit

Permalink
feat(build): use modern dialog styles on Windows, closes #4709 (#4840)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Aug 2, 2022
1 parent 75d3d67 commit 5c5c42e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/enhance-windows-dialog-style.md
Original file line number Diff line number Diff line change
@@ -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`.
20 changes: 20 additions & 0 deletions core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c5c42e

Please sign in to comment.