-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Ready for Review - [Mouse Jump] Customisable appearance - borders, margins, colours, etc - final part #35521
Ready for Review - [Mouse Jump] Customisable appearance - borders, margins, colours, etc - final part #35521
Conversation
This comment has been minimized.
This comment has been minimized.
…hub.com/mikeclayton/PowerToys into dev/mikeclayton/mousejump-styles-part-3
This comment has been minimized.
This comment has been minimized.
I think this PR is ready for review now - I still need to do the full set of regression tests but the happy path works fine. There's some notes for reviewers in the original post at the top. |
# Conflicts: # src/modules/MouseUtils/MouseJumpUI/Program.cs
Hi, just merged main to check with .NET 9 :) I'll review this PR soon. |
@@ -7,6 +7,9 @@ | |||
using System.Text.Json.Serialization; | |||
|
|||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces; | |||
using MouseJump.Common.Helpers; | |||
using MouseJump.Common.Models.Settings; | |||
using Windows.UI.Xaml.Printing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows.UI.Xaml.Printing
doesn't seem to be used anywhere, but it's giving an analyzer error. Removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Not sure about having Settings Lib now depend on MouseJump Common, but I think it should be pretty fine and not blocking on it.
Now the default has bezels, which I guess will be a fun way for users to find out this new feature :) But it's pretty easy to just go into Settings and switch it back to compact. Pretty OK with that too.
Tested it and tested upgrade, it's looking good.
Thank you for the contribution!
I guess there's an overhead in that any future changes to MouseJump.Common will require at least superficial testing of the Settings UI now, but it was the only way I could come up with to get the graphical preview working, and that felt like it was a useful addition to the settings controls (although I guess you could change a setting, activate mouse jump to see the effect, then rinse and repeat, and maybe that would have been enough :-)...) |
commit a50eb4a Author: Christian Gaarden Gaardmark <[email protected]> Date: Thu Nov 28 21:41:29 2024 -0800 Remove a small change commit 587320d Author: Christian Gaarden Gaardmark <[email protected]> Date: Thu Nov 28 09:45:46 2024 -0800 Fix for enter_rename mode commit 911864e Author: Christian Gaarden Gaardmark <[email protected]> Date: Thu Nov 28 07:53:01 2024 -0800 Early version -- doesn't work commit 3dc4913 Author: Shuai Yuan <[email protected]> Date: Thu Nov 28 05:57:20 2024 +0800 Upgrade Windows App SDK to the latest version (microsoft#36093) Signed-off-by: Shawn Yuan <[email protected]> commit 271d64b Author: grzhan <[email protected]> Date: Thu Nov 28 03:44:56 2024 +0800 [PTRun][Docs] Add HttpStatusCodes to Third-Party plugins (microsoft#36055) * [PTRun][Docs] Add HttpStatusCodes to Third-Party plugins * adding grzhan to names.txt --------- Co-authored-by: Clint Rutkas <[email protected]> commit a90b646 Author: Andrea Bartolucci <[email protected]> Date: Wed Nov 27 18:30:25 2024 +0100 [PTRun][WindowWalker]Added score to the results (microsoft#35691) Added Score to the results returned by WindowWalker Co-authored-by: Andrea Bartolucci <[email protected]> commit 084402a Author: Christian Gaarden Gaardmark <[email protected]> Date: Wed Nov 27 06:22:05 2024 -0800 [New+]Windows 10 support (microsoft#35832) commit 08fe808 Author: Ani <[email protected]> Date: Tue Nov 26 21:38:41 2024 +0100 [Logs]Fixed name of logging method in managed logging (microsoft#35952) * Fixed name of method in managed logging * Added hardening commit 5321218 Author: Michael Clayton <[email protected]> Date: Tue Nov 26 15:37:59 2024 +0000 [Mouse Jump] Customisable appearance - borders, margins, colours, etc - final part (microsoft#35521) * [MouseJump] move Mouse Jump settings into separate control (microsoft#27511) * [MouseJump] added Mouse Jump style controls to Settings UI (microsoft#27511) * [MouseJump] added Mouse Jump style controls to Settings UI (microsoft#27511) * [MouseJump] removing unused MouseJumpUI code (microsoft#27511) * [MouseJump] whitespace (microsoft#27511) * [MouseJump] fix spellcheck (microsoft#27511) * [MouseJump] enabled "Copy to custom style" (microsoft#27511) * [MouseJump] fixing build (internal members -> public) (microsoft#27511) * [MouseJump] remove unused "using"s (microsoft#27511) * [MouseJump] use custom styles in preview image (microsoft#27511) * [MouseJump] fixing failing test (microsoft#27511) * [MouseJump] fixing failing test (microsoft#27511) * [MouseJump] fixing failing test (microsoft#27511) * [MouseJump] fixing failing test (microsoft#27511) * [MouseJump] delinting to trigger a build (microsoft#27511) * [MouseJump] updated settings preview image ("browser" header) (microsoft#27511) * [MouseJump] upgrade default "custom" style settings in config (microsoft#27511) * [MouseJump] fixed a glitch in settings upgrade (microsoft#27511) * [MouseJump] fixed spell checker (microsoft#27511) * [MouseJump] typo in resource strings (image -> images) (microsoft#27511) * Remove unused include commit 7c98765 Author: Ishita Agarwal <[email protected]> Date: Tue Nov 26 10:43:44 2024 +0530 Removed extra space from welcome page (microsoft#35778) * Removed extra space from welcome page * Added space between info bar and release notes commit 6cece12 Author: Dave Rayment <[email protected]> Date: Fri Nov 22 16:25:01 2024 +0000 [Peek]Add support for previewing .ahk files as plaintext (microsoft#35538) commit 863f7aa Author: Dave Rayment <[email protected]> Date: Fri Nov 22 16:24:15 2024 +0000 [Peek] Fix Monaco assets folder discovery (microsoft#35925) commit b81478e Author: Dave Rayment <[email protected]> Date: Fri Nov 22 14:49:35 2024 +0000 [Peek]Expand image format support for Image Previewer using local capabilities (microsoft#35622) * Use BitmapDecoder to query compatible file extensions. * Delete spellcheck exceptions for removed file types * Remove unused usings.
Summary of the Pull Request
This is the last part of the Mouse Jump styles work that finally enables the feature in Settings UI and in the Mouse Jump preview image.
See #27511 for the original feature suggestion.
Changes in this PR
Reviewer Notes
Added a reference to CommunityToolkit.WinUI.Controls.Segmented in PowerToys.Settings to allow the "Compact | Bezelled | Custom" options for Preview Style
Added a reference to MouseJump.Common in PowerToys.Settings to allow rendering the preview image when settings are changed
I've made "Bezelled" the new default style as a precursor to the proposed Mouse Without Borders integration in Integrate Mouse Jump with Mouse Without Borders to allow jumping to remote computers when MWB is enabled #34126 - it'll be easier to make the bezel colours vary by host if they're already visible.
Code touches the internals of the Segmented control to force the preview image to be centered - see
PreviewImage_Loaded
method - might be brittle if the implementation changes?Config upgrade seems a bit odd - the in-memory settings get upgraded fine with
"version": "1.`"
but it seems to get reverted and saved again as"version": "1.0"
and then overwritten again as"version"": "1.1"
. I've worked around this by additionally checking if the new settings have values before upgrading, but it seems like that's what the version flag is supposed to be for. It works for now anyway, but not sure if this is the right way to do it...Does the "Copy to Custom preview style" need an "Are you sure? Yes / No" before overwriting and / or a "Copied!" message after copying? I'm happy to leave it as is, but feedback welcome...
PR Checklist
Validation Steps Performed
Hotkey and size settings are automatically reloaded when config file is modified manually (e.g. in notepad) while runner and MouseJumpUI.exe are running