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 | |
parent | 123d1fb81cdd03b601ea162bdcf7e41eeff0a0e3 (diff) | |
download | gtk+-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)
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 10 | ||||
-rw-r--r-- | gtk/gtkhpaned.c | 9 | ||||
-rw-r--r-- | gtk/gtkpaned.c | 5 | ||||
-rw-r--r-- | gtk/gtkvpaned.c | 7 |
9 files changed, 75 insertions, 6 deletions
@@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 46b7f4832b..f1c85732b9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 46b7f4832b..f1c85732b9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 46b7f4832b..f1c85732b9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 46b7f4832b..f1c85732b9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 46b7f4832b..f1c85732b9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +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) + Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_drag_begin): Use @@ -13,6 +20,9 @@ Mon Oct 7 16:28:11 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (palette_release): Set the color from the palette on release, not press. + * gtk/gtkcolorsel.c (gtk_color_selection_show_all): + Override to simple call show(). (#74173) + * tests/testgtk.c (create_color_selection): Use gtk_widget_show_all() diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 4d35345a5b..27eb316e07 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); diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index cb078fb3ed..325128e81c 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -922,7 +922,7 @@ gtk_paned_compute_position (GtkPaned *paned, if (!paned->position_set) { if (paned->child1_resize && !paned->child2_resize) - paned->child1_size = MAX (1, allocation - child2_req); + paned->child1_size = MAX (0, allocation - child2_req); else if (!paned->child1_resize && paned->child2_resize) paned->child1_size = child1_req; else if (child1_req + child2_req != 0) @@ -948,6 +948,9 @@ gtk_paned_compute_position (GtkPaned *paned, paned->min_position, paned->max_position); + gtk_widget_set_child_visible (paned->child1, paned->child1_size != 0); + gtk_widget_set_child_visible (paned->child2, paned->child1_size != allocation); + if (paned->child1_size != old_position) g_object_notify (G_OBJECT (paned), "position"); diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c index 47d12ddc2f..9024e64494 100644 --- a/gtk/gtkvpaned.c +++ b/gtk/gtkvpaned.c @@ -182,11 +182,11 @@ gtk_vpaned_size_allocate (GtkWidget *widget, } child1_allocation.width = child2_allocation.width = MAX (1, (gint) allocation->width - border_width * 2); - child1_allocation.height = paned->child1_size; + child1_allocation.height = MAX (1, paned->child1_size); child1_allocation.x = child2_allocation.x = widget->allocation.x + border_width; child1_allocation.y = widget->allocation.y + border_width; - child2_allocation.y = child1_allocation.y + child1_allocation.height + paned->handle_pos.height; + child2_allocation.y = child1_allocation.y + paned->child1_size + paned->handle_pos.height; child2_allocation.height = MAX (1, widget->allocation.y + widget->allocation.height - child2_allocation.y - border_width); /* Now allocate the childen, making sure, when resizing not to @@ -211,6 +211,9 @@ gtk_vpaned_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); |