diff --git a/appIcons.js b/appIcons.js index 088cf68..a37d259 100644 --- a/appIcons.js +++ b/appIcons.js @@ -59,10 +59,12 @@ const T4 = 'overviewWindowDragEndTimeout'; const T5 = 'switchWorkspaceTimeout'; const T6 = 'displayProperIndicatorTimeout'; +//right padding defined for .overview-label in stylesheet.css +const TITLE_RIGHT_PADDING = 8; + let LABEL_GAP = 5; let MAX_INDICATORS = 4; var DEFAULT_PADDING_SIZE = 4; -var titleRightPadding = -1; let DOT_STYLE = { DOTS: "DOTS", @@ -481,7 +483,7 @@ var taskbarAppIcon = Utils.defineClass({ this._windowTitle.clutter_text.natural_width = useFixedWidth ? maxLabelWidth : 0; this._windowTitle.clutter_text.natural_width_set = useFixedWidth; - this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + this._getWindowTitleRightPadding()); + this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + TITLE_RIGHT_PADDING); this._windowTitle.set_style('font-size: ' + Me.settings.get_int('group-apps-label-font-size') + 'px;' + 'font-weight: ' + fontWeight + ';' + @@ -490,15 +492,6 @@ var taskbarAppIcon = Utils.defineClass({ } }, - _getWindowTitleRightPadding: function() { - if (this._windowTitle && this._windowTitle.mapped && titleRightPadding < 0) { - //get the right padding defined for .overview-label in stylesheet.css - titleRightPadding = this._windowTitle.get_theme_node().get_padding(St.Side.RIGHT); - } - - return titleRightPadding; - }, - _updateWindowTitle: function() { if (this._windowTitle.text != this.window.title) { this._windowTitle.text = (this.window.title ? this.window.title : this.app.get_name()).replace(/\r?\n|\r/g, '').trim(); diff --git a/stylesheet.css b/stylesheet.css index 4a7a6b6..37bcd8f 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -34,6 +34,7 @@ } #dashtopanelScrollview .app-well-app .overview-label { + /* must match TITLE_RIGHT_PADDING in apppicons.js */ padding-right: 8px; }