[gnome-shell] legacyTray: Decrease visible width when concealed



commit da3e5f9746180e80e127603757487cceba05eb5b
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Apr 14 18:08:39 2015 +0200

    legacyTray: Decrease visible width when concealed
    
    Now that the tray is shown temporarily when a tray icon appears,
    we can decrease its visible width when concealed to interfere less
    with window content without hurting discoverability.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746787

 js/ui/legacyTray.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/legacyTray.js b/js/ui/legacyTray.js
index b97fd48..39b3dac 100644
--- a/js/ui/legacyTray.js
+++ b/js/ui/legacyTray.js
@@ -29,7 +29,7 @@ const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
 };
 
 // Offset of the original position from the bottom-right corner
-const CONCEALED_VISIBLE_FRACTION = 0.2;
+const CONCEALED_WIDTH = 3;
 const REVEAL_ANIMATION_TIME = 0.2;
 const TEMP_REVEAL_TIME = 2;
 
@@ -254,9 +254,10 @@ const LegacyTray = new Lang.Class({
             let [, boxWidth] = this._box.get_preferred_width(-1);
             let [, handleWidth] = this._revealHandle.get_preferred_width(-1);
 
-            targetSlide = handleWidth / boxWidth;
-            if (!this._revealHandle.hover)
-                targetSlide *= CONCEALED_VISIBLE_FRACTION;
+            if (this._revealHandle.hover)
+                targetSlide = handleWidth / boxWidth;
+            else
+                targetSlide = CONCEALED_WIDTH / boxWidth;
         }
 
         if (this.actor.visible) {


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