Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mouse Jump] Customisable appearance - borders, margins, colours, etc (🎬 Take 2) #32838

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mikeclayton
Copy link
Contributor

@mikeclayton mikeclayton commented May 12, 2024

Summary of the Pull Request

This is a re-visit of cancelled PR #29292 / issue #27511 to add customisable styles (2d / 3d effect borders, colours, padding, margins etc) around the Mouse Jump preview screen and the individual screenshots on it.

In the previous PR I hit a dead-end with the logic to upgrade existing Mouse Jump config files and with exposing all the style settings in the Settings UI, so in this PR I've just synched the latest rendering code from my FancyMouse utility but made no attempt to add any new settings to Mouse Jump right now.

As a result, there's no new Settings UI properties or application functionality in this PR - I've left the default Mouse Jump preview style as-is (i.e. flat preview border and no margins or bezels around screens), but this PR will make it easier to expose the style settings in follow-up work if all the rendering code is already there.

(See #27511 for a description of the eventual "customisable preview styles" feature proposal this PR is a step toward)

PR Checklist

  • Closes: - partial implementation of [Mouse Jump] Customisable appearance - borders, margins, colours, etc #27511
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
    • spoke briefly with @crutkas - there's higher priority work right now, but posting this PR so it can be picked up when there's capacity...
  • Tests: Added/updated and all pass
    • new tests from FancyMouse ported into Mouse Jump and all pass
  • Localization: All end user facing strings can be localized
    • no changes required
  • Dev docs: Added/updated
    • no changes required
  • New binaries: Added on the required places
    • no changes required
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
    • no changes required

Detailed Description of the Pull Request / Additional comments

Mostly a maintenance release to sync "customisable style rendering" code from FancyMouse to Mouse Jump::

  • moved all code shared with FancyMouse into a "Common" folder to make it easier to keep in sync
  • synced customisable style-based preview rendering from FancyMouse to Mouse Jump
  • fixed a bug where number pad keys didn't jump the mouse to the numbered screen
  • unit tests can now test real rendering of the preview image by "capturing" areas of a static test bitmap instead of the live desktop screen and comparing it to an embedded resource containing the expected image, which is a last line of defence against regression bugs

Validation Steps Performed

The latest commit seems to work fine locally, but I've not performed a full regression test yet...

  • Workflow tests
    • Automated tests passing locally
    • Minimal actions workflow (spelling check) passing for PR
    • Full actions workflow (msbuild) passing for PR
  • UI tests
  • Lifecycle tests
    • Starting PowerToys Runner launches MouseJumpUI.exe when enabled, and not when disabled
    • Enabling / disabling Mouse Jump in settings starts / stops MouseJumpUI.exe
    • Exiting PowerToys Runner stops MouseJumpUI.exe
    • Killing runner exe via Task Manager stops MouseJumpUI.exe
    • Stopping Visual Studio local debug run stops MouseJumpUI.exe
      • note - runner needs to be in non-admin mode otherwise Visual Studio debugger disconnects at launch
    • Hotkey and size settings are automatically reloaded when config file is modified from Settings UI
    • Hotkey and size settings are automatically reloaded when config file is modified manually (e.g. in notepad) while runner and MouseJumpUI.exe are running
  • Internal Test Suite
    • Enable Mouse Jump. Then:
    • Press the activation shortcut and verify the screens preview appears.
    • Change activation shortcut and verify that new shortcut triggers Mouse Jump.
    • Click around the screen preview and ensure that mouse cursor jumped to clicked location.
    • Reorder screens in Display settings and confirm that Mouse Jump reflects the change and still works correctly.
    • Change scaling of screens and confirm that Mouse Jump still works correctly.
    • Unplug additional monitors and confirm that Mouse Jump still works correctly.
    • Disable Mouse Jump and verify that the module is not activated when you press the activation shortcut.

@mikeclayton mikeclayton changed the title Dev/mikeclayton/mousejump styles [Mouse Jump] Customisable appearance - borders, margins, colours, etc (🎬 Take 2) May 12, 2024
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.

None yet

1 participant