Files
PaintPlus/frontend/images/icons/ai_edit.svg
T
Claude aebd24624a Fix AI Edit tool events, add icon, move color swatch to toolbar bottom
ai_edit.js:
- Extend Base_tools_class and add load() + default_events() so mouse
  events actually wire up (was the root cause of tool not working)
- Use get_mouse_info() for coordinate mapping instead of manual
  clientX/Y math — consistent with all other miniPaint tools
- Fix _mouseToImage() to use mouse.x/y (already in image coords)
  and correct display-scale for overlay brush rendering
- mousedown/mousemove/mouseup now guard on config.TOOL.name

ai_edit.svg: new icon (brush + sparkle star) for the left toolbar

layout.css: add .ai_edit:after CSS rule for the icon

main.js:
- Collapse right-panel Colors section by default (respects saved cookie
  so user preference persists)
- Mount compact foreground/background color swatches at the bottom of
  the left toolbar; click either square to toggle the full color picker
  open/closed; syncs live with config.COLOR every 250ms

https://claude.ai/code/session_01B58MaJCU1R6KwBDJCp8AfN
2026-06-12 00:42:53 +00:00

9 lines
471 B
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<!-- Brush handle -->
<path d="M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/>
<!-- AI sparkle star -->
<path d="M20 13l.94 2.06L23 16l-2.06.94L20 19l-.94-2.06L17 16l2.06-.94z" fill="currentColor" stroke="none"/>
<!-- Small dot -->
<circle cx="20" cy="16" r="0" fill="currentColor"/>
</svg>