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

New color picker module - integrated from github.com/martinchrzan/Col… #4778

Merged
merged 14 commits into from Jul 18, 2020

Conversation

martinchrzan
Copy link
Contributor

@martinchrzan martinchrzan commented Jul 5, 2020

Summary of the Pull Request

NEW MODULE - Color Picker - integrated from github.com/martinchrzan/ColorPicker

image

Basic functionality provided:

  • Color picker appears when activation shortcut pressed (configurable in the settings)

  • Color picker follows the mouse cursor and shows the actual color that is below the cursor

  • Scroll up will cause Zoom Window to open for a better color picking precision

  • Left mouse click will copy that color into a clipboard in a predefined format (setting)

  • Changes cursor when picking a color (can be turned off)

  • Color picker is multimonitor/multi DPI aware. It respect monitors' boundaries and stays always in the view (predefined safe zones in top, bottom, left, right sides of a monitor)

  • Added the new section into Settings:

image

  • Updated installer to contain required files

References

This is the first version of a color picker as discussed in
#864

PR Checklist

  • Applies to Color meter / screen color picker #864
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Manual testing

Copy link
Contributor

@ryanbodrug-microsoft ryanbodrug-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on this.

This feature looks awesome! There are a couple nit things that I think we should be fix if we want to release it to .20.

  1. It would be great if you could set the the ColorPicker and ColorPickerUI Projects to a depenency of the runner to support an F5 and run scenario. eg.
    image
  2. [New Bug] - The colorpicker.exe process doesn't quit when we terminate PowerToys.exe
  3. [New Bug] - The cursor gets permanently changed for some windows event after shutting down the process.
  4. [Opinion] - We may want to consider a different default Activation Shortcut as I find Ctrl interfers with copy paste functionality.

Note: I just kicked off an official build and would like to do a quick smoke test from the msi generated there, but I'm able to build and run from the installer locally.

I'm happy to approve this if we can commit to fixing the minor bugs I mentioned. @crutkas alternatively we could consider feature flags to be able to move forward without introducing bugs we don't have capacity for for .20.

This is awesome work thank you so much!!

…cker project into runner dependencies, restoring cursors on exit, added ManagedCommon as a dependency into installer
@martinchrzan
Copy link
Contributor Author

@ryanbodrug-microsoft I have addressed your comments:

  1. Added as a dependency
  2. ColorPicker.exe now monitors its parent process and closes when PowerToys.exe shuts down
  3. Not sure about that one, I tried to restore cursors, could you try and see if you can still replicate it?
  4. I don't have any preference, this shortcut was picked randomly, we can set any you like as default.

Thanks a lot for the review, I know it is quite a lot of code to go through :)

@ryanbodrug-microsoft
Copy link
Contributor

ryanbodrug-microsoft commented Jul 16, 2020

@martinchrzan Thanks for the updates, and sorry for the delay. Wrt #3 I'll try to find some repro steps for that, and document a new issue. It wasn't able to run from the installer, and I tracked it down to attempting to load the wrong architecture for MangedCommon in release. I've pushed those changes in a user branch at commit cf2ffca. I also created a PR #5046 that has a the above change change in master that fixed the broken installer that was preventing me from testing. I've used this to kick off an official build but that change is already in master. I'm just going to do 1 quick smoke test on the official build and then I'll sign of -- trusting you to merge in cf2ffca before completing the PR. I didn't want to push it directly to your branch without you approving it.

* Changing configuration to x64 instead of AnyCPU.   The previous configuration was preventing the ManagedCommon binary from being loaded in Release.

* Updating MSI Installer with new icons (#4998)
@martinchrzan
Copy link
Contributor Author

@ryanbodrug-microsoft Thank you for the investigation! I wasn't aware of it. I merged your changes in and waiting for your approval :)

Copy link
Contributor

@ryanbodrug-microsoft ryanbodrug-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I validated the latest changes locally! Thanks for that. I also kicked off a new build. It would be good to double check that before you complete the PR, but I'm very confident it will work now based on the changes you just added. Thanks again for all the work on this :)

@martinchrzan martinchrzan merged commit bc301f2 into master Jul 18, 2020
@crutkas crutkas deleted the user/martinchrzan/ColorPickerModule branch July 29, 2020 21:04
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

4 participants