enhance content view navigation
ClosedPublic

Authored by astippich on Nov 19 2017, 11:19 AM.

Details

Summary

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

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.
astippich created this revision.Nov 19 2017, 11:19 AM

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.

astippich updated this revision to Diff 22707.Nov 21 2017, 8:17 PM
  • make go back action configurable

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.

mgallien added inline comments.Nov 22 2017, 9:32 PM
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.

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.

Strange. Actually, that was my first implementation, but thought this would be cleaner and works here. But will change.

astippich updated this revision to Diff 22926.Nov 25 2017, 5:09 PM
  • use proper action and empty slots for shortcut
mgallien requested changes to this revision.Nov 27 2017, 10:06 PM
mgallien added inline comments.
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.

This revision now requires changes to proceed.Nov 27 2017, 10:06 PM
astippich updated this revision to Diff 23186.Nov 30 2017, 7:52 PM
  • use a function instead of signal
mgallien accepted this revision.EditedDec 3 2017, 9:40 PM

Thanks for your work

This revision is now accepted and ready to land.Dec 3 2017, 9:40 PM
This revision was automatically updated to reflect the committed changes.