This repository was archived by the owner on Dec 8, 2025. It is now read-only.
取色器取色点移出屏幕会出现取色异常的bug#21
Open
longer96 wants to merge 2 commits into
Open
Conversation
longer96
commented
Aug 16, 2021

[fix]:ColorSucker move off screen bug
smileShirely
suggested changes
Aug 16, 2021
|
|
||
| void _toolBarPanUpdate(DragUpdateDetails dragDetails) { | ||
| _toolBarY = dragDetails.globalPosition.dy - 40; | ||
| if (_toolBarY <= 0) _toolBarY = 0; |
Collaborator
There was a problem hiding this comment.
Suggested change
| if (_toolBarY <= 0) _toolBarY = 0; | |
| _toolBarY = max(0, _toolBarY); |
Comment on lines
+88
to
+90
| } else if (newY + (_magnifierSize.height / 2) > _windowSize.height) { | ||
| newY = _windowSize.height - 1; | ||
| } |
Collaborator
There was a problem hiding this comment.
在数值濒临溢出时,newY 的值会被马上设置为屏幕底部边缘值-1,这会导致在取色器濒临触达屏幕底部时产生“吸附”底部的效果,导致无法取到屏幕最底部的色值。
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.