[vlc-commits] qml: don't allow KeyNavigableListView fade out rects to overlap
Fatih Uzunoglu
git at videolan.org
Thu Oct 15 10:33:00 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Oct 9 19:56:47 2020 +0300| [3558d05974539e1440ae36c81ec9afcdd7ab49b6] | committer: Pierre Lamot
qml: don't allow KeyNavigableListView fade out rects to overlap
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3558d05974539e1440ae36c81ec9afcdd7ab49b6
---
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)
More information about the vlc-commits
mailing list