Commit cafc34d8 authored by Nate Graham's avatar Nate Graham
Browse files

Change "Show Artist" functionality to be hover-based on desktop

There is precisely one circumstance under which the "Show Artist"
button in the navigation toolbar appears and is  useful: when you have
accessed an album from the "Albums" view in the sidebar. In every other
circumstance, it is redundant because you got to the Album view by
navigating there from the artist view first, so you can just click the
back button. As a result, most of the time that this button is
displayed, it is just taking up space, causing artist and album names
to elide earlier, and not being very relevant.

Removing it entirely is overkill though. So instead, let's make the
artist name in the navigation toolbar clickable, and clicking on it will
take the user to the artist view. This way we can remove the button.
Making the UX hover-based makes it less discoverable, but this is an
acceptable price to pay for such an esoteric and mostly-useless piece of
functionality, and it re-uses users' familiarity with other clickable
labels in the headerbar.

This change is only made for the desktop UI; no changes are made for the
mobile UI, since hover-based UIs don't work at all there.
parent 79c646e3
Pipeline #202240 canceled with stage
in 6 minutes and 6 seconds
......@@ -5,9 +5,9 @@
*/
import QtQml 2.2
import QtQuick 2.7
import QtQuick 2.15
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import QtQuick.Controls 2.15
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.8 as Kirigami
import org.kde.elisa 1.0
......@@ -248,6 +248,15 @@ Item {
text: secondaryTitle
elide: Text.ElideRight
TapHandler {
id: showArtistTaphandler
enabled: navigationBar.allowArtistNavigation && !navigationBar.showCreateRadioButton
onTapped: showArtist(secondaryTitle)
}
HoverHandler {
enabled: showArtistTaphandler.enabled
cursorShape: Qt.PointingHandCursor
}
}
},
Loader {
......@@ -271,11 +280,6 @@ Item {
active: !Kirigami.Settings.isMobile && !showCreateRadioButton
Layout.maximumHeight: parent.height
},
Loader {
sourceComponent: showArtistButton
active: !Kirigami.Settings.isMobile && allowArtistNavigation && !showCreateRadioButton
Layout.maximumHeight: parent.height
},
FlatButtonWithToolTip {
Kirigami.Theme.colorSet: Kirigami.Settings.isMobile ? Kirigami.Theme.Complementary : Kirigami.Theme.Window
Kirigami.Theme.inherit: false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment