Skip to content

Improve App Launching, Window Detection, and Icon Handling - #101

Merged
iandiv merged 15 commits into
masterfrom
dev-master
Oct 26, 2026
Merged

iandiv merged 15 commits into
masterfrom
dev-master

Conversation

@iandiv

@iandiv iandiv commented Oct 26, 2026

Copy link
Copy Markdown
Owner

🟦 App Launching

  • Improve working directory handling and process launch context
  • Stabilize packaged app launching through explorer.exe and shell:AppsFolder
  • Improve administrator elevation using ProcessStartInfo and handle UAC cancellation gracefully

🟦 Window & Popup Management

  • Use FindAppGroupWindow to avoid matching unrelated application windows
  • Improve popup tracking, animation, and show/hide behavior
  • Fix card layouts retaining the previous theme after Windows theme changes

🟦 Icon Rendering & Caching

  • Improve UWP icon sizing by detecting and trimming transparent borders
  • Retrieve official packaged app icons using the native Windows Shell API
  • Fix shortcut icon cache lookup and use stable hashes for remote icon cache filenames
  • Use system-defined small icon dimensions for system tray icons
  • Update AppGroup and EditGroup icon assets

🟦 UI & File Operations

  • Make shortcut lookup operations asynchronous to improve UI responsiveness
  • Improve item removal logic, combo box updates, and icon preview handling

Summary

This PR improves application launching and window detection, refines popup behavior, and enhances icon rendering and caching across packaged apps, shortcuts, and the system tray. It also improves UI responsiveness, theme handling, and administrator launch behavior.

iandiv and others added 15 commits September 26, 2026 15:46
Refactor FindExistingShortcut and FindExistingAppShortcut to run asynchronously for better UI responsiveness. Clean up and clarify RemoveItem_Click, ensuring combo boxes update correctly and icon preview resets or regenerates as needed. Remove redundant code.
- Set _lastHiddenAt to DateTime.Now when closing popup
- In TryLaunchApp, set working directory only if it exists
- Replace PowerShell-based TryRunAsAdmin with ProcessStartInfo
- Use UseShellExecute and "runas" verb for elevation
- Handle UAC cancellation (error 1223) gracefully
Fixed Icon Sizing: Added transparent border detection and auto-trimming (GetNonTransparentBounds) so UWP icons fill tiles at standard size matching master, without excess empty padding.

Fixed Store Icon: Integrated native Windows Shell IShellItemImageFactory via shell:AppsFolder. Modern apps (such as Microsoft Store) now render their official 256x256 full-color shopping bag logo with 32-bit ARGB transparency, completely eliminating monochrome/high-contrast wireframe assets.
Improve App Window Detection and Icon Rendering
Routed packaged modern apps (e.g., Calculator, Store) to launch via explorer.exe shell:AppsFolder\{AUMID}, preventing direct unpackaged crashes or instant window closures. Extract their icon via IShellItemImageFactory instead of showing the explorer.exe icon. (#97)
Packaged App Launching Stability
Added SM_CXSMICON and SM_CYSMICON constants in NativeMethods.cs to retrieve system small icon dimensions. SystemTrayManager.cs now queries these metrics and loads tray icons at the correct size, replacing the previous hardcoded 16x16 size for better system integration.
@iandiv
iandiv merged commit 7597f03 into master Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants