diff --git a/appIcons.js b/appIcons.js index b8a9d38..008a08a 100644 --- a/appIcons.js +++ b/appIcons.js @@ -64,6 +64,8 @@ const T4 = 'overviewWindowDragEndTimeout'; const T5 = 'switchWorkspaceTimeout'; const T6 = 'displayProperIndicatorTimeout'; +//right padding defined for .overview-label in stylesheet.css +const TITLE_RIGHT_PADDING = 8; const DOUBLE_CLICK_DELAY_MS = 450; let LABEL_GAP = 5; @@ -552,8 +554,10 @@ var TaskbarAppIcon = GObject.registerClass({ Me.settings.get_string('group-apps-label-font-color'); let scaleFactor = Utils.getScaleFactor(); let maxLabelWidth = Me.settings.get_int('group-apps-label-max-width') * scaleFactor; + let variableWidth = !useFixedWidth || this.dtpPanel.checkIfVertical() || this.dtpPanel.taskbar.fullScrollView; this._windowTitle[(maxLabelWidth > 0 ? 'show' : 'hide')](); + this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + TITLE_RIGHT_PADDING * scaleFactor); this._windowTitle.clutter_text.natural_width = useFixedWidth ? maxLabelWidth : 0; this._windowTitle.clutter_text.natural_width_set = useFixedWidth; diff --git a/panel.js b/panel.js index 9427d86..c8009a0 100644 --- a/panel.js +++ b/panel.js @@ -956,15 +956,14 @@ var Panel = GObject.registerClass({ } } - if (this.geom.position == St.Side.TOP) { + if (this.geom.position == St.Side.TOP && Config.PACKAGE_VERSION < '42') { let childBoxLeftCorner = new Clutter.ActorBox(); let childBoxRightCorner = new Clutter.ActorBox(); let currentCornerSize = this.cornerSize; let panelAllocFixedSize = box[this.fixedCoord.c2] - box[this.fixedCoord.c1]; - if (Config.PACKAGE_VERSION < '42') { - [ , this.cornerSize] = this.panel._leftCorner.actor[this.sizeFunc](-1); - } + [ , this.cornerSize] = this.panel._leftCorner.actor[this.sizeFunc](-1); + childBoxLeftCorner[this.varCoord.c1] = 0; childBoxLeftCorner[this.varCoord.c2] = this.cornerSize; childBoxLeftCorner[this.fixedCoord.c1] = panelAllocFixedSize; @@ -975,13 +974,11 @@ var Panel = GObject.registerClass({ childBoxRightCorner[this.fixedCoord.c1] = panelAllocFixedSize; childBoxRightCorner[this.fixedCoord.c2] = panelAllocFixedSize + this.cornerSize; - if (Config.PACKAGE_VERSION < '42') { - Utils.allocate(this.panel._leftCorner.actor, childBoxLeftCorner, flags); - Utils.allocate(this.panel._rightCorner.actor, childBoxRightCorner, flags); + Utils.allocate(this.panel._leftCorner.actor, childBoxLeftCorner, flags); + Utils.allocate(this.panel._rightCorner.actor, childBoxRightCorner, flags); - if (this.cornerSize != currentCornerSize) { - this._setPanelClip(); - } + if (this.cornerSize != currentCornerSize) { + this._setPanelClip(); } } } diff --git a/taskbar.js b/taskbar.js index 9237ae3..9cee373 100644 --- a/taskbar.js +++ b/taskbar.js @@ -401,6 +401,11 @@ var Taskbar = class { } destroy() { + if (this._waitIdleId) { + GLib.source_remove(this._waitIdleId); + this._waitIdleId = 0; + } + this.iconAnimator.destroy(); this._signalsHandler.destroy(); @@ -542,8 +547,11 @@ var Taskbar = class { this.fullScrollView = 0; } - if (initial != this.fullScrollView) { - this._getAppIcons().forEach(a => a.updateTitleStyle()); + if (initial != this.fullScrollView && !this._waitIdleId) { + this._waitIdleId = Mainloop.idle_add(() => { + this._getAppIcons().forEach(a => a.updateTitleStyle()) + this._waitIdleId = 0 + }); } } }