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

SCScrollView relativeOrigin glitch #75

Closed
jleben opened this issue May 6, 2012 · 0 comments
Closed

SCScrollView relativeOrigin glitch #75

jleben opened this issue May 6, 2012 · 0 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs.

Comments

@jleben
Copy link
Member

jleben commented May 6, 2012

[Issue migrated from SourceForge | ID: 2508451 | Submitted by 'jmfuo']
[http://sourceforge.net/support/tracker.php?aid=2508451]

If you set the bounds of a scrollView retrospectively, it does not respect relativeOrigin of the parent:

(
w=Window.new("test",Rect(100,400,600,400)).front;

v=CompositeView(w,w.view.bounds.moveTo(0,0).insetBy(20,20)).background_(Color.green.alpha_(0.4));

q=SCScrollView(v,v.bounds.moveTo(0,0).insetBy(20,20)).background_(Color.red.alpha_(0.4));

q.flow({ arg w;
78.do({ arg i;
b = GUI.button.new(w, Rect(rrand(20,300),rrand(20,300), 75, 24));
b.states = [["Start "++i, Color.black, Color.rand],
["Stop "++i, Color.white, Color.red]];
});
});
)

q.bounds=q.bounds.moveTo(0,0) // this should respect relativeOrigin

@jleben jleben closed this as completed May 6, 2012
mossheim pushed a commit that referenced this issue Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs.
Projects
None yet
Development

No branches or pull requests

1 participant