mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Use different time and date time separator vertical
This commit is contained in:
8
panel.js
8
panel.js
@@ -372,7 +372,7 @@ var Panel = GObject.registerClass({
|
||||
this._setSearchEntryOffset(this.geom.w);
|
||||
|
||||
if (this.statusArea.dateMenu) {
|
||||
this._formatVerticalClock();
|
||||
this._timeoutsHandler.add(['formatVerticalClock', 100, this._formatVerticalClock]);
|
||||
|
||||
this._signalsHandler.add([
|
||||
this.statusArea.dateMenu._clock,
|
||||
@@ -1199,9 +1199,9 @@ var Panel = GObject.registerClass({
|
||||
let datetimeParts = datetime.split(' ');
|
||||
let time = datetimeParts[1];
|
||||
let clockText = this.statusArea.dateMenu._clockDisplay.clutter_text;
|
||||
let setClockText = text => {
|
||||
let setClockText = (text, useTimeSeparator) => {
|
||||
let stacks = text instanceof Array;
|
||||
let separator = '\n<span size="xx-small"> ‧‧ </span>\n';
|
||||
let separator = `\n<span size="8192"> ${useTimeSeparator ? '‧‧' : '—' } </span>\n`;
|
||||
|
||||
clockText.set_text((stacks ? text.join(separator) : text).trim());
|
||||
clockText.set_use_markup(stacks);
|
||||
@@ -1235,7 +1235,7 @@ var Panel = GObject.registerClass({
|
||||
timeParts.push.apply(timeParts, timeParts.pop().split(' '));
|
||||
}
|
||||
|
||||
setClockText(timeParts);
|
||||
setClockText(timeParts, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
.dashtopanelMainPanel.vertical .panel-button.clock-display {
|
||||
-natural-hpadding: 0;
|
||||
-minimum-hpadding: 0;
|
||||
-minimum-hpadding: 0;
|
||||
}
|
||||
|
||||
#dashtopanelThumbnailList {
|
||||
|
||||
Reference in New Issue
Block a user