Fix issue with FilledRect when using ui.invert=true

This commit is contained in:
João Henriques
2024-04-26 16:07:00 +01:00
parent 357ffc67e5
commit 9941f093e9

View File

@ -109,7 +109,7 @@ class View(object):
self._state.has_element(key) self._state.has_element(key)
def add_element(self, key, elem): def add_element(self, key, elem):
if self.invert is 1 and elem.color: if self.invert is 1 and hasattr(elem, 'color'):
if elem.color == 0xff: if elem.color == 0xff:
elem.color = 0x00 elem.color = 0x00
elif elem.color == 0x00: elif elem.color == 0x00: