Skip to content

ScrollView: Stop clipping by default, modernize JS

ivan tkachenko requested to merge work/ratijas/scrollview-v2 into master

This is the less controversial part of !265


Stop clipping by default

For two reasons.

  1. This is already set by default on its contentItem Flickable in QQuickScrollViewPrivate::ensureFlickable method. It won't apply to any custom flickable is manually declared or assigned though, such as any ListView or GridView, so this is not a very compelling reason. But...

  2. No other/upstream style does this. Thus, it sets up a trap of false expectations for developers. By implementing this "convenience helper" here, we are potentially masking bugs in their layout (such as missing clipping on ListView), and those bugs would surface on other styles, should they fallback to Basic or switch to Material for some reason. So, don't overdo this. Style implementation is not an appropriate place to add non-standard unexpected features.

Port internal method to new optional chaining syntax

It is somewhat shorter this way, and does not require an extra meta-data for redundant method.

Merge request reports