You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think width and height should be provided without the leading underscore. It's very useful to know a views size when trying to place other views "after" or "around" it on the screen. I have a specific example of where this comes into play in my display_layout library here where I am trying to use the size of the view to determine where to place the next view in a vertical or horizontal list on the screen.
Some of the other existing displayio view widgets do provide public access to width and height:
adafruit_display_button provides it's width and height with no leading underscore: adafruit_button.py#L106
adafruit_display_text provides width and height via the public property bounding_box: label.py#L303
OnDiskBitmap and the object that results from adafruit_imageload.load() also have public width and height
The text was updated successfully, but these errors were encountered:
We currently have stored
width
andheight
in private properties whose names start with underscore:Adafruit_CircuitPython_ProgressBar/adafruit_progressbar.py
Line 83 in 247b51d
I think
width
andheight
should be provided without the leading underscore. It's very useful to know a views size when trying to place other views "after" or "around" it on the screen. I have a specific example of where this comes into play in my display_layout library here where I am trying to use the size of the view to determine where to place the next view in a vertical or horizontal list on the screen.Some of the other existing displayio view widgets do provide public access to width and height:
adafruit_display_button provides it's width and height with no leading underscore: adafruit_button.py#L106
adafruit_display_text provides width and height via the public property
bounding_box
: label.py#L303OnDiskBitmap
and the object that results fromadafruit_imageload.load()
also have publicwidth
andheight
The text was updated successfully, but these errors were encountered: