tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] The build version of a app on windows seems to have lower res.

Open eyyyyyyy3 opened this issue 1 year ago • 1 comments

Describe the bug

Like the title suggests I noticed that the build version of my app has a slightly different res.
Unbenannt The right icon is the "npm run tauri dev" version and the left one is the "npm run tauri build" version installed with nsis.

I am on Windows 11

Reproduction

No response

Expected behavior

Same icons,

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 113.0.1774.50
    ✔ MSVC:
        - Visual Studio Professional 2022
        - Visual Studio Build Tools 2019
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.16.0
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.2
    - @tauri-apps/api [NPM]: 1.3.0
    - @tauri-apps/cli [NPM]: 1.3.1

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

eyyyyyyy3 avatar May 26 '23 19:05 eyyyyyyy3

Sooo, from my understanding this is entirely Windows' fault. To explain: In tauri dev, we "force" Windows to use the 32x32px icon as a source, it may scale it before displaying it but not sure if it does. After building the exe, the provided .ico file will be part of it and Windows will decide itself which icon layer (16x16px up to 256x256px) to use and how to scale it.

Again, not 100% sure about it, but that's how i understand it after researching .ico files&sizes for the tauri icon command.

FabianLars avatar May 26 '23 19:05 FabianLars