Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(QScrollArea): add scroll viewport to create overscrolling effect #17208

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

thexeos
Copy link
Contributor

@thexeos thexeos commented May 18, 2024

When designing pages (lists, galleries, horizontal scrollers) that have overlays (headers, footers, navigation panels on the sides) using QScrollArea results in either the scroll bar overlapping the content of the overlays (Figure 1) or scroll thumb/bar being hidden (and made inaccessible) by the overlays (Figure 2). In both cases, it leads to confusing experience for users.

If we add offsets to bottom/top of each (vertical and horizontal) scroll tracks, then it will effectively create a scrollable viewport within the container. The scroll behavior remains consistent and predictable to users, while developers get the freedom of creating overlays and adding acrylic/glass effects to their lists. See Figures 3-4.

What kind of change does this PR introduce?

  • Feature

Does this PR introduce a breaking change?

  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch (or v[X] branch)
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on an Electron app
  • Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature.

Figure 1.
chrome_NS7urur5no

Figure 2.
chrome_TSSRZD0sYO

Figure 3.
chrome_aysY4ILKJK

Figure 4.
chrome_lFTDUCw31L

Other information:

Note 1: there is no documentation in PR yet, until the feature is approved and parameter names are "locked in".

Note 2: this includes code from #17041 and #17207 - once those are merged I will rebased this against the (updated) dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant