Browse Source

qml: consider display margins properly in hover area placement of `FadingEdgeForListView`

The display "margin" grows outwards the viewport, this can also be seen in `FadingEdge`
where its `ShaderEffectSource` use the negative of the display margin for its position
(left and top margins). The hover areas must perfectly overlap with the fading areas,
we need this change to satisfy that.

I also fix mistakenly using beginning margin for the end hover area.
pull/183/head
Fatih Uzunoglu 10 months ago
committed by Steve Lhomme
parent
commit
858233eeef
  1. 8
      modules/gui/qt/widgets/qml/FadingEdgeForListView.qml

8
modules/gui/qt/widgets/qml/FadingEdgeForListView.qml

@ -96,8 +96,8 @@ FadingEdge {
top: parent.top
left: parent.left
topMargin: (orientation === Qt.Vertical) ? beginningMargin : undefined
leftMargin: (orientation === Qt.Horizontal) ? beginningMargin : undefined
topMargin: (orientation === Qt.Vertical) ? -beginningMargin : undefined
leftMargin: (orientation === Qt.Horizontal) ? -beginningMargin : undefined
bottom: (orientation === Qt.Horizontal) ? parent.bottom : undefined
right: (orientation === Qt.Vertical) ? parent.right : undefined
@ -125,8 +125,8 @@ FadingEdge {
bottom: parent.bottom
right: parent.right
bottomMargin: (orientation === Qt.Vertical) ? beginningMargin : undefined
rightMargin: (orientation === Qt.Horizontal) ? beginningMargin : undefined
bottomMargin: (orientation === Qt.Vertical) ? -endMargin : undefined
rightMargin: (orientation === Qt.Horizontal) ? -endMargin : undefined
top: (orientation === Qt.Horizontal) ? parent.top : undefined
left: (orientation === Qt.Vertical) ? parent.left : undefined

Loading…
Cancel
Save