fix: overlapping text from ui_config

This commit is contained in:
s3lph 2023-09-14 00:02:50 +02:00
parent 1e3064fadf
commit be09f1824a
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5

View file

@ -60,13 +60,13 @@ class Flow3rOpenhabMqtt(Application):
ctx.font_size = 20
for i, text in enumerate(self.ui_config.get('labels', [])):
phi = (2*math.pi/10)*(i+1)-(math.pi/2)
radius = 50 if i%2 else 80
radius = 75 if i%2 else 90
x = radius*math.cos(phi)
y = radius*math.sin(phi)
ctx.rgb(1, 1, 1).move_to(x, y).text(text)
mode = self.ui_config.get('mode')
if mode:
ctx.font_size = 50
ctx.font_size = 35
ctx.rgb(1, 1, 1).move_to(0, 0).text(mode)
if CONFIG.get('debug_touch', False):
ctx.line_width =1