From ccdd46c0d9372d8587809eb11add08ee87200b67 Mon Sep 17 00:00:00 2001 From: pesader Date: Sun, 28 Apr 2024 17:40:59 -0300 Subject: [PATCH] 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. The drawback of this approach is that the label will change position slightly when the time changes, but for the lockscreen that's okay. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6193 Part-of: --- js/ui/unlockDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 15a3a984e..7b2ab8d38 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -366,7 +366,7 @@ class UnlockDialogClock extends St.BoxLayout { } _updateClock() { - this._time.text = this._wallClock.clock; + this._time.text = this._wallClock.clock.trim(); let date = new Date(); /* Translators: This is a time format for a date in