Skip to content

[feat] Modern dialog styles on Windows #4709

Description

@Levminer

Describe the problem

On Windows the dialogs use a very old style.

Current
image

Default Windows 11 (by embeding an rc file)
image

Describe the solution you'd like

Use the modern styles by default.

Alternatives considered

Embedding a manifest file as described by the native dialog docs:

https://crates.io/crates/native-dialog
https://github.com/balthild/native-dialog-rs/tree/d2ddd443f8c01e92dc22cc8132159c1b9598eaca/examples/windows_manifest

Usage:

build.rs

extern crate embed_resource;

fn main() {
  tauri_build::build();
  embed_resource::compile("program.rc");
}

program.rc

#define RT_MANIFEST 24
1 RT_MANIFEST "program.manifest"

program.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <assemblyIdentity
            version="1.0.0.0"
            processorArchitecture="*"
            name="Balthild.NativeDialog.Example"
            type="win32"
    />
    <description>Rust Manifest Example</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                    type="win32"
                    name="Microsoft.Windows.Common-Controls"
                    version="6.0.0.0"
                    processorArchitecture="*"
                    publicKeyToken="6595b64144ccf1df"
                    language="*"
            />
        </dependentAssembly>
    </dependency>
    <asmv3:application>
        <asmv3:windowsSettings>
            <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
            <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
        </asmv3:windowsSettings>
    </asmv3:application>
</assembly>

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions