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
Implement nickel_orientation action #70
Conversation
So far, this works fine with
|
installing as we speak to my kobo clara 👍 thanks in advance @pgaskin |
@pgaskin thanks so much for this! I have installed and tested it on my Kobo Clara HD. All orientation options work however if a user wants to go from portrait to landscape, he/she will have to switch the orientation through the ForceAllowLandscape menu first. Meaning trying to switch from Portrait (using menu_item:main:Portrait:nickel_orientation:portrait) to Landscape (using |
Thanks for testing it!
That's a known issue (see the comments in the code review above). I'll probably be adding some messages to help users who don't realize that. |
Hadnt realised that there was the sleep functionality also implemented. Just added that to the config file and also works flawlessly. You rock! |
It will now work no matter what the current locked orientation is, and hides almost all of the implementation details from the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this with:
Devices:
- Mini (no sensor), 4.13.12638
- Aura2 (no sensor), 4.22.15268
- ClaraHD (no sensor), 4.22.15268
Config:
ForceAllowLandscape
ForceAllowLandscape
and patched- Patched
Config:
menu_item:main:Portrait:nickel_orientation:portrait
menu_item:main:Landscape:nickel_orientation:landscape
menu_item:main:InvPortrait:nickel_orientation:inverted_portrait
menu_item:main:InvLandscape:nickel_orientation:inverted_landscape
menu_item:main:InvertPL:nickel_orientation:invert
menu_item:main:SwapPL:nickel_orientation:swap
menu_item:reader:Portrait:nickel_orientation:portrait
menu_item:reader:Landscape:nickel_orientation:landscape
menu_item:reader:InvPortrait:nickel_orientation:inverted_portrait
menu_item:reader:InvLandscape:nickel_orientation:inverted_landscape
menu_item:reader:InvertPL:nickel_orientation:invert
menu_item:reader:SwapPL:nickel_orientation:swap
It still needs testing on a device with an orientation sensor (I don't have any of those) with and without ForceAllowLandscape
(both without the rotation patch). The main thing to check is that the orientation sensor is overridden until a different rotation option (try it with auto rotation + select inverted_portrait
, auto rotation + select swap
, and with locked portrait + select inverted_landscape
) is selected from the rotation pop-up (the sensor should work again after that without a reboot). (that's 6 different test cases and 1 config file change halfway through).
Without
With
|
So, short of the weird "not quite sticky across views" without the setting, that works pretty much as intended, I guess? |
Can you clarify what you mean by this?
So that's working as intended (I eventually decided to lock it and disable invert). If you think it's a good idea, I can allow gyro inversion to work for portrait/landscape (or have an option which allows it).
Yes, that makes sense, since we don't actually disable the sensor (it will still attempt to change stuff and update the icon), just prevent it's readings from having any effect by limiting the mask to our new rotation. |
Since the icon matches the usual "manual" lock state, it vaguely makes sense to me that the behavior should match too ;). That said, I'm absolutely not the guy to ask about actual experience with this: I pretty much do everything in Portrait ^^. |
I've noticed that before... it's quite an unusual menu (remember the sizing issues we had a while back with the rotation patch?).
Yes, this makes sense, as it's Nickel which enforces the restrictions for views (we set it either way, so it just only takes effect when the current view allows it). Regarding the gyro being disabled completely, see my above comment ("
That's good, it's what I intended.
Yes, that sounds like a misclick, as I didn't see anything which would cause this to happen. |
Yes, I guess there wouldn't usually be much reason (if any) to want to force an upside-down display if the device is upright.
I can confirm that's how it would work, as I noticed it during my testing and while looking at libnickel. I usually do stuff in Portrait unless I'm reading something landscape or I'm writing a webapp for the browser (it's usually a lot more useful in landscape). For me, my main use for this action is inverted portrait when I want to hold it from the top side or when I have a cable plugged into it. Regarding the fully-locked landscape/portrait modes, do you think it'd be a good idea to add an option to allow gyro inversions or vice versa? |
Definitely (c.f., #70 (comment)) ;). And since I apparently got ghost email notifications for stuff I can't actually see (the GH website has been wonky as hell this week): that was on a Forma ;). |
That comment was in the review above 😉 . I got caught by that bug with auto-scrolling to the comment yesterday. Speaking of bugs in GitHub, the cache has been very wonky recently. Also, when switching between desktop/mobile views, it seems to take you to the previous page you were on. And, references like
Which would be better: an option called Edit: I just remembered one of the reasons why I decided to fully lock it. I haven't gone through everything, but it appears some gyro settings are changed when switching between auto and one of the other locked views. We can't easily reproduce these changes, and I'd rather not have to walk QObjects (see the comments in the code) to get the required object to call the proper change methods on. I might leave this for later if there is demand for it. |
If there aren't any further objections or possible issues/unexpected behavior, I'll merge this later today. I'm going to put aside the idea for options to change to the usual locked orientations (where it can still invert from the gyro) for now, as they add significant complexity and/or possible issues which I have no way of testing myself. If there's demand for it, I might consider implementing them. @NiLuJe, one last question: if you use |
Yep, it does :). |
That's good. I guess this is ready to be merged now. |
closes #67