[vlc-commits] Qt: fix RTL layout
Fahad Al-Saidi
git at videolan.org
Tue Dec 8 10:32:29 CET 2015
vlc | branch: master | Fahad Al-Saidi <fahad.alsaidi at gmail.com> | Mon Dec 7 15:33:36 2015 +0400| [ff403e89951b9a412f50a6376ed7af78c8051092] | committer: Jean-Baptiste Kempf
Qt: fix RTL layout
Fix #9170
Qt doesn't set application layout direction by default, so we make it
use locale text direction, e.g. RTL for Arabic.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff403e89951b9a412f50a6376ed7af78c8051092
---
modules/gui/qt4/qt4.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 3cfaffc..6721021 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -479,6 +479,10 @@ static void *Thread( void *obj )
/* Start the QApplication here */
QVLCApp app( argc, argv );
+ /* Set application direction to locale direction,
+ * necessary for RTL locales */
+ app.setLayoutDirection(QLocale().textDirection());
+
p_intf->p_sys->p_app = &app;
More information about the vlc-commits
mailing list