panel: Reposition corners on changes to the monitor layout
When the monitor layout changes, the panel might have been moved to another monitor, in which case the rounded corners need to be repositioned. https://bugzilla.gnome.org/show_bug.cgi?id=643064
This commit is contained in:
parent
172d68d1fe
commit
ff171e3651
@ -560,7 +560,7 @@ PanelCorner.prototype = {
|
||||
this._side = side;
|
||||
this.actor = new St.DrawingArea({ style_class: 'panel-corner' });
|
||||
this.actor.connect('repaint', Lang.bind(this, this._repaint));
|
||||
this.actor.connect('style-changed', Lang.bind(this, this._reposition));
|
||||
this.actor.connect('style-changed', Lang.bind(this, this.relayout));
|
||||
},
|
||||
|
||||
_repaint: function() {
|
||||
@ -623,7 +623,7 @@ PanelCorner.prototype = {
|
||||
cr.restore();
|
||||
},
|
||||
|
||||
_reposition: function() {
|
||||
relayout: function() {
|
||||
let node = this.actor.get_theme_node();
|
||||
|
||||
let cornerRadius = node.get_length("-panel-corner-radius");
|
||||
@ -1063,6 +1063,9 @@ Panel.prototype = {
|
||||
|
||||
this.actor.set_position(primary.x, primary.y);
|
||||
this.actor.set_size(primary.width, PANEL_HEIGHT);
|
||||
|
||||
this._leftCorner.relayout();
|
||||
this._rightCorner.relayout();
|
||||
},
|
||||
|
||||
_onTrayIconAdded: function(o, icon, role) {
|
||||
|
Loading…
Reference in New Issue
Block a user