[vlc-devel] [PATCH 18/27] qml: remove plitem text fade out
Fatih Uzunoglu
fuzun54 at outlook.com
Fri Oct 9 18:56:39 CEST 2020
---
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 }
- }
- }
- }
}
}
--
2.25.1
More information about the vlc-devel
mailing list