QuickMenu: anchor to gesture position 2#10641
Conversation
Feels a bit quick to go with yet another setting. I would have liked some discussion first :) and/or you try to live with it for a while before going the hard way of adding a superfluous-feeling setting.
Anyway, no hard objection ;) |
|
(1) Actually #10636 was quick, got jumping QMs without discussion. |
Again, not familiar with all this, but the above seems complicated (and odd). Possibly implementation requiring all this, but may be this should not face the user.
I know - so let's discuss it here :) Pinging @jonnyl2 @yparitcher . |
I do not think so, and our User Guide describes both ways of getting QuickMenus: (1) as a gesture with multiple actions and (2) as a profile. I prefer (2). In that case the gesture has one action |
|
Also asking QM heavy users @mergen3107 and @offset-torque. |
I think the complexity is referring to having a special setting just about its location? I'd think all you need is:
|
All corner long-presses and the following multiswipes: N-E-W and SE-NE. For the corners, anchoring in the respective corners is welcomed. For the multi-swipes, the most natural and convenient anchor would be a little above the end point of the last leg of the gesture (where I lift the finger) such that the finger is positioned near the left-hand side of the first option of the QM. (For this reason I also suggest to make the QM as narrow as possible, because if the gesture is effected near the edge of the screen, a wider width will cause the QM to open further away from the gesture. I think of it kind of like a right-click context menu that opens right by the mouse cursor.) |
No, the @poire-z 's logic is trickier koreader/frontend/ui/widget/container/movablecontainer.lua Lines 134 to 135 in 346d8eb Depends on the size of the QM. We may think of setting prefers_pop_down to make it more predictable.
|
|
Anyway, with the current PR you will be able to switch the anchoring off. |
I agree with @Frenzie , however I only use gesture-based QM, not profile-based. I also don’t know the intentions of original FR as to why anchoring is useful. |
|
I tested the new files and for me it works very well. (I didn't test QM as Profile.) What does @offset-torque I tested your set-up and I think it would work very conveniently for you with the anchoring active; however, you would have to use a quick diagonal swipe in North-East direction. If you do South-West (as in your diagram), the QuickMenu will open above the swipe line and the options will be harder to reach. |
The gesture is available when the touch input is off. The position of a QM doesn't depend on the direction of a gesture. |
It depends on where one initiates the gesture. This is what I meant: Edited_20230704_173340.mp4 |
|
That feels weirder and more complex for no good reason; either anchor it or don't anything in-between would feel super weird. |
If you want to see something super weird have a look at 5 second mark of @jonnyl2's last video. He swiped lower half of the screen -> Menu opened at the top half of the screen. Zero overlap between finger position and menu. Overall, I am ok as long as I can have a fixed position menu. I don't know how many QM users are there but most of them got used to the centered menu and probably won't want to change too, especially if they have a small screen. After all my Libra screen is the size of my hand (even smaller) so moving this menu around won't benefit me much. This might be more useful if I upgrade to a 10" reader. But the proposal looks nicer and feels more like a right-click menu so it is aesthetically more pleasing that is for sure. |
yparitcher
left a comment
There was a problem hiding this comment.
@hius07
Sorry for the rush, i thought everyone had chimed in.
Passing the gesture to the profile is a good idea. However as others have said if we add a setting, only the gesture itself should need the setting, not the profiles afterwards.
As discussed in the other pr, if we want to use the end pos, gesturedetector sould be extended to pass current_tev as endpos
| if settingsList[k].category == "none" then | ||
| if settingsList[k].arg ~= nil then | ||
| UIManager:sendEvent(Event:new(settingsList[k].event, settingsList[k].arg)) | ||
| UIManager:sendEvent(Event:new(settingsList[k].event, settingsList[k].arg, gesture)) |
There was a problem hiding this comment.
Please check that this doesnt break any of the other handlers
| function Dispatcher:execute(settings, gesture) | ||
| if settings.settings ~= nil and settings.settings.show_as_quickmenu == true then | ||
| return Dispatcher:_showAsMenu(settings, gesture) | ||
| return Dispatcher:_showAsMenu(settings, settings.settings.anchor_quickmenu and gesture) |
There was a problem hiding this comment.
Maybe do the check in _showAsMenu to keep the details out of execute?
Perhaps it would be best to use 2 different QM width settings:
Then nothing will change for users who will opt not to use the anchor feature. |
FWIW, I was bored last night, so I have something in the fire, I just got sidetracked because I unearthed a bit of a behavior difference between single and two-finger pans/swipes in the process, and I'm pondering on how best to deal with that ;). The upside is that basically everything already uses the release position except for swipes, so the actually relevant and non-OCD-related stuff is fairly trivial ;). |
Why so? |
Sounds good to me. Current wide menu is ugly and covers the book, but as a side effect it is accessible from both sides. Maybe we can have:
|
The tap bottom corner should have anchored set, and it should pass through automatically to the profile, the profile should be ignorant of how it was called, the user should only need to set the setting on the gesture and it should pass through to nested profiles, and only checked by the qm popup. |
|
So strange, the second today commit (to Dispatcher) is in my branch but doesn't appear here. |


Follow up to #10636.
(1) Enable anchoring for profiles
(2) Anchoring is optional
(3) QuickMenu width is adjustable, not less than 0.5 of the screen width.
In Gestures manager:
In Profiles:
This change is