Commit 1def519d authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): use `ScrollableListView` instead of `ListView`

parent 617e795a
......@@ -4,15 +4,9 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/image'
import 'qrc:/ui/components/scrollBar'
ListView {
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 0
import 'qrc:/ui/components/view'
ScrollableListView {
model: ListModel {
ListElement { $dateSection: 1465389121000; $outgoing: true; $timestamp: 1465389121000; $type: 'message'; $content: 'This is it: fefe efzzzzzzzzzz aaaaaaaaa erfeezffeefzfzefzefzezfefez wfef efef e efeffefe fee efefefeefef fefefefefe eff fefefe fefeffww.linphone.org' }
ListElement { $dateSection: 1465389121000; $timestamp: 1465389121000; $type: 'event'; $content: 'incoming_call' }
......
......@@ -4,7 +4,7 @@ import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
import 'qrc:/ui/components/view'
import 'qrc:/ui/style'
Rectangle {
......@@ -30,14 +30,9 @@ Rectangle {
anchors.fill: parent
id: listContainer
ListView {
ScrollBar.vertical: ForceScrollBar { }
ScrollableListView {
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: list
spacing: 0
height: console.log(model.count) || count
// TODO: Remove, use C++ model instead.
......
......@@ -4,6 +4,7 @@ import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
// TODO: Contacts list.
Item {
......@@ -40,13 +41,9 @@ Item {
visible: false
width: parent.width
ListView {
ScrollableListView {
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: contactsList
spacing: 0
// TODO: Remove, use C++ model instead.
model: ListModel {
......
......@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/image'
import 'qrc:/ui/components/scrollBar'
import 'qrc:/ui/components/view'
ColumnLayout {
id: item
......@@ -34,14 +34,9 @@ ColumnLayout {
color: '#DEDEDE'
}
ListView {
ScrollableListView {
Layout.fillHeight: true
Layout.fillWidth: true
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 0
model: item.model
......
......@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
import 'qrc:/ui/components/view'
import 'qrc:/ui/scripts/utils.js' as Utils
......@@ -55,12 +55,8 @@ ColumnLayout {
Layout.fillHeight: true
color: '#F5F5F5'
ListView {
ScrollBar.vertical: ForceScrollBar { }
ScrollableListView {
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 2
// TODO: Remove, use C++ model instead.
......
......@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
import 'qrc:/ui/components/view'
DialogPlus {
descriptionText: qsTr('manageAccountsDescription')
......@@ -20,14 +20,9 @@ DialogPlus {
anchors.fill: parent
// TODO: Compute list max.
ListView {
ScrollBar.vertical: ForceScrollBar { }
ScrollableListView {
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: accountsList
spacing: 0
// TODO: Remove, use C++ model instead.
model: ListModel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment