[gnome-shell] Arrow: compute a paint volume that accounts for the shadow



commit 408211ba73f6ce487b8556cfb655c642c4474fcf
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Jun 22 21:12:41 2016 +0200

    Arrow: compute a paint volume that accounts for the shadow
    
    Otherwise the shadow gets clipped to the actor's allocation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767954

 js/ui/screenShield.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 982d9ba..1c1fad9 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -377,6 +377,22 @@ const Arrow = new Lang.Class({
         cr.$dispose();
     },
 
+    vfunc_get_paint_volume: function(volume) {
+        if (!this.parent(volume))
+            return false;
+
+        if (!this._shadow)
+            return true;
+
+        let shadow_box = new Clutter.ActorBox();
+        this._shadow.get_box(this._drawingArea.get_allocation_box(), shadow_box);
+
+        volume.set_width(Math.max(shadow_box.x2 - shadow_box.x1, volume.get_width()));
+        volume.set_height(Math.max(shadow_box.y2 - shadow_box.y1, volume.get_height()));
+
+        return true;
+    },
+
     vfunc_style_changed: function() {
         let node = this.get_theme_node();
         this._shadow = node.get_shadow('-arrow-shadow');


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