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:
@@ -1232,22 +1232,9 @@ gtk_wx_cell_renderer_render (GtkCellRenderer *renderer,
|
|||||||
cell->expose_area = expose_area;
|
cell->expose_area = expose_area;
|
||||||
cell->flags = flags;
|
cell->flags = flags;
|
||||||
|
|
||||||
GdkRectangle rect;
|
wxRect rect(wxRectFromGDKRect(cell_area));
|
||||||
gtk_wx_cell_renderer_get_size (renderer, widget, cell_area,
|
rect = rect.Deflate(renderer->xpad, renderer->ypad);
|
||||||
&rect.x,
|
|
||||||
&rect.y,
|
|
||||||
&rect.width,
|
|
||||||
&rect.height);
|
|
||||||
|
|
||||||
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();
|
wxWindowDC* dc = (wxWindowDC*) cell->GetDC();
|
||||||
wxWindowDCImpl *impl = (wxWindowDCImpl *) dc->GetImpl();
|
wxWindowDCImpl *impl = (wxWindowDCImpl *) dc->GetImpl();
|
||||||
|
|
||||||
@@ -1271,8 +1258,7 @@ gtk_wx_cell_renderer_render (GtkCellRenderer *renderer,
|
|||||||
state |= wxDATAVIEW_CELL_INSENSITIVE;
|
state |= wxDATAVIEW_CELL_INSENSITIVE;
|
||||||
if (flags & GTK_CELL_RENDERER_FOCUSED)
|
if (flags & GTK_CELL_RENDERER_FOCUSED)
|
||||||
state |= wxDATAVIEW_CELL_FOCUSED;
|
state |= wxDATAVIEW_CELL_FOCUSED;
|
||||||
cell->WXCallRender( renderrect, dc, state );
|
cell->WXCallRender( rect, dc, state );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Reference in New Issue
Block a user