diff options
author | B Stack <bgstack15@gmail.com> | 2019-11-20 08:36:44 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-11-20 08:36:44 -0500 |
commit | ed50041589974d31296cb30dc1897f7fba6336c2 (patch) | |
tree | e2c5c7b1f98e64011b1ee8ca4e9bb9157510dfe7 /wx+/rtl.h | |
parent | Merge branch '10.17' into 'master' (diff) | |
download | FreeFileSync-ed50041589974d31296cb30dc1897f7fba6336c2.tar.gz FreeFileSync-ed50041589974d31296cb30dc1897f7fba6336c2.tar.bz2 FreeFileSync-ed50041589974d31296cb30dc1897f7fba6336c2.zip |
add upstream 10.18
Diffstat (limited to 'wx+/rtl.h')
-rw-r--r-- | wx+/rtl.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -20,6 +20,7 @@ void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, in //wxDC::DrawIcon DOES mirror by default -> implement RTL support when needed wxBitmap mirrorIfRtl(const wxBitmap& bmp); +wxImage mirrorIfRtl(const wxImage& bmp); //manual text flow correction: https://www.w3.org/International/articles/inline-bidi-markup/ @@ -93,6 +94,15 @@ void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, in } +inline +wxImage mirrorIfRtl(const wxImage& bmp) +{ + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + return bmp.Mirror(); + else + return bmp;} + + inline wxBitmap mirrorIfRtl(const wxBitmap& bmp) { |