From 14f4aec7b07da83fc09c60a2f171d110b4f7fe1a Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 30 Aug 2000 23:23:47 +0000 Subject: Do not flicker while trying to resize a quantized pane. 2000-08-30 Federico Mena Quintero * e-paned/e-hpaned.c (e_hpaned_motion): Do not flicker while trying to resize a quantized pane. * e-paned/e-vpaned.c (e_vpaned_motion): Likewise. svn path=/trunk/; revision=5125 --- widgets/ChangeLog | 7 +++++++ widgets/e-paned/e-hpaned.c | 16 +++++++++++++--- widgets/e-paned/e-vpaned.c | 16 +++++++++++++--- 3 files changed, 33 insertions(+), 6 deletions(-) (limited to 'widgets') diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 8aa996141b..09425c22f6 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,10 @@ +2000-08-30 Federico Mena Quintero + + * e-paned/e-hpaned.c (e_hpaned_motion): Do not flicker while + trying to resize a quantized pane. + + * e-paned/e-vpaned.c (e_vpaned_motion): Likewise. + 2000-08-30 Federico Mena Quintero * widgets/e-paned/e-vpaned.c (e_vpaned_size_allocate): Ensure that diff --git a/widgets/e-paned/e-hpaned.c b/widgets/e-paned/e-hpaned.c index 5f2e451447..e003d5a7eb 100644 --- a/widgets/e-paned/e-hpaned.c +++ b/widgets/e-paned/e-hpaned.c @@ -423,10 +423,20 @@ e_hpaned_motion (GtkWidget *widget, if (paned->in_drag) { - gint size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2; - + gint size; + gint new_child1_size; + + size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2; + + new_child1_size = CLAMP (e_paned_quantized_size(paned, size), + paned->min_position, + paned->max_position); + + if (new_child1_size == paned->child1_size) + return TRUE; + e_hpaned_xor_line (paned); - paned->child1_size = CLAMP (e_paned_quantized_size(paned, size), paned->min_position, paned->max_position); + paned->child1_size = new_child1_size; paned->child1_real_size = paned->child1_size; e_hpaned_xor_line (paned); } diff --git a/widgets/e-paned/e-vpaned.c b/widgets/e-paned/e-vpaned.c index c13ed2f549..be9e22a877 100644 --- a/widgets/e-paned/e-vpaned.c +++ b/widgets/e-paned/e-vpaned.c @@ -422,10 +422,20 @@ e_vpaned_motion (GtkWidget *widget, if (paned->in_drag) { - gint size = y - GTK_CONTAINER(paned)->border_width - paned->handle_size / 2; - + gint size; + gint new_child1_size; + + size = y - GTK_CONTAINER(paned)->border_width - paned->handle_size / 2; + + new_child1_size = CLAMP (e_paned_quantized_size(paned, size), + paned->min_position, + paned->max_position); + + if (new_child1_size == paned->child1_size) + return TRUE; + e_vpaned_xor_line (paned); - paned->child1_size = CLAMP (e_paned_quantized_size(paned, size), paned->min_position, paned->max_position); + paned->child1_size = new_child1_size; paned->child1_real_size = paned->child1_size; e_vpaned_xor_line(paned); } -- cgit v1.2.3