diff --git a/src/qml/MediaPlayListView.qml b/src/qml/MediaPlayListView.qml --- a/src/qml/MediaPlayListView.qml +++ b/src/qml/MediaPlayListView.qml @@ -16,8 +16,7 @@ */ import QtQuick 2.5 -import QtQuick.Controls 2.2 -import QtQuick.Controls 1.3 as Controls1 +import QtQuick.Controls 2.3 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import QtQml.Models 2.1 @@ -36,42 +35,42 @@ id: topItem - Controls1.Action { + Action { id: clearPlayList text: i18nc("Remove all tracks from play list", "Clear Playlist") - iconName: 'edit-clear-all' + icon.name: 'edit-clear-all' enabled: playListModelDelegate.items.count > 0 onTriggered: playListModel.clearPlayList() } - Controls1.Action { + Action { id: showCurrentTrack text: i18nc("Show currently played track inside playlist", "Show Current Track") - iconName: 'media-show-active-track-amarok' + icon.name: 'media-show-active-track-amarok' enabled: playListModelDelegate.items.count > 0 onTriggered: { playListView.positionViewAtIndex(playListModel.currentTrackRow, ListView.Contain) playListView.currentIndex = playListModel.currentTrackRow playListView.currentItem.forceActiveFocus() } } - Controls1.Action { + Action { id: loadPlaylist text: i18nc("Load a playlist file", "Load Playlist...") - iconName: 'document-open' + icon.name: 'document-open' onTriggered: { fileDialog.fileMode = PlatformDialog.FileDialog.OpenFile fileDialog.file = '' fileDialog.open() } } - Controls1.Action { + Action { id: savePlaylist text: i18nc("Save a playlist file", "Save Playlist...") - iconName: 'document-save' + icon.name: 'document-save' enabled: playListModelDelegate.items.count > 0 onTriggered: { @@ -134,9 +133,9 @@ Layout.topMargin: elisaTheme.layoutVerticalMargin * 3 } - RowLayout { Layout.fillWidth: true + spacing: 10 LabelWithToolTip { id: playListInfo @@ -149,14 +148,31 @@ Item { Layout.fillWidth: true } - Controls1.ToolButton { action: showCurrentTrack } - Controls1.ToolButton { action: savePlaylist } - Controls1.ToolButton { action: loadPlaylist } - Controls1.ToolButton { action: clearPlayList } + FlatButtonWithToolTip { + action: showCurrentTrack + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize + Layout.alignment: Qt.AlignVCenter + } + FlatButtonWithToolTip { + action: savePlaylist + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize + Layout.alignment: Qt.AlignVCenter + } + FlatButtonWithToolTip { + action: loadPlaylist + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize + Layout.alignment: Qt.AlignVCenter + } + FlatButtonWithToolTip { + action: clearPlayList + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize + Layout.alignment: Qt.AlignVCenter + } } - - Item { Layout.fillHeight: true } - } ColumnLayout { diff --git a/src/qml/PlayListEntry.qml b/src/qml/PlayListEntry.qml --- a/src/qml/PlayListEntry.qml +++ b/src/qml/PlayListEntry.qml @@ -18,7 +18,6 @@ import QtQuick 2.7 import QtQuick.Layouts 1.2 import QtQuick.Controls 2.3 -import QtQuick.Controls 1.4 as Controls1 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 import org.kde.elisa 1.0 @@ -48,19 +47,19 @@ height: (hasAlbumHeader ? elisaTheme.playListDelegateWithHeaderHeight : elisaTheme.playListDelegateHeight) - Controls1.Action { + Action { id: removeFromPlayList text: i18nc("Remove current track from play list", "Remove") - iconName: "error" + icon.name: "error" onTriggered: { playListEntry.removeFromPlaylist(playListEntry.index) } } - Controls1.Action { + Action { id: playNow text: i18nc("Play now current track from play list", "Play Now") - iconName: "media-playback-start" + icon.name: "media-playback-start" enabled: !(isPlaying === MediaPlayList.IsPlaying) && isValid onTriggered: { if (isPlaying === MediaPlayList.NotPlaying) { @@ -70,18 +69,18 @@ } } - Controls1.Action { + Action { id: pauseNow text: i18nc("Pause current track from play list", "Pause") - iconName: "media-playback-pause" + icon.name: "media-playback-pause" enabled: isPlaying == MediaPlayList.IsPlaying && isValid onTriggered: playListEntry.pausePlayback() } - Controls1.Action { + Action { id: showInfo text: i18nc("Show track metadata", "View Details") - iconName: "help-about" + icon.name: "help-about" enabled: isValid onTriggered: { if (metadataLoader.active === false) { @@ -427,7 +426,7 @@ Layout.preferredWidth: 0 } - Controls1.ToolButton { + FlatButtonWithToolTip { id: infoButton objectName: 'infoButton' @@ -442,7 +441,7 @@ Layout.alignment: Qt.AlignVCenter | Qt.AlignRight } - Controls1.ToolButton { + FlatButtonWithToolTip { id: playPauseButton objectName: 'playPauseButton' @@ -465,7 +464,7 @@ Layout.maximumHeight: elisaTheme.smallDelegateToolButtonSize Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter - Controls1.ToolButton { + FlatButtonWithToolTip { id: removeButton objectName: 'removeButton'