Add default vertical scrollbar to TableView#45
Add default vertical scrollbar to TableView#45AndrewSazonov wants to merge 2 commits intodevelopfrom
Conversation
seventil
left a comment
There was a problem hiding this comment.
You can add topInset and topPadding to the ScrollBar if you want to ofset height for the header.
I guess with AsNeeded policy user only sees a narrow indicator-like bar anyway, and they can interact with it if they want, so it's totally OK to define interactive:true.
Here's an example from listview just for reference:
property real _headerHeight: headerItem ? headerItem.height : 0
ScrollBar.vertical: EaElements.ScrollBar {
policy: listView.scrollBarPolicy
interactive: listView.scrollBarInteractive
topInset: listView._headerHeight
topPadding: listView._headerHeight
}
|
Right, I forgot about this, thanks for pointing it out. I would avoid adding an extra Also, I used ScrollBar.vertical: EaElements.ScrollBar {
topInset: listView.headerItem ? listView.headerItem.height : 0
topPadding: topInset
interactive: true
policy: ScrollBar.AsNeeded
} |
This PR adds the existing EaElements.ScrollBar as the default vertical scrollbar for TableView with AsNeeded policy and interactive behavior enabled.