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

update stylesheet.rb to fix app/screen size/height #42

Merged
merged 2 commits into from
Apr 16, 2014

Conversation

malkomalko
Copy link
Contributor

takes into account the orientation

takes into account the orientation
@malkomalko
Copy link
Contributor Author

Here's some other interesting facts: rmq.device.landscape? returns false when I'm running in landscape mode on the simulator.

@twerth
Copy link
Member

twerth commented Apr 16, 2014

Hmm, that's odd, it does for me in simulator:

(main)> rmq.stylesheet.landscape?
=> false

I flipped it here

(main)> rmq.stylesheet.landscape?
=> true
(main)> rmq.device.landscape?
=> true

@twerth
Copy link
Member

twerth commented Apr 16, 2014

Oh, I bet it doesn't work when you start the simulator in landscape mode, rather than flip to it

@twerth
Copy link
Member

twerth commented Apr 16, 2014

This may be related: #2

@malkomalko
Copy link
Contributor Author

Good call: also check out https://github.com/infinitered/rmq/blob/master/motion/ruby_motion_query/device.rb#L65

Looks like there's a fat finger in there with a capital L in left. That wasn't the cause thought.

@malkomalko
Copy link
Contributor Author

Even more strange: UIDevice.currentDevice.orientation in the repl returns 0 which is more than likely why things are bad. However installing BubbleWrap and accessing Device.orientation yields :landscape_right, but their implementation just calls UIDevice.currentDevice.orientation.

What the what?

@malkomalko
Copy link
Contributor Author

Accessing the orientation with UIApplication.sharedApplication.statusBarOrientation seems to be a better choice.

@malkomalko
Copy link
Contributor Author

This works and specs pass. Build is failing because of rubymotion needing to be updated on travis.

@malkomalko
Copy link
Contributor Author

Diff with whitespace ignored: https://github.com/infinitered/rmq/pull/42/files?w=1

Let me know what you think.

twerth added a commit that referenced this pull request Apr 16, 2014
update stylesheet.rb to fix app/screen size/height
@twerth twerth merged commit bea849e into infinitered:master Apr 16, 2014
@twerth
Copy link
Member

twerth commented Apr 16, 2014

Thanks sir for this fix.

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

2 participants