Skip to content

unlockDialog: also center the time in 12h format

Since the time string uses a space to pad single-digit numbers, the centered label looks off-center. Fix this by applying the trim() function to get rid of whitespaces. Here's comparison of how it looked before and after this commit.

Before After
Screenshot_from_2024-04-28_16-56-12 Screenshot_from_2024-04-28_16-56-40

The drawback of this approach is that the label will change position slightly when the time changes, but for the lockscreen that's okay.

Fixes #6193 (closed)

Merge request reports