[Xfce4-commits] <xfce4-panel:devel> Small readability improvement in the tasklist.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:32:17 CEST 2009
Updating branch refs/heads/devel
to 159f88a23589f8888d0a7403e5ba5171b197ba3e (commit)
from 705c1051000a51d4eed643280da80252a15a0dce (commit)
commit 159f88a23589f8888d0a7403e5ba5171b197ba3e
Author: Nick Schermer <nick at xfce.org>
Date: Mon May 18 19:57:22 2009 +0200
Small readability improvement in the tasklist.
plugins/tasklist/tasklist-widget.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 988b478..0b888bc 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -586,15 +586,18 @@ xfce_tasklist_size_allocate (GtkWidget *widget,
/* calculate the child position */
if (tasklist->horizontal)
{
- child_allocation.x = allocation->x + (i / rows) * width;
- child_allocation.y = allocation->y + (i % rows) * height;
+ child_allocation.x = (i / rows) * width;
+ child_allocation.y = (i % rows) * height;
}
else
{
- child_allocation.x = allocation->x + (i % rows) * width;
- child_allocation.y = allocation->y + (i / rows) * height;
+ child_allocation.x = (i % rows) * width;
+ child_allocation.y = (i / rows) * height;
}
+ child_allocation.x += allocation->x;
+ child_allocation.y += allocation->y;
+
/* allocate the child */
gtk_widget_size_allocate (child->button, &child_allocation);
@@ -1595,7 +1598,7 @@ xfce_tasklist_set_show_labels (XfceTasklist *tasklist,
FALSE, FALSE, 0,
GTK_PACK_START);
}
- else /* XFCE_TASKLIST_STYLE_ICONBOX */
+ else
{
gtk_widget_hide (child->label);
gtk_box_set_child_packing (GTK_BOX (child->box),
More information about the Xfce4-commits
mailing list