Clients: fix incorrect log entry height, by overriding correct height every 30 milliseconds
This commit is contained in:
parent
056b38fd2a
commit
9fbc7470c1
7
kvui.py
7
kvui.py
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue