Add scrollhelper.

This commit is contained in:
Black Hat
2018-10-15 07:26:27 +08:00
parent cc55793e77
commit 9558c75219
6 changed files with 107 additions and 4 deletions

View File

@@ -9,8 +9,6 @@ import Spectral.Setting 0.1
import Spectral.Component 2.0
Rectangle {
readonly property bool highlighted: currentRoom === enteredRoom
color: MSettings.darkTheme ? "#303030" : "#fafafa"
AutoMouseArea {
@@ -38,13 +36,13 @@ Rectangle {
Rectangle {
anchors.fill: parent
visible: highlightCount > 0 || highlighted
visible: highlightCount > 0 || currentRoom === enteredRoom
color: Material.accent
opacity: 0.1
}
Rectangle {
width: unreadCount > 0 || highlighted ? 4 : 0
width: unreadCount > 0 ? 4 : 0
height: parent.height
color: Material.accent

View File

@@ -102,6 +102,7 @@ Rectangle {
spacing: 1
clip: true
interactive: false
model: roomListProxyModel
@@ -136,6 +137,12 @@ Rectangle {
}
RoomContextMenu { id: roomContextMenu }
ScrollHelper {
anchors.fill: parent
flickable: parent
}
}
}
}

View File

@@ -77,6 +77,7 @@ Item {
displayMarginEnd: 40
verticalLayoutDirection: ListView.BottomToTop
spacing: 8
interactive: false
boundsBehavior: Flickable.DragOverBounds
@@ -156,6 +157,12 @@ Item {
}
}
ScrollHelper {
anchors.fill: parent
flickable: parent
}
RoundButton {
width: 64
height: 64