This is an automated email from the git hooks/post-receive script. nomad pushed a commit to annotated tag 0.2.1 in repository apps/xfdashboard.
commit f97c495969e00cd24a518ed60178f5668b222d16 Author: Stephan Haller <[email protected]> Date: Fri Jun 27 13:41:11 2014 +0200 Optimize allocation function in XfdashboardDynamicTableLayout --- src/dynamic-table-layout.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/dynamic-table-layout.c b/src/dynamic-table-layout.c index ba5963f..5d87a30 100644 --- a/src/dynamic-table-layout.c +++ b/src/dynamic-table-layout.c @@ -366,26 +366,13 @@ static void _xfdashboard_dynamic_table_layout_allocate(ClutterLayoutManager *sel column=floor(i % priv->columns); row=floor(i / priv->columns); - /* Get outer allocation for child */ - left=g_array_index(priv->columnCoords, gfloat, column); - right=g_array_index(priv->columnCoords, gfloat, column+1)-priv->columnSpacing; - top=g_array_index(priv->rowCoords, gfloat, row); - bottom=g_array_index(priv->rowCoords, gfloat, row+1)-priv->rowSpacing; + /* Get available allocation space for child*/ + childAllocation.x1=g_array_index(priv->columnCoords, gfloat, column); + childAllocation.x2=g_array_index(priv->columnCoords, gfloat, column+1)-priv->columnSpacing; + childAllocation.y1=g_array_index(priv->rowCoords, gfloat, row); + childAllocation.y2=g_array_index(priv->rowCoords, gfloat, row+1)-priv->rowSpacing; - /* Get inner allocation for child */ - clutter_actor_get_preferred_size(child, NULL, NULL, &childWidth, &childHeight); - - left+=(right-left-childWidth)/2.0f; - right=left+childWidth; - - top+=(bottom-top-childHeight)/2.0f; - bottom=top+childHeight; - - /* Set new allocation of child */ - childAllocation.x1=floor(left); - childAllocation.y1=floor(top); - childAllocation.x2=floor(right); - childAllocation.y2=floor(bottom); + /* Set allocation at child */ clutter_actor_allocate(child, &childAllocation, inFlags); /* Increase counter for visible children */ -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
