[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-length-adjust> itembar: moving overflowing items off-screen.

Andrzej noreply at xfce.org
Mon Dec 19 18:18:06 CET 2011


Updating branch refs/heads/andrzejr/deskbar-length-adjust
         to 3521e025e80837177d7041a259758f177f52cebb (commit)
       from 85cd9851fe28c2ce2c743b22c79eb7f54ed43478 (commit)

commit 3521e025e80837177d7041a259758f177f52cebb
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Tue Dec 20 02:13:29 2011 +0900

    itembar: moving overflowing items off-screen.

 panel/panel-itembar.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index 34115d4..5e1acdd 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -683,6 +683,16 @@ panel_itembar_size_allocate (GtkWidget     *widget,
             }
         }
 
+      if (IS_HORIZONTAL (itembar))
+        {
+          if (child_alloc.x + child_alloc.width > allocation->x + allocation->width)
+            child_alloc.x += 10000; /* move off-screen */
+        }
+      else
+        {
+          if (child_alloc.y + child_alloc.height > allocation->y + allocation->height)
+            child_alloc.y += 10000; /* move off-screen */
+        }
       gtk_widget_size_allocate (child->widget, &child_alloc);
     }
 }


More information about the Xfce4-commits mailing list