[vlc-commits] qml: remove plitem text fade out

Fatih Uzunoglu git at videolan.org
Thu Oct 15 10:32:50 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Oct  9 19:56:39 2020 +0300| [b0e106160724ee81dd4deb23e40770b1a8cccee9] | committer: Pierre Lamot

qml: remove plitem text fade out

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b0e106160724ee81dd4deb23e40770b1a8cccee9
---

 modules/gui/qt/playlist/qml/PLItem.qml | 50 +++++-----------------------------
 1 file changed, 7 insertions(+), 43 deletions(-)

diff --git a/modules/gui/qt/playlist/qml/PLItem.qml b/modules/gui/qt/playlist/qml/PLItem.qml
index 4283670b42..a3e72fcfb7 100644
--- a/modules/gui/qt/playlist/qml/PLItem.qml
+++ b/modules/gui/qt/playlist/qml/PLItem.qml
@@ -218,65 +218,29 @@ Rectangle {
 
                 ToolTip {
                     id: textInfoExtendTooltip
-                    text: textArtistHider.visible ? (textInfoHider.visible ? textInfo.text + '\n' + textArtist.text : textArtist.text) : textInfo.text
-                    visible: (root.hovered || model.selected) && (textArtistHider.visible || textInfoHider.visible)
-                    opacity: 0.75
-                    delay: 1000
-                    timeout: 2000
+                    text: (textInfo.text + '\n' + textArtist.text)
+                    visible: (plitem.hovered || model.selected) && (textInfo.implicitWidth > textInfo.width || textArtist.implicitWidth > textArtist.width)
+                    delay: 750
                 }
 
                 Widgets.ListLabel {
                     id: textInfo
 
+                    width: parent.width
+
                     font.weight: model.isCurrent ? Font.Bold : Font.Normal
                     text: model.title
                     color: _colors.text
-
-                    Item {
-                        id: textInfoHider
-                        anchors.fill: parent
-
-                        visible: textInfo.width + textInfoColumn.x > textDuration.x
-
-                        LinearGradient {
-                            anchors.fill: parent
-                            start: Qt.point(0, 0)
-                            end: Qt.point(parent.width - (textInfo.width + textInfoColumn.x - textDuration.x), 0)
-                            gradient: Gradient {
-                                GradientStop { position: 0.75; color: "transparent" }
-                                GradientStop { position: 1.0; color: selectedBackground.visible === true ? selectedBackground.color
-                                                                                                         : Qt.colorEqual(plitem.color, "transparent") ? _colors.banner
-                                                                                                         : plitem.color }
-                            }
-                        }
-                    }
                 }
 
                 Widgets.ListSubtitleLabel {
                     id: textArtist
 
+                    width: parent.width
+
                     font.weight: model.isCurrent ? Font.DemiBold : Font.Normal
                     text: (model.artist ? model.artist : i18n.qtr("Unknown Artist"))
                     color: _colors.text
-
-                    Item {
-                        id: textArtistHider
-                        anchors.fill: parent
-
-                        visible: textArtist.width + textInfoColumn.x > textDuration.x
-
-                        LinearGradient {
-                            anchors.fill: parent
-                            start: Qt.point(0, 0)
-                            end: Qt.point(parent.width - (textArtist.width + textInfoColumn.x - textDuration.x), 0)
-                            gradient: Gradient {
-                                GradientStop { position: 0.75; color: "transparent" }
-                                GradientStop { position: 1.0; color: selectedBackground.visible === true ? selectedBackground.color
-                                                                                                         : Qt.colorEqual(plitem.color, "transparent") ? _colors.banner
-                                                                                                         : plitem.color }
-                            }
-                        }
-                    }
                 }
             }
 



More information about the vlc-commits mailing list