[vlc-devel] [PATCH 44/55] qml: remove obsolete DNDLabel.qml

Fatih Uzunoglu fuzun54 at outlook.com
Thu Jan 7 21:36:57 UTC 2021


---
 modules/gui/qt/Makefile.am              |   1 -
 modules/gui/qt/vlc.qrc                  |   1 -
 modules/gui/qt/widgets/qml/DNDLabel.qml | 155 ------------------------
 po/POTFILES.in                          |   1 -
 4 files changed, 158 deletions(-)
 delete mode 100644 modules/gui/qt/widgets/qml/DNDLabel.qml

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index c3c80515b4..220334ce79 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -700,7 +700,6 @@ libqt_plugin_la_QML = \
 	gui/qt/widgets/qml/CSDWindowButton.qml \
 	gui/qt/widgets/qml/CSDWindowButtonSet.qml \
 	gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml \
-	gui/qt/widgets/qml/DNDLabel.qml \
 	gui/qt/widgets/qml/DragItem.qml \
 	gui/qt/widgets/qml/DrawerExt.qml \
 	gui/qt/widgets/qml/ExpandGridView.qml \
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index b1b99148ca..2fae7d1310 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -196,7 +196,6 @@
         <file alias="KeyNavigableGridView.qml">widgets/qml/KeyNavigableGridView.qml</file>
         <file alias="KeyNavigableListView.qml">widgets/qml/KeyNavigableListView.qml</file>
         <file alias="ToolTipArea.qml">widgets/qml/ToolTipArea.qml</file>
-        <file alias="DNDLabel.qml">widgets/qml/DNDLabel.qml</file>
         <file alias="KeyNavigableTableView.qml">widgets/qml/KeyNavigableTableView.qml</file>
         <file alias="TableColumns.qml">widgets/qml/TableColumns.qml</file>
         <file alias="TransparentSpinBox.qml">widgets/qml/TransparentSpinBox.qml</file>
diff --git a/modules/gui/qt/widgets/qml/DNDLabel.qml b/modules/gui/qt/widgets/qml/DNDLabel.qml
deleted file mode 100644
index 1a02e049b3..0000000000
--- a/modules/gui/qt/widgets/qml/DNDLabel.qml
+++ /dev/null
@@ -1,155 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2019 VLC authors and VideoLAN
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * ( at your option ) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-import QtQuick.Layouts 1.3
-import QtGraphicalEffects 1.0
-import org.videolan.vlc 0.1
-
-import "qrc:///widgets/" as Widgets
-import "qrc:///playlist/" as Playlist
-import "qrc:///style/"
-
-Playlist.PlaylistDroppable {
-    property alias text: label.text
-    property alias model: plitem.model
-    property alias color: bg.color
-    property VLCColors colors: VLCStyle.colors
-
-    z: 1
-    width:  plitem.visible ? plitem.width : label.width
-    height: plitem.visible ? plitem.height : label.height
-    opacity: 0.75
-    visible: false
-
-    Rectangle {
-        id: bg
-
-        anchors.fill: parent
-        color: colors.button
-        border.color : colors.buttonBorder
-        radius: 6
-    }
-
-    Drag.active: visible
-
-    property var count: 0
-
-    property point _pos: null
-
-    function updatePos(x, y) {
-        var pos = root.mapFromGlobal(x, y)
-        dragItem.x = pos.x
-        dragItem.y = pos.y
-
-        // since we override position update during dragging with updatePos(),
-        // it is better to track the final position through a property:
-        _pos = pos
-    }
-
-    RectangularGlow {
-        anchors.fill: parent
-        glowRadius: VLCStyle.dp(8, VLCStyle.scale)
-        color: colors.glowColor
-        spread: 0.2
-    }
-
-    Text {
-        id: label
-        width: implicitWidth + VLCStyle.dp(10, VLCStyle.scale)
-        height: implicitHeight + VLCStyle.dp(10, VLCStyle.scale)
-        font.pixelSize: VLCStyle.fontSize_normal
-        color: colors.text
-        text: i18n.qtr("%1 tracks selected").arg(count)
-        visible: count > 1 || !model
-        verticalAlignment: Text.AlignVCenter
-        horizontalAlignment: Text.AlignHCenter
-    }
-
-    Item {
-        id: plitem
-        visible: count === 1 && model
-        width: childrenRect.width
-        height: childrenRect.height
-
-        property var model
-
-        RowLayout {
-            id: content
-            width: implicitWidth + VLCStyle.dp(10, VLCStyle.scale)
-            height: implicitHeight + VLCStyle.dp(10, VLCStyle.scale)
-            Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
-            Item {
-                Layout.preferredHeight: VLCStyle.icon_normal
-                Layout.preferredWidth: VLCStyle.icon_normal
-                Layout.leftMargin: VLCStyle.margin_xsmall
-
-                Image {
-                    id: artwork
-                    anchors.fill: parent
-                    fillMode: Image.PreserveAspectFit
-                    source: (model && model.artwork && model.artwork.toString()) ? model.artwork : VLCStyle.noArtCover
-                    visible: !statusIcon.visible
-                }
-
-                Widgets.IconLabel {
-                    id: statusIcon
-                    anchors.fill: parent
-                    visible: (!!model && model.isCurrent && text !== "")
-                    width: height
-                    height: VLCStyle.icon_normal
-                    horizontalAlignment: Text.AlignHCenter
-                    verticalAlignment: Text.AlignVCenter
-                    color: colors.accent
-                    text: player.playingState === PlayerController.PLAYING_STATE_PLAYING ? VLCIcons.volume_high :
-                                                    player.playingState === PlayerController.PLAYING_STATE_PAUSED ? VLCIcons.pause :
-                                                        player.playingState === PlayerController.PLAYING_STATE_STOPPED ? VLCIcons.stop : ""
-                }
-            }
-
-            Column {
-                Widgets.ListLabel {
-                    id: textInfo
-                    Layout.leftMargin: VLCStyle.margin_small
-
-                    font.weight: model && model.isCurrent ? Font.DemiBold : Font.Normal
-                    text: model ? model.title : ""
-                    color: colors.text
-                }
-
-                Widgets.ListSubtitleLabel {
-                    id: textArtist
-                    Layout.leftMargin: VLCStyle.margin_small
-
-                    font.weight: (model && model.isCurrent) ? Font.DemiBold : Font.Normal
-                    text: ((model && model.artist) ? model.artist : i18n.qtr("Unknown Artist"))
-                    color: colors.text
-                }
-            }
-
-            Widgets.ListLabel {
-                id: textDuration
-                Layout.rightMargin: VLCStyle.margin_xsmall
-
-                text: model ? model.duration : ""
-                color: colors.text
-            }
-        }
-    }
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f4fd54e526..c9a246b82c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -837,7 +837,6 @@ modules/gui/qt/playlist/qml/PlaylistDelegate.qml
 modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml
 modules/gui/qt/playlist/qml/PlaylistListView.qml
 modules/gui/qt/playlist/qml/PlaylistToolbar.qml
-modules/gui/qt/widgets/qml/DNDLabel.qml
 modules/gui/qt/widgets/qml/DragItem.qml
 modules/gui/qt/widgets/qml/ListItem.qml
 modules/gui/qt/widgets/qml/SearchBox.qml
-- 
2.27.0



More information about the vlc-devel mailing list