Pass full cell rectangle to WXCallRender().
There is no need to ask the item for its size in gtk_wx_cell_renderer_render() as WXCallRender() will already do it (correctly, accounting for badly implemented GetSize() unlike this version) internally on its own. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9d02e49483
commit
a923d77fc5
@ -1232,22 +1232,9 @@ gtk_wx_cell_renderer_render (GtkCellRenderer *renderer,
|
||||
cell->expose_area = expose_area;
|
||||
cell->flags = flags;
|
||||
|
||||
GdkRectangle rect;
|
||||
gtk_wx_cell_renderer_get_size (renderer, widget, cell_area,
|
||||
&rect.x,
|
||||
&rect.y,
|
||||
&rect.width,
|
||||
&rect.height);
|
||||
wxRect rect(wxRectFromGDKRect(cell_area));
|
||||
rect = rect.Deflate(renderer->xpad, renderer->ypad);
|
||||
|
||||
rect.x += cell_area->x;
|
||||
rect.y += cell_area->y;
|
||||
rect.width -= renderer->xpad * 2;
|
||||
rect.height -= renderer->ypad * 2;
|
||||
|
||||
GdkRectangle dummy;
|
||||
if (gdk_rectangle_intersect (expose_area, &rect, &dummy))
|
||||
{
|
||||
wxRect renderrect(wxRectFromGDKRect(&rect));
|
||||
wxWindowDC* dc = (wxWindowDC*) cell->GetDC();
|
||||
wxWindowDCImpl *impl = (wxWindowDCImpl *) dc->GetImpl();
|
||||
|
||||
@ -1271,8 +1258,7 @@ gtk_wx_cell_renderer_render (GtkCellRenderer *renderer,
|
||||
state |= wxDATAVIEW_CELL_INSENSITIVE;
|
||||
if (flags & GTK_CELL_RENDERER_FOCUSED)
|
||||
state |= wxDATAVIEW_CELL_FOCUSED;
|
||||
cell->WXCallRender( renderrect, dc, state );
|
||||
}
|
||||
cell->WXCallRender( rect, dc, state );
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user