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 separator alignment #1702

Merged
merged 1 commit into from
Aug 9, 2021
Merged

Fix separator alignment #1702

merged 1 commit into from
Aug 9, 2021

Conversation

aaronayres35
Copy link
Contributor

This issue was observed when working on #1691, and again while working on addressing #1312.

Previously I remember having run the example code in #1312 without this issue... I recently updated to macOS Big Sur, but I am unsure if that is related. I do not know what changed to cause this, especially since it appears to be an off by one error (which somehow wasn't a problem before ?).
In any case, running the example code given in #1312 without this fix I see:
pre_fix
and with this change:
post_fix

Checklist

  • Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)

@aaronayres35
Copy link
Contributor Author

Looking closer at the screenshots it appears as though the separator below the "Below" label is unaffected (i.e. it was already in the right place before)
I suspect because it was already the last row in the Group

@aaronayres35
Copy link
Contributor Author

Also, with the changes in this PR I see this for the ArrayEditor example:
Screen Shot 2021-06-24 at 8 42 14 AM

@aaronayres35
Copy link
Contributor Author

@mdickinson rahul mentioned you may still be on an older version of macOS. If that's the case and you get a chance could you run the example code:

from traits.api import *
from traitsui.api import *

class SeparatorTest(HasTraits):
    view = View(
        Label('Above'),
        Item('_'),
        Label('Below'),
        Item('_'),
        Group(Label('Caverns')),
        Item('_'),
        Group(Label('Dungeons')),
        Item('_'),
        Group(Label("Extra dungeons")),
        Item('_'),
        Label('Foundations')
    )

if __name__ == "__main__":
    separator = SeparatorTest()
    separator.configure_traits()

On both master / this branch to see what looks correct.

@mdickinson
Copy link
Member

Here's what I see with PySide2 / Python 3.6 / EDM env on macOS 10.15.7.

First on master:

Screenshot 2021-07-23 at 09 24 44

Then on this branch:

Screenshot 2021-07-23 at 09 25 16

@mdickinson
Copy link
Member

Sorry, that second image is wrong (I forgot that etstool doesn't make an editable install by default). Here's the correct image
Screenshot 2021-07-23 at 09 28 27

In short: everything looks good on macOS 10.15.

@aaronayres35
Copy link
Contributor Author

Thank you @mdickinson!

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the script that generates screenshots locally on windows and everything looks good on this branch. Sorry for the glacial pace of PR review

@rahulporuri rahulporuri merged commit c10d40d into master Aug 9, 2021
@rahulporuri rahulporuri deleted the fix-separators branch August 9, 2021 06:20
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.

None yet

3 participants