diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-10-07 22:33:43 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-10-07 22:33:43 +0000 |
commit | a2813e1772a3b222a0bae66af6df5ddf8ae434b3 (patch) | |
tree | 082c500a109acffa9c9aa9edfaf68ea503407975 /gtk/gtkhpaned.c | |
parent | 123d1fb81cdd03b601ea162bdcf7e41eeff0a0e3 (diff) | |
download | gdk-pixbuf-a2813e1772a3b222a0bae66af6df5ddf8ae434b3.tar.gz |
Allow the slider to be set all the way to the edge, and if that happens,
Mon Oct 7 18:21:39 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c gtk/gtkpaned.c: Allow the slider
to be set all the way to the edge, and if that happens,
use gtk_widget_set_child_visible() to hide the
appropriate child. (#72784, request from Darin Adler)
Diffstat (limited to 'gtk/gtkhpaned.c')
-rw-r--r-- | gtk/gtkhpaned.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 4d35345a5..27eb316e0 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -182,13 +182,13 @@ gtk_hpaned_size_allocate (GtkWidget *widget, } child1_allocation.height = child2_allocation.height = MAX (1, (gint) allocation->height - border_width * 2); - child1_allocation.width = paned->child1_size; + child1_allocation.width = MAX (1, paned->child1_size); child1_allocation.x = widget->allocation.x + border_width; child1_allocation.y = child2_allocation.y = widget->allocation.y + border_width; - child2_allocation.x = child1_allocation.x + child1_allocation.width + paned->handle_pos.width; + child2_allocation.x = child1_allocation.x + paned->child1_size + paned->handle_pos.width; child2_allocation.width = MAX (1, widget->allocation.x + widget->allocation.width - child2_allocation.x - border_width); - + /* Now allocate the childen, making sure, when resizing not to * overlap the windows */ @@ -211,6 +211,9 @@ gtk_hpaned_size_allocate (GtkWidget *widget, if (GTK_WIDGET_REALIZED (widget)) gdk_window_hide (paned->handle); + gtk_widget_set_child_visible (paned->child1, TRUE); + gtk_widget_set_child_visible (paned->child2, TRUE); + child_allocation.x = widget->allocation.x + border_width; child_allocation.y = widget->allocation.y + border_width; child_allocation.width = MAX (1, allocation->width - 2 * border_width); |