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 ...@@ -4,15 +4,9 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/image' import 'qrc:/ui/components/image'
import 'qrc:/ui/components/scrollBar' import 'qrc:/ui/components/view'
ListView {
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 0
ScrollableListView {
model: ListModel { 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; $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' } ListElement { $dateSection: 1465389121000; $timestamp: 1465389121000; $type: 'event'; $content: 'incoming_call' }
......
...@@ -4,7 +4,7 @@ import QtQuick.Controls 2.0 ...@@ -4,7 +4,7 @@ import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact' import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar' import 'qrc:/ui/components/view'
import 'qrc:/ui/style' import 'qrc:/ui/style'
Rectangle { Rectangle {
...@@ -30,14 +30,9 @@ Rectangle { ...@@ -30,14 +30,9 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
id: listContainer id: listContainer
ListView { ScrollableListView {
ScrollBar.vertical: ForceScrollBar { }
anchors.fill: parent anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: list id: list
spacing: 0
height: console.log(model.count) || count height: console.log(model.count) || count
// TODO: Remove, use C++ model instead. // TODO: Remove, use C++ model instead.
......
...@@ -4,6 +4,7 @@ import QtQuick.Controls 2.0 ...@@ -4,6 +4,7 @@ import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact' import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
// TODO: Contacts list. // TODO: Contacts list.
Item { Item {
...@@ -40,13 +41,9 @@ Item { ...@@ -40,13 +41,9 @@ Item {
visible: false visible: false
width: parent.width width: parent.width
ListView { ScrollableListView {
anchors.fill: parent anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: contactsList id: contactsList
spacing: 0
// TODO: Remove, use C++ model instead. // TODO: Remove, use C++ model instead.
model: ListModel { model: ListModel {
......
...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3 ...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact' import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/image' import 'qrc:/ui/components/image'
import 'qrc:/ui/components/scrollBar' import 'qrc:/ui/components/view'
ColumnLayout { ColumnLayout {
id: item id: item
...@@ -34,14 +34,9 @@ ColumnLayout { ...@@ -34,14 +34,9 @@ ColumnLayout {
color: '#DEDEDE' color: '#DEDEDE'
} }
ListView { ScrollableListView {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 0
model: item.model model: item.model
......
...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3 ...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact' import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar' import 'qrc:/ui/components/view'
import 'qrc:/ui/scripts/utils.js' as Utils import 'qrc:/ui/scripts/utils.js' as Utils
...@@ -55,12 +55,8 @@ ColumnLayout { ...@@ -55,12 +55,8 @@ ColumnLayout {
Layout.fillHeight: true Layout.fillHeight: true
color: '#F5F5F5' color: '#F5F5F5'
ListView { ScrollableListView {
ScrollBar.vertical: ForceScrollBar { }
anchors.fill: parent anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 2 spacing: 2
// TODO: Remove, use C++ model instead. // TODO: Remove, use C++ model instead.
......
...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3 ...@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
import 'qrc:/ui/components/dialog' import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar' import 'qrc:/ui/components/view'
DialogPlus { DialogPlus {
descriptionText: qsTr('manageAccountsDescription') descriptionText: qsTr('manageAccountsDescription')
...@@ -20,14 +20,9 @@ DialogPlus { ...@@ -20,14 +20,9 @@ DialogPlus {
anchors.fill: parent anchors.fill: parent
// TODO: Compute list max. // TODO: Compute list max.
ListView { ScrollableListView {
ScrollBar.vertical: ForceScrollBar { }
anchors.fill: parent anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
id: accountsList id: accountsList
spacing: 0
// TODO: Remove, use C++ model instead. // TODO: Remove, use C++ model instead.
model: ListModel { 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