Clients: fix incorrect log entry height, by overriding correct height every 30 milliseconds

This commit is contained in:
Fabian Dill 2022-01-23 23:31:49 +01:00
parent 056b38fd2a
commit 9fbc7470c1
1 changed files with 7 additions and 0 deletions

View File

@ -290,6 +290,7 @@ class GameManager(App):
return self.container
def update_texts(self, dt):
self.tabs.content.children[0].fix_heights() # TODO: remove this when Kivy fixes this upstream
if self.ctx.server:
self.title = self.base_title + " " + Utils.__version__ + \
f" | Connected to: {self.ctx.server_address} " \
@ -401,6 +402,12 @@ class UILog(RecycleView):
def on_message_markup(self, text):
self.data.append({"text": text})
def fix_heights(self):
"""Workaround fix for divergent texture and layout heights"""
for element in self.children[0].children:
if element.height != element.texture_size[1]:
element.height = element.texture_size[1]
class E(ExceptionHandler):
logger = logging.getLogger("Client")