[vlc-devel] [PATCH 13/15] qml: remove unused functions from VideoInfoExpandPanel
Prince Gupta
guptaprince8832 at gmail.com
Tue Jul 21 14:18:11 CEST 2020
---
.../qml/MusicAlbumsGridExpandDelegate.qml | 9 ---------
.../qt/medialibrary/qml/VideoInfoExpandPanel.qml | 2 --
modules/gui/qt/widgets/qml/ExpandGridView.qml | 16 ----------------
3 files changed, 27 deletions(-)
diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
index 810e9ab9f1..04892cc9d5 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
@@ -35,9 +35,6 @@ Widgets.NavigableFocusScope {
clip: true
- property int currentItemY
- property int currentItemHeight
-
Rectangle {
anchors.fill: parent
color: VLCStyle.colors.bgAlt
@@ -204,12 +201,6 @@ Widgets.NavigableFocusScope {
currentIndex = 0
}
- onCurrentItemChanged: {
- if (currentItem != undefined) {
- root.currentItemHeight = currentItem.height
- }
- }
-
sortModel: [
{ isPrimary: true, criteria: "title", width: VLCStyle.colWidth(Math.max(expand_track_id._nbCols - 1, 1)), visible: true, text: i18n.qtr("Title"), showSection: "", colDelegate: titleDelegate, headerDelegate: titleHeaderDelegate },
{ criteria: "durationShort", width: VLCStyle.colWidth(1), visible: true, showSection: "", colDelegate: tableColumns.timeColDelegate, headerDelegate: tableColumns.timeHeaderDelegate },
diff --git a/modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml b/modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
index 520b5d48bf..7d50a27da7 100644
--- a/modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
@@ -31,8 +31,6 @@ Widgets.NavigableFocusScope {
property int currentId: -1
property var model : ({})
- property alias currentItemY: expandRect.y
- property alias currentItemHeight: expandRect.height
property bool _showMoreInfo: false
signal retract()
diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
index ea307fffe6..b7c72b94ba 100644
--- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
+++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
@@ -439,22 +439,6 @@ NavigableFocusScope {
if (root.expandIndex !== -1)
flickable.expandAnimation()
}
- onCurrentItemYChanged: {
- var newContentY = flickable.contentY;
- var currentItemYPos = root.getItemPos(currentIndex)[1] + _effectiveCellHeight + expandItem.currentItemY
- if (currentItemYPos + expandItem.currentItemHeight > flickable.contentY + flickable.height) {
- //move viewport to see current item bottom
- newContentY = Math.min(
- currentItemYPos + expandItem.currentItemHeight - flickable.height,
- flickable.contentHeight - flickable.height)
- } else if (currentItemYPos < flickable.contentY) {
- //move viewport to see current item top
- newContentY = Math.max(currentItemYPos, 0)
- }
-
- if (newContentY !== flickable.contentY)
- animateFlickableContentY(newContentY)
- }
}
function expand() {
--
2.25.1
More information about the vlc-devel
mailing list