[vlc-commits] Qt: fix RTL layourt

Fahad Al-Saidi git at videolan.org
Tue Dec 8 10:07:58 CET 2015


vlc | branch: master | Fahad Al-Saidi <fahad.alsaidi at gmail.com> | Mon Dec  7 15:33:36 2015 +0400| [b7143332ecef6a59c5a11886e2031279b91b95b1] | committer: Jean-Baptiste Kempf

Qt: fix RTL layourt

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=b7143332ecef6a59c5a11886e2031279b91b95b1
---

 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