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

Set tab stop distance with tabStopDistance in Gui #718

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Conversation

YakoYakoYokuYoku
Copy link
Member

@YakoYakoYokuYoku YakoYakoYokuYoku commented Dec 6, 2021

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
    • I have updated the documentation accordingly

What does this pull request do?

tabStopWidth was deprecated in Qt 5.10 and tabStopDistance is recommended to be used instead.

Show a few screenshots (if this is a visual change)

N/A.

Have you tested your changes (if applicable)? If so, how?

Built Natron and used the script editor.

Futher details of this pull request

Used horizontalAdvance from the font metrics to be coherent with the Qt recommendations, which in turn will be done in another PR too.
This was a blocker of one of the things I've been working on.

@devernay devernay merged commit c6fc87f into RB-2.5 Dec 7, 2021
@rodlie
Copy link
Contributor

rodlie commented Dec 7, 2021

There are two checks for >=QT_VERSION_CHECK(5, 11, 0) and one for >=QT_VERSION_CHECK(5, 10 0) on the same feature (added in 5.10), a typo?

@YakoYakoYokuYoku
Copy link
Member Author

This is not a typo because QFontMetrics::horizontalAdvance was introduced in version 5.11.

@YakoYakoYokuYoku YakoYakoYokuYoku deleted the tab-stop-renov branch December 7, 2021 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants