mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Adjust vertical panel clock
This commit is contained in:
3
panel.js
3
panel.js
@@ -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();
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user