Skip to content

Commit

Permalink
wxQt: translate QPainter into window client area.
Browse files Browse the repository at this point in the history
Otherwise, if a menu bar exists, painting is done at incorrect offset.
Patch by AliKet.

Closes wxWidgets#24629.
  • Loading branch information
dsa-t committed Jul 5, 2024
1 parent 40432a2 commit 9652958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qt/dcclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,7 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *win )
{
wxCHECK_RET( m_isWindowPainter || win->QtCanPaintWithoutActivePainter(),
"wxPaintDC can't be created outside wxEVT_PAINT handler" );

m_qtPainter->translate( wxQtConvertPoint(win->GetClientAreaOrigin()) );
}

0 comments on commit 9652958

Please sign in to comment.