[Xfce4-commits] <xfce4-panel:master> Fix icon button allocation in tasklist (bug #6269).

Nick Schermer noreply at xfce.org
Wed Mar 3 21:48:01 CET 2010


Updating branch refs/heads/master
         to cffb3690cd8808f628f4b3c95cd379cdebaa11fc (commit)
       from 244766eca38a780062660bdc96179a0f9013bae0 (commit)

commit cffb3690cd8808f628f4b3c95cd379cdebaa11fc
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Mar 3 21:47:07 2010 +0100

    Fix icon button allocation in tasklist (bug #6269).

 plugins/tasklist/tasklist-widget.c |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 01d4866..77ca56e 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -854,19 +854,26 @@ xfce_tasklist_size_allocate (GtkWidget     *widget,
       if (G_LIKELY (child->type == XFCE_TASKLIST_BUTTON_TYPE_WINDOW))
         {
           row = (i % rows);
+
+          x = area_x;
+          y = area.y;
+          h = area.height;
+
           if (row == 0)
             {
-              w = area_width / cols--;
-              if (tasklist->max_button_length > 0
-                  && w > tasklist->max_button_length)
-               w = tasklist->max_button_length;
-              x = area_x;
-
+              if (tasklist->show_labels)
+                {
+                  w = area_width / cols--;
+                  if (tasklist->max_button_length > 0
+                      && w > tasklist->max_button_length)
+                    w = tasklist->max_button_length;
+                }
+              else
+                {
+                  w = h / (rows - row);
+                }
               area_width -= w;
               area_x += w;
-
-              y = area.y;
-              h = area.height;
             }
 
           child_alloc.y = y;



More information about the Xfce4-commits mailing list