From 9652958f5440965146919f6a99fbd17ac23e4a3d Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sat, 6 Jul 2024 02:39:03 +0300 Subject: [PATCH] wxQt: translate QPainter into window client area. Otherwise, if a menu bar exists, painting is done at incorrect offset. Patch by AliKet. Closes #24629. --- src/qt/dcclient.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/dcclient.cpp b/src/qt/dcclient.cpp index 9c1d987fbeb3..13310331b567 100644 --- a/src/qt/dcclient.cpp +++ b/src/qt/dcclient.cpp @@ -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()) ); }