summaryrefslogtreecommitdiff
path: root/wx+/rtl.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-12-14 15:52:53 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-12-14 15:52:53 +0000
commitcc75e50ca861529d50601d247fd66f806fcb23a8 (patch)
treee2c5c7b1f98e64011b1ee8ca4e9bb9157510dfe7 /wx+/rtl.h
parentMerge branch '10.17' into 'master' (diff)
parentadd upstream 10.18 (diff)
downloadFreeFileSync-cc75e50ca861529d50601d247fd66f806fcb23a8.tar.gz
FreeFileSync-cc75e50ca861529d50601d247fd66f806fcb23a8.tar.bz2
FreeFileSync-cc75e50ca861529d50601d247fd66f806fcb23a8.zip
Merge branch '10.18' into 'master'10.18
add upstream 10.18 See merge request opensource-tracking/FreeFileSync!15
Diffstat (limited to 'wx+/rtl.h')
-rw-r--r--wx+/rtl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/wx+/rtl.h b/wx+/rtl.h
index 0cae9bac..0adb6037 100644
--- a/wx+/rtl.h
+++ b/wx+/rtl.h
@@ -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)
{
bgstack15