Workaround panel button padding not updating on 3.34

This commit is contained in:
Charles Gagnon
2019-09-24 18:18:16 -04:00
parent 3bb4a1b4b4
commit d372e6abd3

View File

@@ -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());
}
}
});