Commit 002ceac8 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Reduce rounding error. (#154658, John Cupitt)

2004-10-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_compute_position): Reduce rounding
	error.  (#154658, John Cupitt)
parent cd79561f
2004-10-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpaned.c (gtk_paned_compute_position): Reduce rounding
error. (#154658, John Cupitt)
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Clear
the iter instead of returning it unmodified. (#154186, Jonathan Blandford)
......
2004-10-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpaned.c (gtk_paned_compute_position): Reduce rounding
error. (#154658, John Cupitt)
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Clear
the iter instead of returning it unmodified. (#154186, Jonathan Blandford)
......
2004-10-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpaned.c (gtk_paned_compute_position): Reduce rounding
error. (#154658, John Cupitt)
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Clear
the iter instead of returning it unmodified. (#154186, Jonathan Blandford)
......
2004-10-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpaned.c (gtk_paned_compute_position): Reduce rounding
error. (#154658, John Cupitt)
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Clear
the iter instead of returning it unmodified. (#154186, Jonathan Blandford)
......
......@@ -1180,9 +1180,9 @@ gtk_paned_compute_position (GtkPaned *paned,
else if (!paned->child1_resize && paned->child2_resize)
paned->child1_size = child1_req;
else if (child1_req + child2_req != 0)
paned->child1_size = allocation * ((gdouble)child1_req / (child1_req + child2_req));
paned->child1_size = allocation * ((gdouble)child1_req / (child1_req + child2_req)) + 0.5;
else
paned->child1_size = allocation * 0.5;
paned->child1_size = allocation * 0.5 + 0.5;
}
else
{
......@@ -1194,7 +1194,7 @@ gtk_paned_compute_position (GtkPaned *paned,
if (paned->child1_resize && !paned->child2_resize)
paned->child1_size += allocation - paned->last_allocation;
else if (!(!paned->child1_resize && paned->child2_resize))
paned->child1_size = allocation * ((gdouble) paned->child1_size / (paned->last_allocation));
paned->child1_size = allocation * ((gdouble) paned->child1_size / (paned->last_allocation)) + 0.5;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment