Fix missing allocation.x/y offsets. (#68962, Jacob Berkman)

Thu Jan 17 20:13:14 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
	missing allocation.x/y offsets. (#68962, Jacob
	Berkman)

	* gtk/gtknotebook.c (gtk_notebook_size_allocate):
	Queue a redraw on the entire widget if we hide
	the last page or show the first. (Also #68962)
This commit is contained in:
Owen Taylor 2002-01-18 01:18:05 +00:00 committed by Owen Taylor
parent c6a3df0474
commit a8e2fc3082
8 changed files with 85 additions and 1 deletions

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1,3 +1,13 @@
Thu Jan 17 20:13:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_redraw_tabs): Fix
missing allocation.x/y offsets. (#68962, Jacob
Berkman)
* gtk/gtknotebook.c (gtk_notebook_size_allocate):
Queue a redraw on the entire widget if we hide
the last page or show the first. (Also #68962)
2002-01-17 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change

View File

@ -1158,6 +1158,7 @@ gtk_notebook_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
gint vis_pages = 0;
widget->allocation = *allocation;
if (GTK_WIDGET_REALIZED (widget))
@ -1220,11 +1221,21 @@ gtk_notebook_size_allocate (GtkWidget *widget,
children = children->next;
if (GTK_WIDGET_VISIBLE (page->child))
gtk_widget_size_allocate (page->child, &child_allocation);
{
gtk_widget_size_allocate (page->child, &child_allocation);
vis_pages++;
}
}
gtk_notebook_pages_allocate (notebook);
}
if ((vis_pages != 0) != notebook->have_visible_child)
{
notebook->have_visible_child = (vis_pages != 0);
if (notebook->show_tabs)
gtk_widget_queue_draw (widget);
}
}
static gint
@ -2119,6 +2130,9 @@ gtk_notebook_redraw_tabs (GtkNotebook *notebook)
break;
}
redraw_rect.x += widget->allocation.x;
redraw_rect.y += widget->allocation.y;
gdk_window_invalidate_rect (widget->window, &redraw_rect, TRUE);
}