Skip to content

Conversation

corranwebster
Copy link
Contributor

This adds logic to the Viewport component (and some auxiliary changes for the Scrolled component) that allows move familiar scrolling conventions.

Viewports can now specify horizontal and vertical anchors for the view which indicate where the initial position of the viewport should be relative to the component, and the fixed point when the bounds of the view change.

In addition the unimplemented stay_inside option is now implemented: when changing the bounds of the viewport the view will try to stay within the bounds of the viewed component, if possible.

This PR is built on #205, since it makes the interactive testing easier, but is technically orthogonal to it.

Tests included.

@corranwebster
Copy link
Contributor Author

Hmmm... we seem to have broken 2.6 builds with new traitsui version.

Do we still care about Python 2.6.

@mdickinson
Copy link
Member

Do we still care about Python 2.6.

I would vote yes: recent versions of RedHat still seem to be using Python 2.6 as their system Python, and I'm fairly sure we still have some customers who are Python 2.6. How hard are the failures to fix on 2.6?

@corranwebster
Copy link
Contributor Author

Not sure - we are no longer testing on TrauitsUI on 2.6 with the move to support Python 3. I'll look into it. If we support 2.6 we should be testing everything on it - breakage is too easy otherwise.

I think that there are significant wins for supporting 2.7 and 3.3+ only.

FWIW, Redhat 7 ships with Python 2.7 and has been out for over a year at this point.

@corranwebster
Copy link
Contributor Author

With #205 ready for merge, I think that this PR is as well.

@corranwebster
Copy link
Contributor Author

Looks like the problem was something transient with Travis trying to get traitsui. Re-running the tests, everything is passing.

@corranwebster corranwebster merged commit 39c8d18 into master Apr 29, 2016
@corranwebster corranwebster deleted the enh/viewport-resizing branch April 29, 2016 08:47
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.

2 participants