-
Notifications
You must be signed in to change notification settings - Fork 3.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
Resolve field angle overlap render problem #2418
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I signed it! |
Note to maintainers: I added some colour calculation functions in #2413 that may affect this. |
Hi Navid, Thanks for the contribution, but we only accept pull requests against the develop branch. You may be able to rebase your branch locally ( |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@RoboErikG My mistake. It is now against the develop branch |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
core/field_angle.js
Outdated
@@ -209,7 +210,7 @@ Blockly.FieldAngle.prototype.showEditor_ = function() { | |||
|
|||
|
|||
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), | |||
this.sourceBlock_.getColour()); | |||
goog.color.rgbArrayToHex(goog.color.lighten(goog.color.hexToRgb(this.sourceBlock_.getColour()), 0.6))); |
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.
Bonus, BeksOmega just added an API for this. You can now use block.getColourBorder().
The one caveat is you need to check which border colour to use since the old style is slightly different. We might tweak the API with this use case in mind, but for now this can be:
var border = this.sourceBlock_.getColourBorder();
border = border.colourBorder == null ? border.colourLight : border.colourBorder;
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), border);
@BeksOmega no action necessary, but as a point of reference here's another use case for the colourBorder API. =) |
Thanks for the PR! |
The basics
The details
Resolves
Adding a border to angle picker field, to fix rendering problem when two blocks with the same color overlap issue #2379
Proposed Changes
Instead of using the same color for background and border, lighten the background color and use it for border color.
Reason for Changes
Some render problems when two blocks with the same color overlap. issue #2379
Test Coverage
Tested on:
Additional Information