Skip to content

Conversation

@Mnem42
Copy link
Collaborator

@Mnem42 Mnem42 commented Jan 30, 2026

Changes

  • SVG tracing of the logo added
  • App displayed in taskbar (through iced)
  • .lnk fixes on windows (mostly logging)
  • Windows shortcuts and executables render their icons
  • Icons in the list are no longer zoomable
  • Finder is no longer shown on non-macos platforms (technically unrelated)
  • Some random things changed to use PathBuf instead of String (also technically unrelated)

@Mnem42
Copy link
Collaborator Author

Mnem42 commented Jan 30, 2026

(oops, forgot to do the actual code)

@Mnem42 Mnem42 marked this pull request as ready for review January 31, 2026 18:16
@Mnem42 Mnem42 linked an issue Jan 31, 2026 that may be closed by this pull request
They'll probably never be used, but why not keep them
@unsecretised
Copy link
Owner

what is going on here...

@Mnem42
Copy link
Collaborator Author

Mnem42 commented Feb 2, 2026

  • assets/icon/*
    • Contains an SVG tracing of the icon, this is because I didn't want to have to rescale the existing bitmap and manually fix it after to remove artifacts, and bitmaps generated from it
    • icon_opt.svg is just icon.svg saved in a more compact way, without stuff like inkscape metadata
    • The icon was thickened a bit so it rendered properly at smaller inage sizes
  • apps.rs
    • The icons are changed to be statically bundled into the binary, which means it doesn't have to load from the relevant app data directory, which also means it works on all platforms without extra code
    • Icons are changed to display as 32x32, since it lets icons scale properly. This is because the loaded app icons are all powers of two, and the previous size (40x40) led to it being a bit blurry from rescaling with icons sized as powers of two, like 64x64
  • windows/app_finding.rs
    • Now gets shortcut icons
    • Some logs lowered from DEBUG to TRACE
  • windows/appicon.rs WIN32 stuff to get app icons (mostly from a SO answer)
  • icon.rs Really just stuff for statically bundling icons into the binary. Guess it's a bit overengineered, but, in my defense, I thought I'd need the other sizes
  • utils.rs search_dir
    • Changed to also load app icons on windows
    • Extra utility function to convert from BGRA bytes to RGBA
      • The SIMD version for x86 and x86_64 is taken from the same answer as the app icon stuff
      • The non-SIMD fallback probably isn't the best way to do it, but it shouldn't be a big problem

The changes to all the other files aren't really major

The relevant SO answer for the WIN32 stuff is https://stackoverflow.com/a/78190249/28673940, and the main modifications are really just to structure and making it output an iced image handle.

@unsecretised

@Mnem42
Copy link
Collaborator Author

Mnem42 commented Feb 2, 2026

This isn't really ready for merging yet, since I don't think I tested it it enough (and I haven't really checked the soundness of the WIN32 stuff, but it's probably fine)

Otherwise, the function returns before the objects get deleted (leak!)
Makes it so that it doesn't make an iced image handle for anything *except* the returned icon.

This used to happen because it returned from a function that converted *all* of them to iced image handles, even though only the first was considered.
@Mnem42 Mnem42 requested a review from Nazeofel February 7, 2026 20:08
@Mnem42 Mnem42 added the windows-support All issues regarding to the windows support branch label Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows-support All issues regarding to the windows support branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Fix tray icon

2 participants