mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix no en-space locale for vertical clock
This commit is contained in:
7
panel.js
7
panel.js
@@ -934,6 +934,7 @@ var dtpPanel = Utils.defineClass({
|
||||
},
|
||||
|
||||
_formatVerticalClock: function() {
|
||||
// https://github.com/GNOME/gnome-desktop/blob/master/libgnome-desktop/gnome-wall-clock.c#L310
|
||||
let datetime = this.statusArea.dateMenu._clock.clock;
|
||||
let datetimeParts = datetime.split(' ');
|
||||
let time = datetimeParts[1];
|
||||
@@ -949,6 +950,12 @@ var dtpPanel = Utils.defineClass({
|
||||
return !clockText.get_layout().is_ellipsized();
|
||||
};
|
||||
|
||||
if (!time) {
|
||||
datetimeParts = datetime.split(' ');
|
||||
time = datetimeParts.pop();
|
||||
datetimeParts = [datetimeParts.join(' '), time];
|
||||
}
|
||||
|
||||
if (!setClockText(datetime) &&
|
||||
!setClockText(datetimeParts) &&
|
||||
!setClockText(time)) {
|
||||
|
||||
Reference in New Issue
Block a user