diff --git a/tests/ui/components/dialog/DialogPlus.qml b/tests/ui/components/dialog/DialogPlus.qml index 2f85f6e72..089870be4 100644 --- a/tests/ui/components/dialog/DialogPlus.qml +++ b/tests/ui/components/dialog/DialogPlus.qml @@ -19,6 +19,7 @@ Window { signal exitStatus (int status) // Derived class must use this function instead of close. + // Destroy the component and send signal to caller. function exit (status) { if (!_disableExitStatus) { _disableExitStatus = true @@ -52,19 +53,14 @@ Window { } // Buttons. - Item { - Layout.fillWidth: true - Layout.preferredHeight: DialogStyle.buttonsAreaHeight + Row { + id: buttons - Row { - id: buttons - - anchors.left: (!centeredButtons && parent.left) || undefined - anchors.centerIn: centeredButtons ? parent : undefined - anchors.leftMargin: DialogStyle.leftMargin - anchors.verticalCenter: (!centeredButtons && parent.verticalCenter) || undefined - spacing: DialogStyle.buttonsSpacing - } + Layout.alignment: (centeredButtons && Qt.AlignHCenter) || Qt.AlignLeft + Layout.bottomMargin: DialogStyle.buttons.bottomMargin + Layout.leftMargin: (!centeredButtons && DialogStyle.leftMargin) || undefined + Layout.topMargin: DialogStyle.buttons.topMargin + spacing: DialogStyle.buttons.spacing } } } diff --git a/tests/ui/components/image/Icon.qml b/tests/ui/components/image/Icon.qml index 67dd33fc4..9f5deb396 100644 --- a/tests/ui/components/image/Icon.qml +++ b/tests/ui/components/image/Icon.qml @@ -1,5 +1,7 @@ import QtQuick 2.7 +// =================================================================== + Image { property int iconSize property string icon diff --git a/tests/ui/components/timeline/Timeline.qml b/tests/ui/components/timeline/Timeline.qml index c5b7f84ca..96c2b306f 100644 --- a/tests/ui/components/timeline/Timeline.qml +++ b/tests/ui/components/timeline/Timeline.qml @@ -7,6 +7,10 @@ import 'qrc:/ui/components/image' import 'qrc:/ui/components/scrollBar' ColumnLayout { + id: item + + property var model + Row { Layout.preferredHeight: 35 spacing: 30 @@ -39,49 +43,7 @@ ColumnLayout { highlightRangeMode: ListView.ApplyRange spacing: 0 - // Replace by C++ class. - model: ListModel { - ListElement { - $presence: 'connected' - $sipAddress: 'jim.williams.zzzz.yyyy.kkkk.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'connected' - $sipAddress: 'toto.lala.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'disconnected' - $sipAddress: 'machin.truc.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'absent' - $sipAddress: 'hey.listen.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'do_not_disturb' - $sipAddress: 'valentin.cognito.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'do_not_disturb' - $sipAddress: 'charles.henri.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'disconnected' - $sipAddress: 'yesyes.nono.sip.linphone.org' - $username: 'Toto' - } - ListElement { - $presence: 'connected' - $sipAddress: 'nsa.sip.linphone.org' - $username: 'Toto' - } - } + model: item.model delegate: Contact { presence: $presence diff --git a/tests/ui/style/components/Dialog.qml b/tests/ui/style/components/Dialog.qml index 0b01f75e7..76b666b3d 100644 --- a/tests/ui/style/components/Dialog.qml +++ b/tests/ui/style/components/Dialog.qml @@ -2,19 +2,23 @@ pragma Singleton import QtQuick 2.7 QtObject { - property int buttonsAreaHeight: 60 - property int buttonsSpacing: 20 property int leftMargin: 50 property int rightMargin: 50 - property QtObject description: QtObject { - property int fontSize: 12 - property int height: 90 - property int minHeight: 25 + property QtObject buttons: QtObject { + property int bottomMargin: 15 + property int spacing: 20 + property int topMargin: 15 } property QtObject confirm: QtObject { property int height: 150 property int width: 370 } + + property QtObject description: QtObject { + property int fontSize: 12 + property int height: 90 + property int minHeight: 25 + } } diff --git a/tests/ui/views/mainWindow/mainWindow.qml b/tests/ui/views/mainWindow/mainWindow.qml index f41d7a025..f59e344d5 100644 --- a/tests/ui/views/mainWindow/mainWindow.qml +++ b/tests/ui/views/mainWindow/mainWindow.qml @@ -116,8 +116,50 @@ ApplicationWindow { Timeline { Layout.fillHeight: true Layout.fillWidth: true - } + model: ListModel { + ListElement { + $presence: 'connected' + $sipAddress: 'jim.williams.zzzz.yyyy.kkkk.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'connected' + $sipAddress: 'toto.lala.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'disconnected' + $sipAddress: 'machin.truc.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'absent' + $sipAddress: 'hey.listen.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'do_not_disturb' + $sipAddress: 'valentin.cognito.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'do_not_disturb' + $sipAddress: 'charles.henri.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'disconnected' + $sipAddress: 'yesyes.nono.sip.linphone.org' + $username: 'Toto' + } + ListElement { + $presence: 'connected' + $sipAddress: 'nsa.sip.linphone.org' + $username: 'Toto' + } + } + } // Logo. Rectangle { Layout.fillWidth: true diff --git a/tests/ui/views/manageAccounts.qml b/tests/ui/views/manageAccounts.qml index 2070b1c4a..090ea06f7 100644 --- a/tests/ui/views/manageAccounts.qml +++ b/tests/ui/views/manageAccounts.qml @@ -19,6 +19,7 @@ DialogPlus { Item { anchors.fill: parent + // TODO: Compute list max. ListView { ScrollBar.vertical: ForceScrollBar { } anchors.fill: parent