The backspace key is now also accepted for back navigation in e.g. the artist album view.
A mouse area is added to MediaBrowser to allow back navigation with the mouse backbutton.
Focus is forced on the stackview when arist or album is opened. Without this, the back key navigation is only working when it is actively focused by the user, e.g. by a mouse click
Details
- Reviewers
mgallien - Group Reviewers
Elisa - Commits
- R255:8d8481170916: enhance content view navigation
Diff Detail
- Repository
- R255 Elisa
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This makes navigating the content much nicer for me, but I'm not entirely sure if the focus changes are the right way to go. Please let me know if there are any side effects with this for you.
Thanks for that.
I had read your review summary so I knew what to do. I checked what dolphin does and discovered that I could also use backspace in Dolphin (I did not knew). I was used to Alt+Left .
At the same time, dolphin is using an action with configurable shortcuts. I think that it would be better if Elisa was doing the same. We provide a way to discover our shortcuts and allow the user to configure Elisa to their liking. We also feel like a KDE application (good default and good possibility to configure it).
You can have a look at what I did for other actions with configurable shortcuts. It is in ElisaApplication.
When testing your work I came across the fact that enter key does nothing even if one would like to open the album for example using the enter key.
src/MediaBrowser.qml | ||
---|---|---|
41 | If you would like to do this kind of change, please do it globally and in a separate review. |
I made the button configurable. I am unsure if this is the right way to use KStandardAction with QML so please check carefully. The back action in MediaBrowser gets triggered via a signal. This has the nice effect that forcing the focus becomes unnecessary.
It was not working for me until I have added a method pointer to the creation of the standard action. I have added a private empty slot.
src/elisaapplication.cpp | ||
---|---|---|
120 | Please use go_back instead. It feels at least to me more logic to use the same action than dolphin for example. |
Strange. Actually, that was my first implementation, but thought this would be cleaner and works here. But will change.
src/MediaBrowser.qml | ||
---|---|---|
33 | You should use a function. I believe that it should also work but does not involve defining a signal handler inside the object. |