diff options
author | B. Stack <bgstack15@gmail.com> | 2022-09-07 14:49:22 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-09-07 14:49:22 -0400 |
commit | 47c88c433d17948fab1d8e1d76121a72fe5938cb (patch) | |
tree | fbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /wx+/rtl.h | |
parent | Merge branch 'b11.23' into 'master' (diff) | |
download | FreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.tar.gz FreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.tar.bz2 FreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.zip |
add upstream 11.24
Diffstat (limited to 'wx+/rtl.h')
-rw-r--r-- | wx+/rtl.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -66,22 +66,22 @@ void drawBitmapRtlMirror(wxDC& dc, const wxImage& img, const wxRect& rect, int a case wxLayout_RightToLeft: if (rect.GetWidth() > 0 && rect.GetHeight() > 0) - { - if (!buffer || buffer->GetSize() != rect.GetSize()) //[!] since we do a mirror, width needs to match exactly! - buffer.emplace(rect.GetSize()); + { + if (!buffer || buffer->GetSize() != rect.GetSize()) //[!] since we do a mirror, width needs to match exactly! + buffer.emplace(rect.GetSize()); - if (buffer->GetScaleFactor() != dc.GetContentScaleFactor()) //needed here? - buffer->SetScaleFactor(dc.GetContentScaleFactor()); // + if (buffer->GetScaleFactor() != dc.GetContentScaleFactor()) //needed here? + buffer->SetScaleFactor(dc.GetContentScaleFactor()); // - wxMemoryDC memDc(*buffer); //copies scale factor from wxBitmap - memDc.Blit(wxPoint(0, 0), rect.GetSize(), &dc, rect.GetTopLeft()); //blit in: background is mirrored due to memDc, dc having different layout direction! + wxMemoryDC memDc(*buffer); //copies scale factor from wxBitmap + memDc.Blit(wxPoint(0, 0), rect.GetSize(), &dc, rect.GetTopLeft()); //blit in: background is mirrored due to memDc, dc having different layout direction! - impl::drawBitmapAligned(memDc, img, wxRect(0, 0, rect.width, rect.height), alignment); - //note: we cannot simply use memDc.SetLayoutDirection(wxLayout_RightToLeft) due to some strange 1 pixel bug! 2022-04-04: maybe fixed in wxWidgets 3.1.6? + impl::drawBitmapAligned(memDc, img, wxRect(0, 0, rect.width, rect.height), alignment); + //note: we cannot simply use memDc.SetLayoutDirection(wxLayout_RightToLeft) due to some strange 1 pixel bug! 2022-04-04: maybe fixed in wxWidgets 3.1.6? - dc.Blit(rect.GetTopLeft(), rect.GetSize(), &memDc, wxPoint(0, 0)); //blit out: mirror once again - } - break; + dc.Blit(rect.GetTopLeft(), rect.GetSize(), &memDc, wxPoint(0, 0)); //blit out: mirror once again + } + break; case wxLayout_Default: //CAVEAT: wxPaintDC/wxMemoryDC on wxGTK/wxMAC does not implement SetLayoutDirection()!!! => GetLayoutDirection() == wxLayout_Default if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) |