Skip to content

Conversation

@kaustuvpokharel
Copy link
Contributor

@kaustuvpokharel kaustuvpokharel commented Oct 10, 2025

Case: Missing scrollbar for the desktop version for all the ListView components.

What has be been done:
Added slim scrollbar on the right side of the lists.
Scroll bar only activates for desktops; ex(macos, window, linux) and not any mobile builds
Scrollbar always visibile, but highlights on active more and passive on inactive.

Tested for mutiple page which uses ListView and the work of scrollbar

Screen.Recording.2025-10-23.at.12.18.39.PM.mov

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

Pull Request Test Coverage Report for Build 19935992820

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 23 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 59.601%

Files with Coverage Reduction New Missed Lines %
mm/app/attributes/attributecontroller.cpp 1 76.83%
mm/core/merginuserauth.cpp 9 68.24%
mm/core/merginapi.cpp 13 75.15%
Totals Coverage Status
Change from base Build 19633950309: -0.1%
Covered Lines: 8523
Relevant Lines: 14300

💛 - Coveralls

@kaustuvpokharel kaustuvpokharel marked this pull request as ready for review October 10, 2025 20:04
@kaustuvpokharel kaustuvpokharel linked an issue Oct 10, 2025 that may be closed by this pull request
Copy link
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, it would make more sense to move the scrollbar directly into MMListView and/or MMScrollView as we want the scrollbar for all lists in the app as mentioned in #4127 . Right now it would be just for feature list.

@Withalion Withalion changed the base branch from dev/2025.8.0 to master November 11, 2025 10:00
Added property to make the scroll bar disappear where is not needed
Copy link
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about these changes. 2 things I don't like:

  • when we are defining delegates we should not care if the View has scroll bar or not. Flickables have contentWidth property, but we don't utilize it. I'm not sure if it should be calculated automatically or by us.
  • we show the scroll bars even though they are not necessary. We should never show them on mobile, show them when necessary on desktop and they should not hide.

Comment on lines 23 to 25
readonly property bool isMobile: (Qt.platform.os === "android" || Qt.platform.os === "ios")
property int scrollSpace: !isMobile ? 10 : 0
property bool showScrollBar: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • isMobile could be just internal property
  • scrollSpace I would rename it to something more meaningful like scrollBarWidth and it should be read only, and maybe we should use __style.margin10
  • showScrollBar I would change it to alias refering verticalScrollBar.policy and get rid of visible property

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should I make isMobile an internal property?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With QtObject component as we do in other places

Copy link
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stuff doesn't look the best, but it would probably require a bigger refactor, which is out of scope of this PR

@Withalion Withalion requested a review from tomasMizera December 5, 2025 10:39
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.

Add scrollbar for desktop builds in lists

5 participants