aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-paned/e-paned.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-21 13:34:59 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-21 13:34:59 +0800
commit2764b49bc7bfb505480352a7864d3c4ac34c54a0 (patch)
tree64a244c831f7837419755fc01577b2bbc0532ca0 /widgets/e-paned/e-paned.c
parent5b04deeae30fd6161ff79f1a8235f72c69676beb (diff)
downloadgsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar.gz
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar.bz2
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar.lz
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar.xz
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.tar.zst
gsoc2013-evolution-2764b49bc7bfb505480352a7864d3c4ac34c54a0.zip
Added code to make handle position persist across resizes.
2000-08-21 Christopher James Lahey <clahey@helixcode.com> * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-paned.c, widgets/e-paned/e-paned.h, widgets/e-paned/e-vpaned.c: Added code to make handle position persist across resizes. svn path=/trunk/; revision=4898
Diffstat (limited to 'widgets/e-paned/e-paned.c')
-rw-r--r--widgets/e-paned/e-paned.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/widgets/e-paned/e-paned.c b/widgets/e-paned/e-paned.c
index ae68e10082..f02d4389a0 100644
--- a/widgets/e-paned/e-paned.c
+++ b/widgets/e-paned/e-paned.c
@@ -158,6 +158,7 @@ e_paned_init (EPaned *paned)
paned->handle_ypos = -1;
paned->old_child1_size = 0;
+ paned->child1_size = 0;
paned->quantum = 1;
}
@@ -518,7 +519,7 @@ e_paned_get_position (EPaned *paned)
g_return_val_if_fail (paned != NULL, 0);
g_return_val_if_fail (E_IS_PANED (paned), 0);
- return paned->child1_size;
+ return paned->child1_real_size;
}
void
@@ -597,14 +598,14 @@ e_paned_compute_position(EPaned *paned,
{
if (paned->child1_resize && !paned->child2_resize)
paned->child1_size += allocation - paned->last_allocation;
- else if (!(!paned->child1_resize && paned->child2_resize))
+ else if (paned->child1_resize && paned->child2_resize)
paned->child1_size = allocation * ((gdouble) paned->child1_size / (paned->last_allocation));
}
}
- paned->child1_size = CLAMP (paned->child1_size,
- paned->min_position,
- paned->max_position);
+ paned->child1_real_size = CLAMP (paned->child1_size,
+ paned->min_position,
+ paned->max_position);
paned->last_allocation = allocation;
}