Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Filter Input Row in RTL Locales #685

Merged
merged 1 commit into from
Jul 29, 2016
Merged

Fix Filter Input Row in RTL Locales #685

merged 1 commit into from
Jul 29, 2016

Conversation

SafaAlfulaij
Copy link
Contributor

The filter input row isn't mirrored in RTL locales.
That is because Qt draws from left to right, and the painting wasn't recognizing RTL locales.
This fix does change the position of the inputs to be drawn from right to left (Using width() - ..).

According to Qt documentation:

The position is measured in pixels from the first visible item's top-left corner to the top-left corner of the item with logicalIndex.

For that the size of the column is added to the postion so that it's measured from the top-right corner to the top-right corner.

Fixes #631

@justinclift
Copy link
Member

@innermous You ok to review this? 😄

@justinclift justinclift added the bug Confirmed bugs or reports that are very likely to be bugs. label Jul 29, 2016
@vtronko vtronko merged commit 96d7a31 into sqlitebrowser:master Jul 29, 2016
@vtronko
Copy link
Member

vtronko commented Jul 29, 2016

That's exactly how I were doing it. I don't have my code anymore, but it didn't work correctly on resizing for some reason.
Good job, @SafaAlfulaij .

@SafaAlfulaij SafaAlfulaij deleted the filter_input_rtl branch August 6, 2016 08:31
vtronko added a commit that referenced this pull request Dec 29, 2016
Fix Filter Input Row in RTL Locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters raw isn't mirrored in RTL layout
4 participants