forked from AuroraMiddleware/gtk
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)
This commit is contained in:
parent
123d1fb81c
commit
a2813e1772
10
ChangeLog
10
ChangeLog
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user