Add swipe down to the pageheader to hide the bottomedge after it's fully commited
Closed this issue · 3 comments
It is a little annoying to click the down button to close the bottomedge when you flicked it open.
it make sense that if it`s flicked open then it should be able to be flicked close.
So i suggest that we add swipe down to the PageHeader in the contentComponent of the BottomEdge to hide the bottomedge after it's fully commited as it was suggested here
Oh, sorry I posted a possible solution at the original issue because I found that first (and did not read it entirely 😢 ).
Basically we add a MouseArea to the header that catches a swipe movement. When the swiped distance is reached it calls the pop() signal of a page.
With propagateComposedEvents: true
click events to buttons in the header (like back/down/close or any other function) can still be used.
So this is fully convergent as click for mouse is still available.
As I have said in the original post, this function should be implemented into the toolkit itself, rather than hacked into every header itself. A code example is posted there too.
There are a few things to consider when doing so:
- this should be optional, so developer can choose to use it in their headers
- size can be
fill.parent
(the header) but can also be defined smaller with anchors i.e. if there is buttons the swipe might interfere with - swipe direction can be all directions (up/down/left/right) to cover different functions i.e. close bottom edge, go back, ...
- with
propagateComposedEvents: true
buttons can be clicked, but might be triggered when the finger is released over a button -> setfalse
and/or adjust size of swipe area - do we wish to show another icon that might suggest to the user that there is not only tap/click available?
- swipe left/right should be either both or changeable for left/right handed users
In my opinion this feature would not only make use of bottom edge more convenient, but really should be applied to all back buttons. I really do not like to aim for back button i.e. in TELEports and end up opening chat details. 😄
But with this being a c++ job it would need to be implemented by someone else.
Ubuntu UI Toolkit has moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit. If this issue is still relevant, please file it again at https://gitlab.com/ubports/core/lomiri-ui-toolkit/-/issues.