Skip to content

Commit

Permalink
Adjust vertical panel clock
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesg99 committed Apr 3, 2022
1 parent 4915f27 commit a721d66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,11 +1201,12 @@ var Panel = GObject.registerClass({
let clockText = this.statusArea.dateMenu._clockDisplay.clutter_text;
let setClockText = text => {
let stacks = text instanceof Array;
let separator = '\n<span size="xx-small">‧‧</span>\n';
let separator = '\n<span size="xx-small"> ‧‧ </span>\n';

clockText.set_text((stacks ? text.join(separator) : text).trim());
clockText.set_use_markup(stacks);
clockText.get_allocation_box();
clockText.natural_width = this.dtpSize

return !clockText.get_layout().is_ellipsized();
};
Expand Down
3 changes: 2 additions & 1 deletion panelStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ var PanelStyle = class {
trayPaddingStyleLine = paddingStyle.format(trayPadding);
operation.compareFn = function (actor) {
let parent = actor.get_parent();
return (parent && parent.has_style_class_name && parent.has_style_class_name('panel-button'));
return ((parent && parent.has_style_class_name && (parent.has_style_class_name('panel-button') && !parent.has_style_class_name('clock-display'))) ||
(actor.has_style_class_name && actor.has_style_class_name('clock')));
};
} else {
trayPaddingStyleLine = '-natural-hpadding: %dpx'.format(trayPadding);
Expand Down
8 changes: 7 additions & 1 deletion stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,16 @@

.dashtopanelMainPanel.vertical .panel-button > *,
.dashtopanelMainPanel.vertical .panel-button.vertical > *,
.dashtopanelMainPanel.vertical .panel-button.clock-display > * {
.dashtopanelMainPanel.vertical .panel-button.clock-display > *,
.dashtopanelMainPanel.vertical .panel-button.clock-display .clock {
padding: 8px 0;
}

.dashtopanelMainPanel.vertical .panel-button.clock-display {
-natural-hpadding: 0;
-minimum-hpadding: 0;
}

#dashtopanelThumbnailList {
spacing: 0em;
padding: 0 1em;
Expand Down

0 comments on commit a721d66

Please sign in to comment.