Skip to content

feat: set pasting image default folder & resolve macOS screenshot scale & setting shortcut#86

Merged
alecdotdev merged 2 commits intoalecdotdev:masterfrom
maxrks:fix-image-folder-setting
Mar 30, 2026
Merged

feat: set pasting image default folder & resolve macOS screenshot scale & setting shortcut#86
alecdotdev merged 2 commits intoalecdotdev:masterfrom
maxrks:fix-image-folder-setting

Conversation

@maxrks
Copy link
Copy Markdown
Contributor

@maxrks maxrks commented Mar 30, 2026

Summary

This PR implements three user-requested features to improve the image handling and accessibility of Markpad.

Features Implemented

1. Image Directory Configuration

  • Added setting to allow users to configure the target directory name for pasted images
  • Defaults to "img" but can be changed to any directory name
  • The setting is persisted in localStorage

2. macOS Image Scaling Toggle

  • Added toggle option to enable/disable automatic 50% scaling for macOS screenshots
  • Uses high-quality Lanczos3 filter for optimal image clarity
  • The setting is only visible on macOS platform

3. Settings Keyboard Shortcut

  • Added keyboard shortcut to open settings:
    • macOS: cmd+,
    • Windows: ctrl+,
  • Works globally across the application

Files Modified

  • src/lib/stores/settings.svelte.ts - Added image directory and macOS scaling settings
  • src/lib/components/Settings.svelte - Added new setting options in UI
  • src/lib/components/Editor.svelte - Updated to use configured image directory
  • src-tauri/src/lib.rs - Modified image handling functions to support directory configuration and scaling
  • src/lib/MarkdownViewer.svelte - Added keyboard shortcut handling

Impact

  • User Experience: Provides more control over image handling and quick access to settings
  • Compatibility: Maintains cross-platform support
  • Performance: Minimal impact, scaling only occurs on macOS when enabled
  • Accessibility: Improves keyboard navigation with new shortcut

Testing

  • Verified image directory setting works correctly
  • Confirmed macOS scaling toggle functions as expected
  • Tested keyboard shortcut on both macOS and Windows
  • Ensured all changes compile and run without errors

maxrks added 2 commits March 30, 2026 21:54
…ing issue & add settings shortcut

Auto-scale 50% for Retina screenshots on macOS
Add toggle in settings & keyboard shortcut (cmd+,/ctrl+,)
Improve image quality with Lanczos3 scaling
@alecdotdev alecdotdev merged commit c81f9b0 into alecdotdev:master Mar 30, 2026
1 check passed
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