Skip to content

Commit

Permalink
wxQt: translate QPainter of wxClientDC into window client area.
Browse files Browse the repository at this point in the history
Because Qt considers the menubar and toolbar parts of the client area
and we need to apply the same fix done for wxPaintDC in this commit
9652958 (translate QPainter into window client area.) to wxClientDC too.

Closes wxWidgets#24921.
  • Loading branch information
ali kettab authored and vadz committed Oct 28, 2024
1 parent 3572ed5 commit f89cbe6
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 @@ -115,6 +115,8 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *win )
{
if ( m_ok )
{
m_qtPainter->translate( wxQtConvertPoint(win->GetClientAreaOrigin()) );

m_qtPainter->setClipRect( wxQtConvertRect(win->GetClientRect()),
m_clipping ? Qt::IntersectClip : Qt::ReplaceClip );
}
Expand Down

0 comments on commit f89cbe6

Please sign in to comment.