Skip to content

Commit 58ef035

Browse files
committed
Window bar support I18N
1 parent 76924a3 commit 58ef035

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/shared/widgetframe/windowbar.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "windowbar_p.h"
33

44
#include <QtCore/QDebug>
5+
#include <QtCore/QLocale>
56
#include <QtGui/QtEvents>
67

78
namespace QWK {
@@ -17,6 +18,10 @@ namespace QWK {
1718
void WindowBarPrivate::init() {
1819
Q_Q(WindowBar);
1920
layout = new QHBoxLayout();
21+
if (QLocale::system().textDirection() == Qt::RightToLeft) {
22+
layout->setDirection(QBoxLayout::RightToLeft);
23+
}
24+
2025
layout->setContentsMargins(QMargins());
2126
layout->setSpacing(0);
2227
for (int i = IconButton; i <= CloseButton; ++i) {

0 commit comments

Comments
 (0)