gtk/gtkcheckbutton.c gtk/gtkdnd.c gtk/gtkentry.c gtk/gtkmenu.c

2007-01-18  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcheckbutton.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkmenu.c
	* gtk/gtktreeview.c
	* gtk/gtkviewport.c: pass more clip rectangles to gtk_paint_foo()
	functions. Based on a patch from maemo-gtk (bug #398023).


svn path=/trunk/; revision=17183
This commit is contained in:
Michael Natterer
2007-01-18 17:30:10 +00:00
committed by Michael Natterer
parent 0ca6367b93
commit 42debff10d
7 changed files with 29 additions and 17 deletions

View File

@ -1,3 +1,13 @@
2007-01-18 Michael Natterer <mitch@imendio.com>
* gtk/gtkcheckbutton.c
* gtk/gtkdnd.c
* gtk/gtkentry.c
* gtk/gtkmenu.c
* gtk/gtktreeview.c
* gtk/gtkviewport.c: pass more clip rectangles to gtk_paint_foo()
functions. Based on a patch from maemo-gtk (bug #398023).
2007-01-17 Tor Lillqvist <tml@novell.com>
* gtk-zip.sh.in: Include also the COPYING file.

View File

@ -155,14 +155,14 @@ gtk_check_button_paint (GtkWidget *widget,
if (interior_focus && child && GTK_WIDGET_VISIBLE (child))
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
NULL, widget, "checkbutton",
area, widget, "checkbutton",
child->allocation.x - focus_width - focus_pad,
child->allocation.y - focus_width - focus_pad,
child->allocation.width + 2 * (focus_width + focus_pad),
child->allocation.height + 2 * (focus_width + focus_pad));
else
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
NULL, widget, "checkbutton",
area, widget, "checkbutton",
border_width + widget->allocation.x,
border_width + widget->allocation.y,
widget->allocation.width - 2 * border_width,

View File

@ -982,7 +982,7 @@ gtk_drag_highlight_expose (GtkWidget *widget,
gtk_paint_shadow (widget->style, widget->window,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
NULL, widget, "dnd",
&event->area, widget, "dnd",
x, y, width, height);
cr = gdk_cairo_create (widget->window);

View File

@ -159,7 +159,8 @@ static void gtk_entry_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_entry_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_entry_draw_frame (GtkWidget *widget);
static void gtk_entry_draw_frame (GtkWidget *widget,
GdkRectangle *area);
static gint gtk_entry_expose (GtkWidget *widget,
GdkEventExpose *event);
static gint gtk_entry_button_press (GtkWidget *widget,
@ -1505,7 +1506,8 @@ gtk_entry_size_allocate (GtkWidget *widget,
}
static void
gtk_entry_draw_frame (GtkWidget *widget)
gtk_entry_draw_frame (GtkWidget *widget,
GdkRectangle *area)
{
gint x = 0, y = 0;
gint width, height;
@ -1529,7 +1531,7 @@ gtk_entry_draw_frame (GtkWidget *widget)
gtk_paint_shadow (widget->style, widget->window,
GTK_STATE_NORMAL, GTK_SHADOW_IN,
NULL, widget, "entry",
area, widget, "entry",
x, y, width, height);
if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
@ -1540,7 +1542,7 @@ gtk_entry_draw_frame (GtkWidget *widget)
height += 2 * focus_width;
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
NULL, widget, "entry",
area, widget, "entry",
0, 0, width, height);
}
}
@ -1552,7 +1554,7 @@ gtk_entry_expose (GtkWidget *widget,
GtkEntry *entry = GTK_ENTRY (widget);
if (widget->window == event->window)
gtk_entry_draw_frame (widget);
gtk_entry_draw_frame (widget, &event->area);
else if (entry->text_area == event->window)
{
gint area_width, area_height;
@ -1561,7 +1563,7 @@ gtk_entry_expose (GtkWidget *widget,
gtk_paint_flat_box (widget->style, entry->text_area,
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
NULL, widget, "entry_bg",
&event->area, widget, "entry_bg",
0, 0, area_width, area_height);
if ((entry->visible || entry->invisible_char != 0) &&

View File

@ -2458,7 +2458,7 @@ gtk_menu_paint (GtkWidget *widget,
widget->window,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
NULL, widget, "menu",
&event->area, widget, "menu",
0, 0, -1, -1);
if (menu->upper_arrow_visible && !menu->tearoff_active)
@ -2477,7 +2477,7 @@ gtk_menu_paint (GtkWidget *widget,
widget->window,
priv->upper_arrow_state,
GTK_SHADOW_OUT,
NULL, widget, "menu_scroll_arrow_up",
&event->area, widget, "menu_scroll_arrow_up",
GTK_ARROW_UP,
TRUE,
(width - arrow_size ) / 2,
@ -2501,7 +2501,7 @@ gtk_menu_paint (GtkWidget *widget,
widget->window,
priv->lower_arrow_state,
GTK_SHADOW_OUT,
NULL, widget, "menu_scroll_arrow_down",
&event->area, widget, "menu_scroll_arrow_down",
GTK_ARROW_DOWN,
TRUE,
(width - arrow_size) / 2,

View File

@ -4628,7 +4628,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
gtk_paint_focus (widget->style,
tree_view->priv->bin_window,
GTK_WIDGET_STATE (widget),
NULL,
&event->area,
widget,
(is_first
? (is_last ? "treeview-drop-indicator" : "treeview-drop-indicator-left" )
@ -4641,7 +4641,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
gtk_paint_focus (widget->style,
tree_view->priv->bin_window,
GTK_WIDGET_STATE (widget),
NULL,
&event->area,
widget,
"treeview-drop-indicator",
0, BACKGROUND_FIRST_PIXEL (tree_view, tree, node)
@ -4695,7 +4695,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
gtk_paint_focus (widget->style,
tree_view->priv->bin_window,
focus_rect_state,
NULL,
&event->area,
widget,
(is_first
? (is_last ? "treeview" : "treeview-left" )
@ -4706,7 +4706,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
gtk_paint_focus (widget->style,
tree_view->priv->bin_window,
focus_rect_state,
NULL,
&event->area,
widget,
"treeview",
0, tmp_y,

View File

@ -656,7 +656,7 @@ gtk_viewport_paint (GtkWidget *widget,
gtk_paint_shadow (widget->style, widget->window,
GTK_STATE_NORMAL, viewport->shadow_type,
NULL, widget, "viewport",
area, widget, "viewport",
0, 0, -1, -1);
}
}