Skip to content

Commit

Permalink
Merge pull request sqlitebrowser#695 from justinclift/rtl_tweak
Browse files Browse the repository at this point in the history
Tweak the filter header RTL code
  • Loading branch information
justinclift authored Aug 2, 2016
2 parents ff302c4 + 6bb7036 commit 2b7f527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FilterTableHeader.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "FilterTableHeader.h"
#include "FilterLineEdit.h"

#include <QApplication>
#include <QTableView>
#include <QScrollBar>

Expand Down Expand Up @@ -76,7 +77,7 @@ void FilterTableHeader::adjustPositions()
{
// Get the current widget, move it and resize it
QWidget* w = filterWidgets.at(i);
if (layoutDirection() == Qt::RightToLeft)
if (QApplication::layoutDirection() == Qt::RightToLeft)
w->move(width() - (sectionPosition(i) + sectionSize(i) - offset()), w->sizeHint().height() + 2); // The two adds some extra space between the header label and the input widget
else
w->move(sectionPosition(i) - offset(), w->sizeHint().height() + 2); // The two adds some extra space between the header label and the input widget
Expand Down

0 comments on commit 2b7f527

Please sign in to comment.