[libwnck] WnckTaskList: correctly set requisition parameters for Vertical Mode



commit 5db5b6be8b26800687350c4dc17045280e20aeb0
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Sat Jul 20 01:17:15 2013 +0200

    WnckTaskList: correctly set requisition parameters for Vertical Mode

 libwnck/tasklist.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 6f42871..f61d334 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -1310,7 +1310,7 @@ wnck_tasklist_size_request  (GtkWidget      *widget,
                   /* Overlaps old range */
                   g_assert (array->len > 0);
                   lowest_range = n_rows * grouping_limit;
-                  g_array_index(array, int, array->len-1) = lowest_range;
+                  g_array_index (array, int, array->len-1) = lowest_range;
                 }
               else
                 {
@@ -1344,18 +1344,17 @@ wnck_tasklist_size_request  (GtkWidget      *widget,
     g_free (tasklist->priv->size_hints);
 
   tasklist->priv->size_hints_len = array->len;
-
   tasklist->priv->size_hints = (int *)g_array_free (array, FALSE);
 
-  if (tasklist->priv->orientation == GTK_ORIENTATION_VERTICAL)
+  if (tasklist->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
-      requisition->width  = n_cols * tasklist->priv->max_button_width;
-      requisition->height = n_rows * tasklist->priv->max_button_height;
+      requisition->width = tasklist->priv->size_hints[0];
+      requisition->height = fake_allocation.height;
     }
   else
     {
-      requisition->width = tasklist->priv->size_hints[0];
-      requisition->height = fake_allocation.height;
+      requisition->width = fake_allocation.width;
+      requisition->height = tasklist->priv->size_hints[0];
     }
 }
 


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