Commit 8c2943d6 authored by Wescoeur's avatar Wescoeur

fix(Dialogs): fix left and right margin in one unique file

parent 637e31ad
...@@ -448,10 +448,10 @@ ...@@ -448,10 +448,10 @@
<file>ui/views/App/Styles/Main/InviteFriendsStyle.qml</file> <file>ui/views/App/Styles/Main/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file> <file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
<file>ui/views/App/Styles/qmldir</file> <file>ui/views/App/Styles/qmldir</file>
<file>ui/views/App/Styles/Settings/Dialogs/SettingsSipAccountsEditStyle.qml</file>
<file>ui/views/App/Styles/Settings/Dialogs/SettingsVideoPreviewStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsAdvancedStyle.qml</file> <file>ui/views/App/Styles/Settings/SettingsAdvancedStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsAudioStyle.qml</file> <file>ui/views/App/Styles/Settings/SettingsAudioStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsSipAccountsEditStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsVideoPreviewStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file> <file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
<file>ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml</file> <file>ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml</file>
</qresource> </qresource>
......
...@@ -19,8 +19,8 @@ Item { ...@@ -19,8 +19,8 @@ Item {
anchors { anchors {
fill: parent fill: parent
leftMargin: DialogStyle.leftMargin leftMargin: DialogStyle.description.leftMargin
rightMargin: DialogStyle.rightMargin rightMargin: DialogStyle.description.rightMargin
} }
color: DialogStyle.description.color color: DialogStyle.description.color
......
...@@ -69,6 +69,8 @@ Rectangle { ...@@ -69,6 +69,8 @@ Rectangle {
Layout.fillHeight: !dialog.contentIsEmpty Layout.fillHeight: !dialog.contentIsEmpty
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: DialogStyle.content.leftMargin
Layout.rightMargin: DialogStyle.content.rightMargin
} }
Row { Row {
...@@ -79,7 +81,7 @@ Rectangle { ...@@ -79,7 +81,7 @@ Rectangle {
: Qt.AlignLeft : Qt.AlignLeft
Layout.bottomMargin: DialogStyle.buttons.bottomMargin Layout.bottomMargin: DialogStyle.buttons.bottomMargin
Layout.leftMargin: !centeredButtons Layout.leftMargin: !centeredButtons
? DialogStyle.leftMargin ? DialogStyle.buttons.leftMargin
: undefined : undefined
Layout.topMargin: DialogStyle.buttons.topMargin Layout.topMargin: DialogStyle.buttons.topMargin
spacing: DialogStyle.buttons.spacing spacing: DialogStyle.buttons.spacing
......
...@@ -9,11 +9,9 @@ import Units 1.0 ...@@ -9,11 +9,9 @@ import Units 1.0
QtObject { QtObject {
property color color: Colors.k property color color: Colors.k
property int leftMargin: 50
property int rightMargin: 50
property QtObject buttons: QtObject { property QtObject buttons: QtObject {
property int bottomMargin: 15 property int bottomMargin: 15
property int leftMargin: 50
property int spacing: 20 property int spacing: 20
property int topMargin: 15 property int topMargin: 15
} }
...@@ -23,9 +21,16 @@ QtObject { ...@@ -23,9 +21,16 @@ QtObject {
property int width: 400 property int width: 400
} }
property QtObject content: QtObject {
property int leftMargin: 25
property int rightMargin: 25
}
property QtObject description: QtObject { property QtObject description: QtObject {
property color color: Colors.j property color color: Colors.j
property int leftMargin: 50
property int pointSize: Units.dp * 11 property int pointSize: Units.dp * 11
property int rightMargin: 50
property int verticalMargin: 25 property int verticalMargin: 25
} }
} }
...@@ -11,14 +11,13 @@ ...@@ -11,14 +11,13 @@
// Returns the username of a contact/sipAddressObserver object or URI string. // Returns the username of a contact/sipAddressObserver object or URI string.
function getContactUsername (contact) { function getContactUsername (contact) {
var object = contact.contact || // Contact object from `SipAddressObserver`. var object = contact.contact || // Contact object from `SipAddressObserver`.
(contact.vcard && contact) || // Contact object. (contact.vcard && contact) // Contact object.
(contact.sipAddress) || // String from `SipAddressObserver`.
contact // String.
if (Utils.isString(object)) { if (object) {
var index = object.indexOf('@') return object.vcard.username
return object.substring(4, index !== -1 ? index : undefined) // 4 = length('sip:')
} }
return object.vcard.username object = contact.sipAddress || contact // String from `SipAddressObserver` or just a String.
var index = object.indexOf('@')
return object.substring(4, index !== -1 ? index : undefined) // 4 = length('sip:')
} }
...@@ -26,12 +26,7 @@ DialogPlus { ...@@ -26,12 +26,7 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ColumnLayout { ColumnLayout {
anchors { anchors.fill: parent
fill: parent
leftMargin: CallSipAddressStyle.leftMargin
rightMargin: CallSipAddressStyle.rightMargin
}
spacing: 0 spacing: 0
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -36,12 +36,7 @@ DialogPlus { ...@@ -36,12 +36,7 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ColumnLayout { ColumnLayout {
anchors { anchors.fill: parent
fill: parent
leftMargin: CallTransferStyle.leftMargin
rightMargin: CallTransferStyle.rightMargin
}
spacing: 0 spacing: 0
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -40,12 +40,7 @@ DialogPlus { ...@@ -40,12 +40,7 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
RowLayout { RowLayout {
anchors { anchors.fill: parent
fill: parent
leftMargin: ConferenceManagerStyle.leftMargin
rightMargin: ConferenceManagerStyle.rightMargin
}
spacing: 0 spacing: 0
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
...@@ -104,9 +99,9 @@ DialogPlus { ...@@ -104,9 +99,9 @@ DialogPlus {
Rectangle { Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.leftMargin: ConferenceManagerStyle.leftMargin Layout.leftMargin: ConferenceManagerStyle.columns.separator.leftMargin
Layout.preferredWidth: ConferenceManagerStyle.columns.separator.width Layout.preferredWidth: ConferenceManagerStyle.columns.separator.width
Layout.rightMargin: ConferenceManagerStyle.rightMargin Layout.rightMargin: ConferenceManagerStyle.columns.separator.rightMargin
color: ConferenceManagerStyle.columns.separator.color color: ConferenceManagerStyle.columns.separator.color
} }
......
...@@ -24,12 +24,7 @@ DialogPlus { ...@@ -24,12 +24,7 @@ DialogPlus {
width: AboutStyle.width width: AboutStyle.width
Column { Column {
anchors { anchors.fill: parent
fill: parent
leftMargin: AboutStyle.leftMargin
rightMargin: AboutStyle.rightMargin
}
spacing: AboutStyle.spacing spacing: AboutStyle.spacing
RowLayout { RowLayout {
......
...@@ -43,15 +43,9 @@ DialogPlus { ...@@ -43,15 +43,9 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Form { Form {
anchors.fill: parent
orientation: Qt.Vertical orientation: Qt.Vertical
anchors {
left: parent.left
leftMargin: AuthenticationRequestStyle.leftMargin
right: parent.right
rightMargin: AuthenticationRequestStyle.rightMargin
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('identityLabel') label: qsTr('identityLabel')
......
...@@ -25,15 +25,9 @@ DialogPlus { ...@@ -25,15 +25,9 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Form { Form {
anchors.fill: parent
orientation: Qt.Vertical orientation: Qt.Vertical
anchors {
left: parent.left
leftMargin: ManageAccountsStyle.leftMargin
right: parent.right
rightMargin: ManageAccountsStyle.rightMargin
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('selectPresenceLabel') label: qsTr('selectPresenceLabel')
......
...@@ -43,12 +43,7 @@ DialogPlus { ...@@ -43,12 +43,7 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Form { Form {
anchors { anchors.fill: parent
left: parent.left
leftMargin: SettingsSipAccountsEditStyle.leftMargin
right: parent.right
rightMargin: SettingsSipAccountsEditStyle.rightMargin
}
FormLine { FormLine {
FormGroup { FormGroup {
......
...@@ -25,10 +25,6 @@ DialogPlus { ...@@ -25,10 +25,6 @@ DialogPlus {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
CameraPreview { CameraPreview {
anchors { anchors.fill: parent
fill: parent
leftMargin: SettingsVideoPreviewStyle.preview.leftMargin
rightMargin: SettingsVideoPreviewStyle.preview.rightMargin
}
} }
} }
...@@ -5,8 +5,6 @@ import QtQuick 2.7 ...@@ -5,8 +5,6 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 420 property int height: 420
property int leftMargin: 35
property int rightMargin: 35
property int spacing: 10 property int spacing: 10
property int width: 450 property int width: 450
} }
...@@ -5,8 +5,6 @@ import QtQuick 2.7 ...@@ -5,8 +5,6 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 420 property int height: 420
property int leftMargin: 35
property int rightMargin: 35
property int spacing: 10 property int spacing: 10
property int width: 450 property int width: 450
} }
...@@ -7,8 +7,6 @@ import Colors 1.0 ...@@ -7,8 +7,6 @@ import Colors 1.0
QtObject { QtObject {
property int height: 420 property int height: 420
property int leftMargin: 35
property int rightMargin: 35
property int width: 740 property int width: 740
property QtObject columns: QtObject { property QtObject columns: QtObject {
...@@ -18,6 +16,8 @@ QtObject { ...@@ -18,6 +16,8 @@ QtObject {
property QtObject separator: QtObject { property QtObject separator: QtObject {
property color color: Colors.c property color color: Colors.c
property int leftMargin: 25
property int rightMargin: 25
property int width: 1 property int width: 1
} }
} }
......
...@@ -8,8 +8,6 @@ import Units 1.0 ...@@ -8,8 +8,6 @@ import Units 1.0
QtObject { QtObject {
property int height: 225 property int height: 225
property int leftMargin: 25
property int rightMargin: 25
property int spacing: 20 property int spacing: 20
property int width: 400 property int width: 400
......
...@@ -5,7 +5,5 @@ import QtQuick 2.7 ...@@ -5,7 +5,5 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 416 property int height: 416
property int leftMargin: 35 property int width: 450
property int rightMargin: 35
property int width: 480
} }
...@@ -5,7 +5,5 @@ import QtQuick 2.7 ...@@ -5,7 +5,5 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 234 property int height: 234
property int leftMargin: 35 property int width: 450
property int rightMargin: 35
property int width: 480
} }
...@@ -5,7 +5,5 @@ import QtQuick 2.7 ...@@ -5,7 +5,5 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 550 property int height: 550
property int leftMargin: 35
property int rightMargin: 35
property int width: 600 property int width: 600
} }
...@@ -6,9 +6,4 @@ import QtQuick 2.7 ...@@ -6,9 +6,4 @@ import QtQuick 2.7
QtObject { QtObject {
property int height: 480 property int height: 480
property int width: 640 property int width: 640
property QtObject preview: QtObject {
property int leftMargin: 25
property int rightMargin: 25
}
} }
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
module App.Styles module App.Styles
# Views styles ----------------------------------------------------------------- # Views styles =================================================================
# Calls Window -----------------------------------------------------------------
singleton CallStyle 1.0 Calls/CallStyle.qml singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
...@@ -12,6 +14,8 @@ singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallS ...@@ -12,6 +14,8 @@ singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallS
singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
# Main Window ------------------------------------------------------------------
singleton ActivateLinphoneSipAccountWithEmailStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml singleton ActivateLinphoneSipAccountWithEmailStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
singleton ActivateLinphoneSipAccountWithPhoneNumberStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml singleton ActivateLinphoneSipAccountWithPhoneNumberStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
...@@ -31,10 +35,15 @@ singleton AboutStyle 1.0 Main/Dialogs/AboutS ...@@ -31,10 +35,15 @@ singleton AboutStyle 1.0 Main/Dialogs/AboutS
singleton AuthenticationRequestStyle 1.0 Main/Dialogs/AuthenticationRequestStyle.qml singleton AuthenticationRequestStyle 1.0 Main/Dialogs/AuthenticationRequestStyle.qml
singleton ManageAccountsStyle 1.0 Main/Dialogs/ManageAccountsStyle.qml singleton ManageAccountsStyle 1.0 Main/Dialogs/ManageAccountsStyle.qml
# Settings Window --------------------------------------------------------------
singleton SettingsAdvancedStyle 1.0 Settings/SettingsAdvancedStyle.qml singleton SettingsAdvancedStyle 1.0 Settings/SettingsAdvancedStyle.qml
singleton SettingsAudioStyle 1.0 Settings/SettingsAudioStyle.qml singleton SettingsAudioStyle 1.0 Settings/SettingsAudioStyle.qml
singleton SettingsSipAccountsEditStyle 1.0 Settings/SettingsSipAccountsEditStyle.qml
singleton SettingsVideoPreviewStyle 1.0 Settings/SettingsVideoPreviewStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SettingsSipAccountsEditStyle 1.0 Settings/Dialogs/SettingsSipAccountsEditStyle.qml
singleton SettingsVideoPreviewStyle 1.0 Settings/Dialogs/SettingsVideoPreviewStyle.qml
# SplashScreen Window ----------------------------------------------------------
singleton SplashScreenStyle 1.0 SplashScreen/SplashScreenStyle.qml singleton SplashScreenStyle 1.0 SplashScreen/SplashScreenStyle.qml
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