-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[Legacy color picker] Use zoomed preview at the mouse position instead of Label. #98411
Conversation
91b4f30
to
a016477
Compare
a016477
to
c5fb933
Compare
I get a compilation error on MSVC 2022:
|
c5fb933
to
5386153
Compare
Rebased and updated, this should be fixed now. |
Hi, note that this causes a regression with the |
You can use minimum size instead of size, so ignore will work correctly. |
5386153
to
9ab78ec
Compare
This may be due to #86563. I've been meaning to investigate that one for a while, likely using RenderDoc to make sure the glyph texture sizes match the size that should be used according to the oversampling factor and viewport resolution. |
Ref<Image> zoom_previw_img = img->get_region(Rect2i(ofs.x - 8, ofs.y - 8, 17, 17)); | ||
picker_texture_zoom->set_texture(ImageTexture::create_from_image(zoom_previw_img)); |
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.
I just noticed that you are extracting an image only to make a texture. You could use AtlastTexture instead and set region.
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.
Looks like a nice improvement. The non-legacy picking could get the same treatment, but it's more tricky.
I added one more comment, but it's not super critical.
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.
Tested locally, it works as expected.
I have updated #88950 to do the same for native picker. |
Superseded by #88950 (not includes the same for both native and legacy pickers). |
Replaces the label with a 3x zoom preview that is following mouse cursor.
Screen.Recording.2024-10-22.at.11.15.10.mov
Can be combined with #88950 to do the same for a normal color picker.