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
[iOS] Fix edit box text are when caps lock is on #18738
base: v3
Are you sure you want to change the base?
Conversation
float rightPadding = padding; | ||
if(capsOn){ | ||
// Need to pad rect on right to account for right image view | ||
rightPadding = std::max(padding, (float)self.rightView.frame.size.width + RIGHT_VIEW_PADDING); |
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.
RIGHT_VIEW_PADDING
should calc Scale, like CC_EDIT_BOX_PADDING
did
float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor();
|
||
#define RIGHT_VIEW_PADDING 5.0f |
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.
RIGHT_VIEW_PADDING
-> CAPS_LOCK_PADDING
is better, since it's only change padding when caps lock is on
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.
And your modified have effect on all padding when single line mode, you should test other single line cases. it had bad effect when I tested.
refer to this screenshot:
Fix for #18739
New behavior