Repository navigation
Add clean window snip feature with hotkey and UI support - #128
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds a new “clean window snip” capture mode that can be triggered via a configurable global hotkey and from the tray menu, captures the window under the cursor, and opens it in the overlay with a beautified (padded + shadow) presentation.
Changes:
- Add new persisted setting + settings UI/shortcuts UI to configure a “Clean window snip” hotkey.
- Add a new global hotkey event and tray menu entry to trigger clean window snips.
- Introduce window-under-cursor capture (PrintWindow with screen-capture fallback) and a new overlay session mode to preserve behavior for this flow.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Pointframe/Views/SettingsWindow.xaml.cs | Adds key-capture handlers for the new clean-window hotkey in both the Capture and Shortcuts sections. |
| Pointframe/Views/SettingsWindow.xaml | Adds UI for configuring the clean-window hotkey and exposes it in the shortcuts list with automation IDs. |
| Pointframe/Views/OverlayWindow.xaml.cs | Extends InitializeFromImage to accept a session mode and stores it for later layout/behavior decisions. |
| Pointframe/Views/OverlayWindow.Layout.cs | Ensures “opened image” initialization doesn’t overwrite WindowClean mode and propagates the current mode into session entry. |
| Pointframe/ViewModels/SettingsViewModel.cs | Adds VM properties/commands for the clean-window hotkey, includes them in load/save/defaults flows. |
| Pointframe/Services/Infrastructure/UserSettingsService.cs | Updates settings cloning to preserve the new clean-window hotkey fields. |
| Pointframe/Services/Infrastructure/TrayIconManager.cs | Adds a tray menu item and callback wiring for “Clean window snip”. |
| Pointframe/Services/Infrastructure/IGlobalHotkeyService.cs | Adds CleanWindowSnipRequested event to the global hotkey service contract. |
| Pointframe/Services/Infrastructure/GlobalHotkeyService.cs | Detects the new hotkey and raises CleanWindowSnipRequested. |
| Pointframe/Services/Capture/WindowCaptureService.cs | New service to capture the window under the cursor via PrintWindow with fallback to screen capture. |
| Pointframe/Services/Capture/IWindowCaptureService.cs | New interface for window-under-cursor capture. |
| Pointframe/Services/Capture/ICaptureLaunchService.cs | Adds StartCleanWindowSnip API for capture launching. |
| Pointframe/Services/Capture/CaptureLaunchService.cs | Implements clean-window snip launch, beautifies the captured bitmap, and opens it in the overlay with WindowClean mode. |
| Pointframe/Models/UserSettings.cs | Adds persisted defaults for the clean-window hotkey and modifiers. |
| Pointframe/Models/SelectionSessionMode.cs | Adds new WindowClean session mode. |
| Pointframe/App.xaml.cs | Wires the new tray action + global hotkey event and registers IWindowCaptureService. |
| Pointframe.Tests/ViewModels/SettingsViewModelTests.cs | Adds tests for clean-window hotkey defaults and persistence through Save(). |
| Pointframe.Tests/SettingsWindowTests.cs | Adds a UI-level test ensuring the clean-window hotkey capture callback updates the VM. |
| Pointframe.Tests/Services/TrayIconManagerTests.cs | Updates test setup for the new tray callback parameter. |
| Pointframe.Tests/Services/GlobalHotkeyServiceTests.cs | Adds a basic test covering subscription/invocation of the new event. |
| Pointframe.Tests/OverlayWindowInteractionTests.cs | Adds a test ensuring WindowClean mode is preserved when initializing from an image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.