Commit 83c8167d authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Expose the "Show Playlist" action in the toolbar to make it more obvious

parent ece796f4
......@@ -30,7 +30,6 @@ Menu {
property var aboutAppAction: elisa.action("help_about_app")
property var configureShortcutsAction: elisa.action("options_configure_keybinding")
property var configureAction: elisa.action("options_configure")
property var togglePlaylistAction: elisa.action("toggle_playlist")
Action {
text: i18nc("Refresh Music Collection application menu entry", "Refresh Music Collection")
......@@ -64,16 +63,6 @@ Menu {
}
}
Action {
shortcut: togglePlaylistAction.shortcut
text: contentView.showPlaylist ? i18nc("Hide playlist", "Hide Playlist") : i18nc("Show playlist", "Show Playlist")
icon.name: "view-media-playlist"
onTriggered: {
contentView.showPlaylist = !contentView.showPlaylist
applicationMenu.close()
}
}
MenuSeparator {
visible: reportBugAction.text !== ""
}
......
......@@ -412,6 +412,27 @@ FocusScope {
icon.height: elisaTheme.smallControlButtonSize
}
// Not a FlatButtonWithToolTip because we want text
Button {
id: showHidePlaylistAction
action: Action {
shortcut: elisa.action("toggle_playlist").shortcut
onTriggered: contentView.showPlaylist = !contentView.showPlaylist
}
flat: true
text: i18n("Show Playlist")
icon.name: "view-media-playlist"
checkable: true
checked: contentView.showPlaylist
activeFocusOnTab: true
Keys.onReturnPressed: action.trigger()
Accessible.onPressAction: action.trigger()
}
FlatButtonWithToolTip {
id: menuButton
action: applicationMenuAction
......@@ -419,9 +440,6 @@ FocusScope {
icon.width: elisaTheme.smallControlButtonSize
icon.height: elisaTheme.smallControlButtonSize
Layout.rightMargin: !LayoutMirroring.enabled ? elisaTheme.mediaPlayerHorizontalMargin : elisaTheme.mediaPlayerHorizontalMargin * 1.5
Layout.leftMargin: LayoutMirroring.enabled ? elisaTheme.mediaPlayerHorizontalMargin : elisaTheme.mediaPlayerHorizontalMargin * 1.5
}
}
......
......@@ -60,8 +60,10 @@ Menu {
MenuItem {
shortcut: togglePlaylistAction.shortcut
text: contentView.showPlaylist ? i18nc("Hide playlist", "Hide Playlist") : i18nc("Show playlist", "Show Playlist")
text: i18n("Show Playlist")
iconName: "view-media-playlist"
checkable: true
checked: contentView.showPlaylist
onTriggered: contentView.showPlaylist = !contentView.showPlaylist
enabled: contentView.currentViewIndex != 0
}
......
Markdown is supported
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