fix(FxSystemTrayView): use LoadImage for tray icons to ensure proper sizing and alpha - #534
fix(FxSystemTrayView): use LoadImage for tray icons to ensure proper sizing and alpha#534akai07 wants to merge 3 commits into
Conversation
… in OnDeviceStateChanged - Filter capture (eRender) device events in OnDeviceStateChanged via IMMEndpoint.GetDataFlow to prevent unnecessary playback reinit when input devices change state - Track reconnected device GUID when state transitions to ACTIVE - Add reconnection detection in sndDevicesImplementDeviceRules to auto-select reconnected playback devices (fixes BT headset reconnect after UNPLUGGED) - Clear reconnection state on reinit
… system resume - Call SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED) when audio processing starts to prevent system sleep during playback - Revert to SetThreadExecutionState(ES_CONTINUOUS) when processing stops - Handle PBT_APMRESUMEAUTOMATIC power event: check device changes and restore power state after system resume from sleep - Clear execution state on controller destruction
…sizing and alpha Replaced LoadIcon with LoadImage using explicit SM_CXSMICON/SM_CYSMICON dimensions so tray icons are rendered at the correct size for the notification area. LoadIcon uses default icon size which can cause scaling artifacts and improper alpha blending on Windows 10/11, especially in dark theme mode where transparency is critical.
|
@claude review this pull request |
|
Claude finished @bvijay74's task in 4m 27s —— View job Reviewing PR #534
SummaryThe core idea ( 🔴 Icon handle leak introduced by switching to
|
|
@akai07 I got the PR reviewed. |
Summary
Fixes system tray icon rendering in Windows dark theme mode by replacing
LoadIconwithLoadImageusing explicit small-icon dimensions.Problem
LoadIconloads icons at the default system icon size (typically 32x32), which then gets scaled down to the system tray small-icon size (16x16 on most displays). This scaling can cause:Fix
Replaced all
LoadIcon(hInst, L"IDI_LOGO_*")calls with a newLoadTrayIconhelper that usesLoadImagewith explicit dimensions fromGetSystemMetrics(SM_CXSMICON)andGetSystemMetrics(SM_CYSMICON). This ensures:Files Changed
fxsound/Source/GUI/FxSystemTrayView.cpp—LoadIcon→LoadImagein bothsetStatus()andaddIcon()Related Issues