Skip to content

feat: switch draw mode — overlay hide/show toggle#6

Closed
ajianaz wants to merge 1 commit into
developfrom
feat/switch-draw-mode
Closed

feat: switch draw mode — overlay hide/show toggle#6
ajianaz wants to merge 1 commit into
developfrom
feat/switch-draw-mode

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Changes

Core: Switch between draw overlay and normal app usage

  • Draw mode ON → overlay visible, captures mouse, user can scribble
  • Draw mode OFF → overlay hidden, user interacts with apps behind it
  • Strokes preserved when toggling — they reappear when draw mode is re-enabled

Three ways to toggle

  1. Global shortcut Alt+Shift+D — works from anywhere, even when using another app
  2. Tray menu → Toggle Draw Mode
  3. FAB button — red ✕ circle at bottom-left when in draw mode

Technical changes

  • Rust: hide_overlay() function (set click-through → hide window)
  • Rust: show_overlay() function (show → focus → always-on-top → capture mouse)
  • Rust: Global shortcut re-enabled with proper error handling
  • Rust: Startup uses Accessory policy (hidden from dock until draw mode)
  • Config: visible: false, skipTaskbar: true in tauri.conf.json
  • Capabilities: Added set-always-on-top, allow-show, allow-hide
  • Frontend: Removed debug overlay, cleaned up unused variables
  • Frontend: FAB stop button (red circle) replaces text button

Testing

  • Frontend check: 0 errors, 0 warnings
  • Rust compile (needs macOS/Linux GTK deps — will run in CI)
  • Manual: toggle via shortcut from another app
  • Manual: strokes persist after hide/show

- Draw mode ON: overlay visible, captures mouse for drawing
- Draw mode OFF: overlay hidden, user interacts with apps behind
- Strokes preserved when toggling — reappear on re-enable
- Global shortcut Alt+Shift+D re-enabled for toggle from anywhere
- Startup: overlay hidden (Accessory policy on macOS)
- Cleanup debug overlay, remove unused pdown counter
- FAB stop button (red circle) replaces text button
- tauri.conf.json: visible=false, skipTaskbar=true
- capabilities: add set-always-on-top, allow-show, allow-hide

Author: ajianaz
@ajianaz

ajianaz commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Closing for now — will revisit. UX gap: no way to enter draw mode on develop base (removed Start Draw button without this PR's shortcut toggle).

@ajianaz ajianaz closed this Jul 12, 2026
@ajianaz ajianaz deleted the feat/switch-draw-mode branch July 12, 2026 01:37
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.

1 participant