[vlc-devel] [PATCH 26/27] qml: don't allow KeyNavigableListView fade out rects to overlap
Fatih Uzunoglu
fuzun54 at outlook.com
Fri Oct 9 18:56:47 CEST 2020
---
modules/gui/qt/widgets/qml/KeyNavigableListView.qml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
index 4c7e97de9a..fa506e7eef 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
@@ -250,6 +250,8 @@ NavigableFocusScope {
}
}
+ readonly property bool _fadeRectsOverlap: fadeRectTop.y + fadeRectTop.height > fadeRectBottom.y
+
Rectangle {
id: fadeRectTop
anchors {
@@ -259,7 +261,7 @@ NavigableFocusScope {
topMargin: headerItem && (headerPositioning === ListView.OverlayHeader) ? headerItem.height : 0
}
height: highlightMargin * 2
- visible: !!fadeColor && fadeRectTop.opacity !== 0.0
+ visible: !!fadeColor && fadeRectTop.opacity !== 0.0 && !view._fadeRectsOverlap
property bool isHovered: false
property bool _stateVisible: ((orientation === ListView.Vertical && !view.atYBeginning)
@@ -304,7 +306,7 @@ NavigableFocusScope {
right: parent.right
}
height: highlightMargin * 2
- visible: !!fadeColor && fadeRectBottom.opacity !== 0.0
+ visible: !!fadeColor && fadeRectBottom.opacity !== 0.0 && !view._fadeRectsOverlap
property bool isHovered: false
property bool _stateVisible: ((orientation === ListView.Vertical && !view.atYEnd)
--
2.25.1
More information about the vlc-devel
mailing list