diff options
Diffstat (limited to 'widgets/e-paned/e-hpaned.c')
-rw-r--r-- | widgets/e-paned/e-hpaned.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/widgets/e-paned/e-hpaned.c b/widgets/e-paned/e-hpaned.c index e7aff16cd9..68fa893210 100644 --- a/widgets/e-paned/e-hpaned.c +++ b/widgets/e-paned/e-hpaned.c @@ -353,6 +353,7 @@ e_hpaned_button_press (GtkWidget *widget, if (!paned->in_drag && event->window == paned->handle && event->button == 1) { + paned->old_child1_size = paned->child1_size; paned->in_drag = TRUE; /* We need a server grab here, not gtk_grab_add(), since * we don't want to pass events on to the widget's children */ @@ -361,7 +362,7 @@ e_hpaned_button_press (GtkWidget *widget, | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); - paned->child1_size += event->x - paned->handle_size / 2; + paned->child1_size = e_paned_quantized_size(paned, paned->child1_size + event->x - paned->handle_size / 2); paned->child1_size = CLAMP (paned->child1_size, 0, widget->allocation.width - paned->handle_size @@ -419,9 +420,9 @@ e_hpaned_motion (GtkWidget *widget, if (paned->in_drag) { gint size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2; - + e_hpaned_xor_line (paned); - paned->child1_size = CLAMP (size, paned->min_position, paned->max_position); + paned->child1_size = CLAMP (e_paned_quantized_size(paned, size), paned->min_position, paned->max_position); e_hpaned_xor_line (paned); } |