diff options
-rw-r--r-- | widgets/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/e-paned/e-hpaned.c | 16 | ||||
-rw-r--r-- | widgets/e-paned/e-vpaned.c | 16 |
3 files changed, 33 insertions, 6 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 8aa996141b..09425c22f6 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,5 +1,12 @@ 2000-08-30 Federico Mena Quintero <federico@helixcode.com> + * 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 <federico@helixcode.com> + * widgets/e-paned/e-vpaned.c (e_vpaned_size_allocate): Ensure that the child's allocation height is >= 1. 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); } |