[ Tried to commit wrong file last time ]
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktreeitem.c: Add a paint routine, fix up bugs in drawing where if the expose area was contained completely in the right side of the tree the background wasn't redraw, etc.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -1,3 +1,16 @@
|
|||||||
|
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
|
||||||
|
|
||||||
|
* gtk/gtktreeitem.c: Add a paint routine, fix up bugs
|
||||||
|
in drawing where if the expose area was contained
|
||||||
|
completely in the right side of the tree the background
|
||||||
|
wasn't redraw, etc.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
|
||||||
|
in clipping draw regions while propagating them
|
||||||
|
upwards.
|
||||||
|
|
||||||
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
Thu Jan 21 12:20:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
|
||||||
|
|||||||
@ -59,6 +59,8 @@ static void gtk_tree_item_size_allocate (GtkWidget *widget,
|
|||||||
static void gtk_tree_item_draw (GtkWidget *widget,
|
static void gtk_tree_item_draw (GtkWidget *widget,
|
||||||
GdkRectangle *area);
|
GdkRectangle *area);
|
||||||
static void gtk_tree_item_draw_focus (GtkWidget *widget);
|
static void gtk_tree_item_draw_focus (GtkWidget *widget);
|
||||||
|
static void gtk_tree_item_paint (GtkWidget *widget,
|
||||||
|
GdkRectangle *area);
|
||||||
static gint gtk_tree_item_button_press (GtkWidget *widget,
|
static gint gtk_tree_item_button_press (GtkWidget *widget,
|
||||||
GdkEventButton *event);
|
GdkEventButton *event);
|
||||||
static gint gtk_tree_item_expose (GtkWidget *widget,
|
static gint gtk_tree_item_expose (GtkWidget *widget,
|
||||||
@ -625,7 +627,7 @@ gtk_tree_item_draw_lines (GtkWidget *widget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_tree_item_draw (GtkWidget *widget,
|
gtk_tree_item_paint (GtkWidget *widget,
|
||||||
GdkRectangle *area)
|
GdkRectangle *area)
|
||||||
{
|
{
|
||||||
GtkBin *bin;
|
GtkBin *bin;
|
||||||
@ -641,15 +643,6 @@ gtk_tree_item_draw (GtkWidget *widget,
|
|||||||
bin = GTK_BIN (widget);
|
bin = GTK_BIN (widget);
|
||||||
tree_item = GTK_TREE_ITEM(widget);
|
tree_item = GTK_TREE_ITEM(widget);
|
||||||
|
|
||||||
/* draw left size of tree item */
|
|
||||||
item_area.x = 0;
|
|
||||||
item_area.y = 0;
|
|
||||||
item_area.width = (tree_item->pixmaps_box->allocation.width + DEFAULT_DELTA +
|
|
||||||
GTK_TREE (widget->parent)->current_indent + 2);
|
|
||||||
item_area.height = widget->allocation.height;
|
|
||||||
|
|
||||||
if (gdk_rectangle_intersect(&item_area, area, &child_area))
|
|
||||||
{
|
|
||||||
if (widget->state == GTK_STATE_NORMAL)
|
if (widget->state == GTK_STATE_NORMAL)
|
||||||
{
|
{
|
||||||
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
|
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
|
||||||
@ -669,6 +662,17 @@ gtk_tree_item_draw (GtkWidget *widget,
|
|||||||
0, 0, -1, -1);
|
0, 0, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* draw left size of tree item */
|
||||||
|
item_area.x = 0;
|
||||||
|
item_area.y = 0;
|
||||||
|
item_area.width = (tree_item->pixmaps_box->allocation.width + DEFAULT_DELTA +
|
||||||
|
GTK_TREE (widget->parent)->current_indent + 2);
|
||||||
|
item_area.height = widget->allocation.height;
|
||||||
|
|
||||||
|
|
||||||
|
if (gdk_rectangle_intersect(&item_area, area, &child_area))
|
||||||
|
{
|
||||||
|
|
||||||
gtk_tree_item_draw_lines(widget);
|
gtk_tree_item_draw_lines(widget);
|
||||||
|
|
||||||
if (tree_item->pixmaps_box &&
|
if (tree_item->pixmaps_box &&
|
||||||
@ -677,15 +681,6 @@ gtk_tree_item_draw (GtkWidget *widget,
|
|||||||
gtk_widget_draw (tree_item->pixmaps_box, &child_area);
|
gtk_widget_draw (tree_item->pixmaps_box, &child_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw right side */
|
|
||||||
if (gtk_widget_intersect (bin->child, area, &child_area))
|
|
||||||
{
|
|
||||||
if (bin->child &&
|
|
||||||
GTK_WIDGET_VISIBLE(bin->child) &&
|
|
||||||
gtk_widget_intersect (bin->child, area, &child_area))
|
|
||||||
gtk_widget_draw (bin->child, &child_area);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GTK_WIDGET_HAS_FOCUS (widget))
|
if (GTK_WIDGET_HAS_FOCUS (widget))
|
||||||
gtk_paint_focus (widget->style, widget->window,
|
gtk_paint_focus (widget->style, widget->window,
|
||||||
NULL, widget, "treeitem",
|
NULL, widget, "treeitem",
|
||||||
@ -696,6 +691,30 @@ gtk_tree_item_draw (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_tree_item_draw (GtkWidget *widget,
|
||||||
|
GdkRectangle *area)
|
||||||
|
{
|
||||||
|
GtkBin *bin;
|
||||||
|
GdkRectangle child_area;
|
||||||
|
|
||||||
|
g_return_if_fail (widget != NULL);
|
||||||
|
g_return_if_fail (GTK_IS_TREE_ITEM (widget));
|
||||||
|
g_return_if_fail (area != NULL);
|
||||||
|
|
||||||
|
if (GTK_WIDGET_DRAWABLE (widget))
|
||||||
|
{
|
||||||
|
bin = GTK_BIN (widget);
|
||||||
|
|
||||||
|
gtk_tree_item_paint (widget, area);
|
||||||
|
|
||||||
|
if (bin->child &&
|
||||||
|
gtk_widget_intersect (bin->child, area, &child_area))
|
||||||
|
gtk_widget_draw (bin->child, &child_area);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_tree_item_draw_focus (GtkWidget *widget)
|
gtk_tree_item_draw_focus (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@ -726,12 +745,24 @@ static gint
|
|||||||
gtk_tree_item_expose (GtkWidget *widget,
|
gtk_tree_item_expose (GtkWidget *widget,
|
||||||
GdkEventExpose *event)
|
GdkEventExpose *event)
|
||||||
{
|
{
|
||||||
|
GdkEventExpose child_event;
|
||||||
|
GtkBin *bin;
|
||||||
|
|
||||||
g_return_val_if_fail (widget != NULL, FALSE);
|
g_return_val_if_fail (widget != NULL, FALSE);
|
||||||
g_return_val_if_fail (GTK_IS_TREE_ITEM (widget), FALSE);
|
g_return_val_if_fail (GTK_IS_TREE_ITEM (widget), FALSE);
|
||||||
g_return_val_if_fail (event != NULL, FALSE);
|
g_return_val_if_fail (event != NULL, FALSE);
|
||||||
|
|
||||||
if (GTK_WIDGET_DRAWABLE (widget))
|
if (GTK_WIDGET_DRAWABLE (widget))
|
||||||
gtk_tree_item_draw(widget, &event->area);
|
{
|
||||||
|
bin = GTK_BIN (widget);
|
||||||
|
|
||||||
|
gtk_tree_item_paint (widget, &event->area);
|
||||||
|
|
||||||
|
child_event = *event;
|
||||||
|
if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
|
||||||
|
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
|
||||||
|
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user