[gnome-shell] Extend (+) button sensitivity to corner of screen, for Fittsability



commit a0df412debabf26860f8b60e23a1a205fd94dd5e
Author: Dan Winship <danw gnome org>
Date:   Wed Sep 9 09:45:13 2009 -0400

    Extend (+) button sensitivity to corner of screen, for Fittsability
    
    https://bugzilla.gnome.org/show_bug.cgi?id=591984

 js/ui/overview.js |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 0d66800..3100893 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -454,14 +454,20 @@ function AddWorkspaceButton(buttonSize, buttonX, buttonY, acceptDropCallback) {
 
 AddWorkspaceButton.prototype = {
     _init: function(buttonSize, buttonX, buttonY, acceptDropCallback) {
-        this.actor = new Clutter.Texture({ x: buttonX,
-                                           y: buttonY,
-                                           width: buttonSize,
-                                           height: buttonSize,
-                                           reactive: true });
-        this._acceptDropCallback = acceptDropCallback;
+        this.actor = new Clutter.Group({ x: buttonX,
+                                         y: buttonY,
+                                         width: global.screen_width - buttonX,
+                                         height: global.screen_height - buttonY,
+                                         reactive: true });
         this.actor._delegate = this;
-        this.actor.set_from_file(global.imagedir + 'add-workspace.svg');
+        this._acceptDropCallback = acceptDropCallback;
+
+        let plus = new Clutter.Texture({ x: 0,
+                                         y: 0,
+                                         width: buttonSize,
+                                         height: buttonSize });
+        plus.set_from_file(global.imagedir + 'add-workspace.svg');
+        this.actor.add_actor(plus);
     },
 
     // Draggable target interface



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