[gnome-shell] panel: Reposition corners on changes to the monitor layout



commit ff171e365184f4651ef41d6b9886bf78a5f70ee0
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Feb 23 15:16:18 2011 +0100

    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

 js/ui/panel.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 6fa0347..a38bf9a 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -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) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]