From d372e6abd393b8f1c0e791b043dc2283b41d3ffb Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Tue, 24 Sep 2019 18:18:16 -0400 Subject: [PATCH] Workaround panel button padding not updating on 3.34 --- panelStyle.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/panelStyle.js b/panelStyle.js index d24727d..e9a142b 100644 --- a/panelStyle.js +++ b/panelStyle.js @@ -105,6 +105,7 @@ var dtpPanelStyle = Utils.defineClass({ operation.applyFn = Lang.bind(this, function (actor, operationIdx) { this._overrideStyle(actor, trayPaddingStyleLine, operationIdx); + this._refreshPanelButton(actor); }); this._rightBoxOperations.push(operation); } @@ -304,6 +305,18 @@ var dtpPanelStyle = Utils.defineClass({ delete actor._dtp_original_inline_style; delete actor._dtp_style_overrides; } + + if (actor.has_style_class_name('panel-button')) { + this._refreshPanelButton(actor); + } + }, + + _refreshPanelButton: function(actor) { + if (actor.visible && imports.misc.config.PACKAGE_VERSION >= '3.34.0') { + //force gnome 3.34 to refresh (having problem with the -natural-hpadding) + actor.hide(); + Mainloop.idle_add(() => actor.show()); + } } });