Browse Source

qml: set the display margins for the horizontal list view in `MusicArtist`

So that the fading edge effect does not clip the view. In fact, it still
"clips" but only outside the display margins, which I assume is wanted
anyway (see the last paragraph).

Due to the fundamental working of item layering, clipping is inevitable.
This is because in order to render an item offscreen, it is necessary to
know the boundaries of the offscreen buffer. Well, unless the buffer can
have infinite size, which I assume is not technically possible as that
would require infinite memory.

As a side note, the vertical artists list view stacked above in the left
side, and the playlist stacked above in the right side both have non-
opaque background so as to reveal window's background blur effect, but
they currently use a hack to not reveal any Qt Quick item rendered behind,
and even if this is changed in the future, we still do not want the items
in the horizontal view to appear behind. So, having the fading edge effect's
clipping is beneficial here. However, if in the future we stop using that
said hack, we need to have explicit clipping here even though the fading edge
effect clips the view, because the fading edge effect is disabled when
neither the beginning nor the end fade is enabled, which may have many
reasons including not having enough size to have fading effect, or, the
current item is the beginning item (so beginning fade is disabled) and
the user hovers the end item (so end fade is disabled).
pull/183/head
Fatih Uzunoglu 10 months ago
committed by Steve Lhomme
parent
commit
adcaf45fd0
  1. 3
      modules/gui/qt/medialibrary/qml/MusicArtist.qml

3
modules/gui/qt/medialibrary/qml/MusicArtist.qml

@ -162,6 +162,9 @@ FocusScope {
topMargin: VLCStyle.gridItemSelectedBorder
bottomMargin: VLCStyle.gridItemSelectedBorder
displayMarginBeginning: root._contentLeftMargin
displayMarginEnd: root._contentRightMargin
focus: true
model: albumModel

Loading…
Cancel
Save