From 2394b10eaa166ed203bd3f18f5f7baccf3297d03 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 6 Mar 2017 12:06:55 +0100 Subject: [PATCH] feat(ui/views/App/InviteFriends): refactoring, use vertical form --- .../ui/views/App/InviteFriends.qml | 61 ++++++------------- .../views/App/Styles/InviteFriendsStyle.qml | 10 +-- 2 files changed, 21 insertions(+), 50 deletions(-) diff --git a/linphone-desktop/ui/views/App/InviteFriends.qml b/linphone-desktop/ui/views/App/InviteFriends.qml index 6081c2cb8..0e1b91a79 100644 --- a/linphone-desktop/ui/views/App/InviteFriends.qml +++ b/linphone-desktop/ui/views/App/InviteFriends.qml @@ -1,5 +1,4 @@ import QtQuick 2.7 -import QtQuick.Layouts 1.3 import Common 1.0 @@ -36,68 +35,46 @@ DialogPlus { height: InviteFriendsStyle.height width: InviteFriendsStyle.width + maximumHeight: InviteFriendsStyle.height + maximumWidth: InviteFriendsStyle.width + minimumHeight: InviteFriendsStyle.height minimumWidth: InviteFriendsStyle.width // --------------------------------------------------------------------------- - ColumnLayout { + Form { anchors { fill: parent leftMargin: InviteFriendsStyle.leftMargin rightMargin: InviteFriendsStyle.rightMargin } - spacing: InviteFriendsStyle.spacing + orientation: Qt.Vertical - Column { - Layout.fillWidth: true - spacing: InviteFriendsStyle.input.spacing + FormLine { + FormGroup { + label: qsTr('enterEmailLabel') - Text { - color: InviteFriendsStyle.input.legend.color - elide: Text.ElideRight + TextField { + id: email - font { - bold: true - pointSize: InviteFriendsStyle.input.legend.fontSize + inputMethodHints: Qt.ImhEmailCharactersOnly + width: parent.width } - - text: qsTr('enterEmailLabel') - } - - TextField { - id: email - - inputMethodHints: Qt.ImhEmailCharactersOnly - width: parent.width } } - ColumnLayout { - Layout.fillHeight: true - Layout.fillWidth: true - spacing: InviteFriendsStyle.input.spacing + FormLine { + FormGroup { + label: qsTr('messageLabel') - Text { - color: InviteFriendsStyle.input.legend.color - elide: Text.ElideRight + TextAreaField { + id: message - font { - bold: true - pointSize: InviteFriendsStyle.input.legend.fontSize + height: InviteFriendsStyle.message.height + text: qsTr('defaultMessage') } - - text: qsTr('messageLabel') - } - - TextAreaField { - id: message - - Layout.fillHeight: true - Layout.fillWidth: true - - text: qsTr('defaultMessage') } } } diff --git a/linphone-desktop/ui/views/App/Styles/InviteFriendsStyle.qml b/linphone-desktop/ui/views/App/Styles/InviteFriendsStyle.qml index 588ad362c..27b49ba84 100644 --- a/linphone-desktop/ui/views/App/Styles/InviteFriendsStyle.qml +++ b/linphone-desktop/ui/views/App/Styles/InviteFriendsStyle.qml @@ -9,15 +9,9 @@ QtObject { property int height: 316 property int leftMargin: 35 property int rightMargin: 35 - property int spacing: 15 property int width: 480 - property QtObject input: QtObject { - property int spacing: 6 - - property QtObject legend: QtObject { - property color color: Colors.j - property int fontSize: 10 - } + property QtObject message: QtObject { + property int height: 140 } }