Fix account bar scrolling

All delegates must have the same padding, or the ListView doesn't know
how to scroll to a certain index anymore
This commit is contained in:
miruka 2020-05-01 12:26:32 -04:00
parent 194a5194a8
commit cc4a780865
2 changed files with 4 additions and 10 deletions

View File

@ -6,10 +6,8 @@ import ".."
HTile {
id: tile
topPadding:
padded ? spacing / (firstInSection ? 1 : 2) / (compact ? 2 : 1) : 0
bottomPadding:
padded ? spacing / (lastInSection ? 1 : 2) / (compact ? 2 : 1) : 0
topPadding: padded ? spacing / (compact ? 4 : 2) : 0
bottomPadding: topPadding
onLeftClicked: {
view.highlightRangeMode = ListView.NoHighlightRange
@ -23,9 +21,4 @@ HTile {
signal activated()
property HListView view: ListView.view
readonly property bool firstInSection:
ListView.previousSection !== ListView.section
readonly property bool lastInSection:
ListView.nextSection !== ListView.section
}

View File

@ -33,9 +33,10 @@ HListView {
section.property: "for_account"
section.labelPositioning:
ViewSection.InlineLabels | ViewSection.CurrentLabelAtStart
section.delegate: Account {
accountModel: ModelStore.get("accounts").find(section)
width: roomList.width
accountModel: ModelStore.get("accounts").find(section)
}