alert: Align on baseline
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2023-09-06 11:06:36 +02:00
parent d9689a679d
commit 8ad97bfca3

View File

@ -116,15 +116,15 @@ class AlertsModule:
if "title" in alert: if "title" in alert:
draw.text( draw.text(
((self.icon_size if alert["icon"] is not None else 0) - 5, align), ((self.icon_size if alert["icon"] is not None else 0) - 5, align + 12),
alert["title"], alert["title"],
fill="white", anchor="lt", font=fnt_B fill="white", anchor="ls", font=fnt_B
) )
if "subtitle" in alert and alert["subtitle"]: if "subtitle" in alert and alert["subtitle"]:
draw.text( draw.text(
((self.icon_size if alert["icon"] is not None else 0) + (fnt_B.getsize(alert["title"])[0] if "title" in alert else 0), align + 3), ((self.icon_size if alert["icon"] is not None else 0) + (fnt_B.getsize(alert["title"])[0] if "title" in alert else 0), align + 12),
alert["subtitle"], alert["subtitle"],
fill="white", anchor="lt", font=fnt_R fill="white", anchor="ls", font=fnt_R
) )
if "title" in alert: if "title" in alert: