Skip to content

Commit 5f85122

Browse files
authored
Merge pull request #67 from FoamyGuy/widget_int_fix
handle float locations
2 parents 84f1762 + 207b583 commit 5f85122

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_displayio_layout/widgets/widget.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ def _update_position(self):
228228
"""
229229

230230
if (self._anchor_point is not None) and (self._anchored_position is not None):
231-
self.x = (
231+
self.x = int(
232232
self._anchored_position[0]
233233
- int(self._anchor_point[0] * self._bounding_box[2])
234234
- self._bounding_box[0]
235235
)
236-
self.y = (
236+
self.y = int(
237237
self._anchored_position[1]
238238
- int(self._anchor_point[1] * self._bounding_box[3])
239239
- self._bounding_box[1]

0 commit comments

Comments
 (0)