diff --git a/tests/ui/components/chat/Chat.qml b/tests/ui/components/chat/Chat.qml index ca0c6869d..45bddee1c 100644 --- a/tests/ui/components/chat/Chat.qml +++ b/tests/ui/components/chat/Chat.qml @@ -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' } diff --git a/tests/ui/components/popup/DropDownMenu.qml b/tests/ui/components/popup/DropDownMenu.qml index fd060d2d4..54edb200f 100644 --- a/tests/ui/components/popup/DropDownMenu.qml +++ b/tests/ui/components/popup/DropDownMenu.qml @@ -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. diff --git a/tests/ui/components/select/SelectContact.qml b/tests/ui/components/select/SelectContact.qml index b2a2cadc1..a5be782fb 100644 --- a/tests/ui/components/select/SelectContact.qml +++ b/tests/ui/components/select/SelectContact.qml @@ -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 { diff --git a/tests/ui/components/timeline/Timeline.qml b/tests/ui/components/timeline/Timeline.qml index 96c2b306f..73d2b8889 100644 --- a/tests/ui/components/timeline/Timeline.qml +++ b/tests/ui/components/timeline/Timeline.qml @@ -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 diff --git a/tests/ui/views/mainWindow/contacts.qml b/tests/ui/views/mainWindow/contacts.qml index 90644a199..4c670f158 100644 --- a/tests/ui/views/mainWindow/contacts.qml +++ b/tests/ui/views/mainWindow/contacts.qml @@ -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. diff --git a/tests/ui/views/manageAccounts.qml b/tests/ui/views/manageAccounts.qml index 090ea06f7..1bcf340eb 100644 --- a/tests/ui/views/manageAccounts.qml +++ b/tests/ui/views/manageAccounts.qml @@ -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 {