diff --git a/src/qml/FileBrowserDelegate.qml b/src/qml/FileBrowserDelegate.qml --- a/src/qml/FileBrowserDelegate.qml +++ b/src/qml/FileBrowserDelegate.qml @@ -17,8 +17,7 @@ */ import QtQuick 2.7 -import QtQuick.Controls 2.2 -import QtQuick.Controls 1.4 as Controls1 +import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import org.kde.elisa 1.0 @@ -39,31 +38,31 @@ signal open(var data) signal selected() - Controls1.Action { + Action { id: replaceAndPlayAction text: i18nc("Clear play list and enqueue current track", "Play Now and Replace Play List") - iconName: "media-playback-start" + icon.name: "media-playback-start" onTriggered: replaceAndPlay(fileUrl) } - Controls1.Action { + Action { id: enqueueAction text: i18nc("Enqueue current track", "Enqueue") - iconName: "media-track-add-amarok" + icon.name: "media-track-add-amarok" onTriggered: enqueue(fileUrl) } - Controls1.Action { + Action { id: openAction text: i18nc("Enqueue current track", "Enqueue") - iconName: 'document-open-folder' + icon.name: 'document-open-folder' onTriggered: open(fileUrl) } - Controls1.Action { + Action { id: viewDetailsAction text: i18nc("Show track metadata", "View Details") - iconName: "help-about" + icon.name: "help-about" onTriggered: { if (metadataLoader.active === false) { metadataLoader.active = true @@ -139,32 +138,33 @@ opacity: 0 sourceComponent: Row { + spacing: 10 - Controls1.ToolButton { + FlatButtonWithToolTip { id: detailsButton - Layout.preferredHeight: elisaTheme.delegateHeight - Layout.preferredWidth: elisaTheme.delegateHeight + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize action: viewDetailsAction visible: !isDirectory && !isPlayList } - Controls1.ToolButton { + FlatButtonWithToolTip { id: enqueueOpenButton - Layout.preferredHeight: elisaTheme.delegateHeight - Layout.preferredWidth: elisaTheme.delegateHeight + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize action: isDirectory ? openAction : enqueueAction visible: !isPlayList } - Controls1.ToolButton { + FlatButtonWithToolTip { id: replaceAndPlayButton - Layout.preferredHeight: elisaTheme.delegateHeight - Layout.preferredWidth: elisaTheme.delegateHeight + implicitHeight: elisaTheme.smallControlButtonSize + implicitWidth: elisaTheme.smallControlButtonSize scale: LayoutMirroring.enabled ? -1 : 1 action: replaceAndPlayAction diff --git a/src/qml/GridBrowserDelegate.qml b/src/qml/GridBrowserDelegate.qml --- a/src/qml/GridBrowserDelegate.qml +++ b/src/qml/GridBrowserDelegate.qml @@ -16,8 +16,7 @@ */ import QtQuick 2.7 -import QtQuick.Controls 2.2 -import QtQuick.Controls 1.4 as Controls1 +import QtQuick.Controls 2.3 import QtQuick.Window 2.2 import QtQml.Models 2.1 import QtQuick.Layouts 1.2 @@ -39,29 +38,29 @@ signal open() signal selected() - Controls1.Action { + Action { id: enqueueAction text: i18nc("Add whole container to play list", "Enqueue") - iconName: 'media-track-add-amarok' + icon.name: 'media-track-add-amarok' onTriggered: enqueue(containerData) enabled: containerData !== undefined } - Controls1.Action { + Action { id: openAction text: i18nc("Open view of the container", "Open") - iconName: 'document-open-folder' + icon.name: 'document-open-folder' onTriggered: open() } - Controls1.Action { + Action { id: replaceAndPlayAction text: i18nc("Clear play list and add whole container to play list", "Play Now and Replace Play List") - iconName: 'media-playback-start' + icon.name: 'media-playback-start' onTriggered: replaceAndPlay(containerData) enabled: containerData !== undefined @@ -124,30 +123,31 @@ opacity: 0 sourceComponent: Row { + spacing: 10 - Controls1.ToolButton { + FlatButtonWithToolTip { id: enqueueButton objectName: 'enqueueButton' action: enqueueAction visible: enqueueAction.enabled - width: elisaTheme.delegateToolButtonSize - height: elisaTheme.delegateToolButtonSize + width: elisaTheme.smallControlButtonSize + height: elisaTheme.smallControlButtonSize } - Controls1.ToolButton { + FlatButtonWithToolTip { id: openButton objectName: 'openButton' action: openAction - width: elisaTheme.delegateToolButtonSize - height: elisaTheme.delegateToolButtonSize + width: elisaTheme.smallControlButtonSize + height: elisaTheme.smallControlButtonSize } - Controls1.ToolButton { + FlatButtonWithToolTip { id: replaceAndPlayButton objectName: 'replaceAndPlayButton' @@ -157,8 +157,8 @@ visible: replaceAndPlayAction.enabled - width: elisaTheme.delegateToolButtonSize - height: elisaTheme.delegateToolButtonSize + width: elisaTheme.smallControlButtonSize + height: elisaTheme.smallControlButtonSize } } } diff --git a/src/qml/MediaTrackDelegate.qml b/src/qml/MediaTrackDelegate.qml --- a/src/qml/MediaTrackDelegate.qml +++ b/src/qml/MediaTrackDelegate.qml @@ -18,8 +18,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.2 -import QtQuick.Controls 2.2 -import QtQuick.Controls 1.4 as Controls1 +import QtQuick.Controls 2.3 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 import org.kde.elisa 1.0 @@ -38,24 +37,24 @@ signal enqueue(var data) signal replaceAndPlay(var data) - Controls1.Action { + Action { id: replaceAndPlayAction text: i18nc("Clear play list and enqueue current track", "Play Now and Replace Play List") - iconName: "media-playback-start" + icon.name: "media-playback-start" onTriggered: replaceAndPlay(dataHelper.databaseId) } - Controls1.Action { + Action { id: enqueueAction text: i18nc("Enqueue current track", "Enqueue") - iconName: "media-track-add-amarok" + icon.name: "media-track-add-amarok" onTriggered: enqueue(dataHelper.databaseId) } - Controls1.Action { + Action { id: viewDetailsAction text: i18nc("Show track metadata", "View Details") - iconName: "help-about" + icon.name: "help-about" onTriggered: { if (metadataLoader.active === false) { metadataLoader.active = true @@ -282,32 +281,33 @@ sourceComponent: Row { anchors.centerIn: parent + spacing: 10 - Controls1.ToolButton { + FlatButtonWithToolTip { id: detailsButton - height: elisaTheme.delegateHeight - width: elisaTheme.delegateHeight + height: elisaTheme.smallControlButtonSize + width: elisaTheme.smallControlButtonSize action: viewDetailsAction } - Controls1.ToolButton { + FlatButtonWithToolTip { id: enqueueButton - height: elisaTheme.delegateHeight - width: elisaTheme.delegateHeight + height: elisaTheme.smallControlButtonSize + width: elisaTheme.smallControlButtonSize action: enqueueAction } - Controls1.ToolButton { + FlatButtonWithToolTip { id: clearAndEnqueueButton scale: LayoutMirroring.enabled ? -1 : 1 - height: elisaTheme.delegateHeight - width: elisaTheme.delegateHeight + height: elisaTheme.smallControlButtonSize + width: elisaTheme.smallControlButtonSize action: replaceAndPlayAction }