Skip to content

GUI: Fix PR3184 bugs (icon distortion, memory leak, nickname refresh) and optimize cache#240

Merged
defnax merged 1 commit intodefnax:circles-makecoloredgroupiconsfrom
jolavillette:Fix_PR3184_1
Mar 12, 2026
Merged

GUI: Fix PR3184 bugs (icon distortion, memory leak, nickname refresh) and optimize cache#240
defnax merged 1 commit intodefnax:circles-makecoloredgroupiconsfrom
jolavillette:Fix_PR3184_1

Conversation

@jolavillette
Copy link
Copy Markdown

Summary of improvements and fixes for PR RetroShare#3184

Following a technical review and feedback regarding UI and memory management, several improvements have been implemented:

🎨 UI & Visual Fixes

  • Fix Icon Distortion: Corrected the scaling logic in [makeColoredGroupIcon]. Icons are now centered proportionally instead of being stretched to fit the square frame.
  • Unified Aesthetics: Harmonized HSL parameters (Saturation/Lightness) across all generated group and circle icons for a consistent pastel look.
  • Dynamic Nickname Update: Fixed the issue where nicknames and icons in the "Circles" list wouldn't refresh when updated. They are now correctly reloaded during GXS events.

🐛 Stability & Memory

  • Fix Potential Memory Leak: Replaced raw pointer allocations with std::shared_ptr in IdDialog::updateCircles() to ensure memory is safely released even if the dialog is closed during asynchronous processing.
  • Thread Safety: Verified and maintained proper mutex locking for all cache and pending data operations.

⚡ Performance & Optimization

  • RAM Efficiency: Reduced the default size of circle icons in the cache from ORIGINAL (192px) to MEDIUM (96px). This significantly reduces RAM usage while maintaining perfect visual quality for list displays.
  • Cache Integrity: Added a separator | in cache keys to prevent theoretical collisions between different ID/Path combinations.
  • Code Cleanup: Removed obsolete commented-out blocks in [IdDialog.cpp].

@defnax defnax merged commit c772917 into defnax:circles-makecoloredgroupicons Mar 12, 2026
1 check failed
@jolavillette jolavillette deleted the Fix_PR3184_1 branch March 18, 2026 01:16
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