Closed FoamyGuy closed 3 years ago
Hmm, this is definitely inconsistent. I was under the impression that it was supposed to work like in the Blinka version.
@tannewt for scaling multiple groups inside each other, is it supposed to have a compound effect or more of an overriding value effect?
Oh never mind. I see what's going on here. Nice find.
Hmm, this is definitely inconsistent. I was under the impression that it was supposed to work like in the Blinka version.
@tannewt for scaling multiple groups inside each other, is it supposed to have a compound effect or more of an overriding value effect?
It should compound. The scales should be independent. That means the outer group will have no idea an inner group is scaled.
Thanks, that's what I thought. After looking closer I saw the issue was that the independent groups were affecting each other, which is why I said never mind. :)
I think the above referenced issue and proposed solution may resolve this issue. Once that change gets merged, please check again to see if it is solved.
Short root cause: Display_text uses a variable called self._scale which is also defined in displayio.Group for Blinka . So this means that Group in Blinka responds to this in ways that differ from the core CircuitPython displayio.
There was a fix for this put into the display_text library that makes the label scaling work the same on Blinka_Displayio and core displayio.
I think there is still something inconsistent between the two, but I never did manage to figure out a more self contained reproducer.
We could open this back up in the future if something similar comes up. But I'm going to close this for now, display_text was the only example of this issue that I am aware of and the fix there works well for me.
I am still working on trying to distill this issue down further to figure out the root cause, but I wanted to get down what I've discovered so far.
I first noticed this issue in the context of display_text labels (and bitmap_labels) so the current example code uses those, but I hope to narrow it down further to just Group, Tilegrid, and Bitmap.
Code:
With this code I think we would expect one small label (the control) and two labels that are 2x the size of the control. One is scaled via it's own scale property, the other is scaled with another Group. I don't think there should be any visible difference between the latter two.
On a PyPortal that is exactly what we get (excuse the blurry photo):
With Blinka_Displayio the label that is scaled using it's own init parameter seems to be getting scaled an extra time so when
scale=2
it looks visually on the screen like it would if it were actuallyscale=4