Commit e608cc51 authored by Ronan's avatar Ronan
Browse files

feat(ui/views/App/Main/Home): use new view

parent 97991f9b
<?xml version="1.0" encoding="UTF-8"?>
<svg width="147px" height="149px" viewBox="0 0 147 149" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>home_account_assistant</title>
<desc>Created with Sketch.</desc>
<defs>
<polygon id="path-1" points="0.0005 0.367 146.938 0.367 146.938 147.3059 0.0005 147.3059 0.0005 0.367"></polygon>
<path d="M0.184,27.531 C0.184,42.319 12.171,54.306 26.959,54.306 C41.748,54.306 53.733,42.319 53.733,27.531 C53.733,12.743 41.748,0.756 26.959,0.756 C12.171,0.756 0.184,12.743 0.184,27.531 Z" id="path-3"></path>
</defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="home_account_assistant">
<g id="Page-1">
<g id="Group-6" transform="translate(0.000000, 0.633000)">
<g id="Group-3">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-2"></g>
<path d="M146.9385,73.8369 C146.9385,114.4129 114.0455,147.3059 73.4695,147.3059 C32.8935,147.3059 0.0005,114.4129 0.0005,73.8369 C0.0005,33.2609 32.8935,0.3669 73.4695,0.3669 C114.0455,0.3669 146.9385,33.2609 146.9385,73.8369" id="Fill-1" fill="#4C5964" mask="url(#mask-2)"></path>
</g>
<path d="M73.6572,36.4761 C84.4452,36.4761 93.1902,45.3091 93.1902,56.2021 C93.1902,61.4161 91.1892,66.1561 87.9182,69.6821 C87.4592,70.1791 87.6382,70.0931 87.1292,70.5371 L87.9442,71.0911 C117.5522,84.1071 109.9582,105.9821 109.9582,105.9821 C90.8932,112.0871 73.6882,111.1451 73.6882,111.1451 L73.2532,111.1451 C73.2532,111.1451 56.0442,112.0871 36.9792,105.9821 C36.9792,105.9821 29.3892,84.1071 58.9952,71.0911 L59.8082,70.5371 C59.3012,70.0931 59.4822,70.1791 59.0232,69.6821 C55.7532,66.1561 53.7512,61.4161 53.7512,56.2021 C53.7512,45.3091 62.4952,36.4761 73.2832,36.4761 L73.6572,36.4761 Z" id="Fill-4" fill="#FEFEFE"></path>
</g>
<g id="Group-9" transform="translate(82.000000, 93.633000)">
<mask id="mask-4" fill="white">
<use xlink:href="#path-3"></use>
</mask>
<g id="Clip-8"></g>
<polygon id="Fill-7" fill="#EB601D" mask="url(#mask-4)" points="-6.51 61 60.427 61 60.427 -5.938 -6.51 -5.938"></polygon>
</g>
<path d="M124.959,124.5261 L124.959,117.7991 L122.072,117.7991 C121.751,116.5611 121.258,115.3911 120.618,114.3151 L122.661,112.2831 L117.882,107.5271 L115.839,109.5601 C114.758,108.9241 113.583,108.4301 112.336,108.1131 L112.336,105.2421 L105.579,105.2421 L105.579,108.1131 C104.332,108.4301 103.157,108.9241 102.076,109.5601 L100.034,107.5271 L95.255,112.2831 L97.298,114.3151 C96.659,115.3911 96.162,116.5611 95.842,117.7991 L92.958,117.7991 L92.958,124.5261 L95.842,124.5261 C96.162,125.7661 96.659,126.9361 97.296,128.0121 L95.255,130.0451 L100.034,134.8001 L102.076,132.7681 C103.157,133.4031 104.332,133.8961 105.579,134.2151 L105.579,137.0861 L112.336,137.0861 L112.336,134.2151 C113.583,133.8961 114.758,133.4031 115.839,132.7681 L117.882,134.8001 L122.661,130.0451 L120.618,128.0121 C121.258,126.9361 121.753,125.7661 122.072,124.5261 L124.959,124.5261 Z M101.787,121.1641 C101.787,125.1051 104.998,128.2991 108.958,128.2991 C112.916,128.2991 116.128,125.1051 116.128,121.1641 C116.128,117.2251 112.916,114.0281 108.958,114.0281 C104.998,114.0281 101.787,117.2251 101.787,121.1641 Z" id="Stroke-10" stroke="#FEFEFE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="147px" height="149px" viewBox="0 0 147 149" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>home_invite_friends</title>
<desc>Created with Sketch.</desc>
<defs>
<polygon id="path-1" points="0 73.83645 0 0.367 146.939 0.367 146.939 147.3059 0 147.3059 0 73.83645"></polygon>
<path d="M0.706,27.531 C0.706,42.319 12.693,54.306 27.481,54.306 C42.27,54.306 54.256,42.319 54.256,27.531 C54.256,12.743 42.27,0.756 27.481,0.756 C12.693,0.756 0.706,12.743 0.706,27.531 Z" id="path-3"></path>
</defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="home_invite_friends">
<g id="Page-1">
<g id="Group-10" transform="translate(0.000000, 0.633000)">
<g id="Group-3">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-2"></g>
<path d="M146.939,73.8369 C146.939,114.4129 114.046,147.3059 73.47,147.3059 C32.894,147.3059 0,114.4129 0,73.8369 C0,33.2609 32.894,0.3669 73.47,0.3669 C114.046,0.3669 146.939,33.2609 146.939,73.8369" id="Fill-1" fill="#4C5964" mask="url(#mask-2)"></path>
</g>
<path d="M99.1147,27.2358 C107.4457,27.2358 114.1997,34.0568 114.1997,42.4698 C114.1997,46.4958 112.6527,50.1558 110.1287,52.8798 C109.7747,53.2638 109.9117,53.1968 109.5167,53.5408 L110.1467,53.9678 C133.0127,64.0208 127.1497,80.9138 127.1497,80.9138 C112.4257,85.6288 99.1367,84.9018 99.1367,84.9018 L98.8027,84.9018 C98.8027,84.9018 85.5107,85.6288 70.7887,80.9138 C70.7887,80.9138 64.9267,64.0208 87.7907,53.9678 L88.4197,53.5408 C88.0267,53.1968 88.1667,53.2638 87.8127,52.8798 C85.2857,50.1558 83.7417,46.4958 83.7417,42.4698 C83.7417,34.0568 90.4937,27.2358 98.8267,27.2358 L99.1147,27.2358 Z" id="Fill-4" fill="#96A5B1"></path>
<path d="M48.1147,27.2358 C56.4457,27.2358 63.1997,34.0568 63.1997,42.4698 C63.1997,46.4958 61.6527,50.1558 59.1287,52.8798 C58.7747,53.2638 58.9117,53.1968 58.5167,53.5408 L59.1467,53.9678 C82.0127,64.0208 76.1497,80.9138 76.1497,80.9138 C61.4257,85.6288 48.1367,84.9018 48.1367,84.9018 L47.8027,84.9018 C47.8027,84.9018 34.5107,85.6288 19.7887,80.9138 C19.7887,80.9138 13.9267,64.0208 36.7907,53.9678 L37.4197,53.5408 C37.0267,53.1968 37.1667,53.2638 36.8127,52.8798 C34.2857,50.1558 32.7417,46.4958 32.7417,42.4698 C32.7417,34.0568 39.4937,27.2358 47.8267,27.2358 L48.1147,27.2358 Z" id="Fill-6" fill="#96A5B1"></path>
<path d="M73.6577,35.395 C84.4457,35.395 93.1907,44.228 93.1907,55.121 C93.1907,60.335 91.1897,65.075 87.9187,68.601 C87.4597,69.098 87.6387,69.012 87.1297,69.456 L87.9447,70.01 C117.5527,83.026 109.9587,104.901 109.9587,104.901 C90.8937,111.006 73.6887,110.064 73.6887,110.064 L73.2537,110.064 C73.2537,110.064 56.0447,111.006 36.9797,104.901 C36.9797,104.901 29.3897,83.026 58.9957,70.01 L59.8087,69.456 C59.3017,69.012 59.4827,69.098 59.0237,68.601 C55.7537,65.075 53.7517,60.335 53.7517,55.121 C53.7517,44.228 62.4957,35.395 73.2837,35.395 L73.6577,35.395 Z" id="Fill-8" fill="#FEFEFE"></path>
</g>
<g id="Group-13" transform="translate(89.000000, 93.633000)">
<mask id="mask-4" fill="white">
<use xlink:href="#path-3"></use>
</mask>
<g id="Clip-12"></g>
<polygon id="Fill-11" fill="#EB601D" mask="url(#mask-4)" points="-5.988 61 60.949 61 60.949 -5.938 -5.988 -5.938"></polygon>
</g>
<g id="Group-18" transform="translate(100.000000, 109.633000)" stroke="#FEFEFE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M32.2954,21.7427 C32.2954,22.1537 31.9614,22.4867 31.5514,22.4867 L1.4104,22.4867 C0.9994,22.4867 0.6664,22.1537 0.6664,21.7427 L0.6664,1.3197 C0.6664,0.9087 0.9994,0.5747 1.4104,0.5747 L31.5514,0.5747 C31.9614,0.5747 32.2954,0.9087 32.2954,1.3197 L32.2954,21.7427 Z" id="Stroke-14"></path>
<polyline id="Stroke-16" points="32.2026 1.5024 16.4806 17.2254 0.7576 1.5024"></polyline>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="147px" height="149px" viewBox="0 0 147 149" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>home_use_linphone</title>
<desc>Created with Sketch.</desc>
<defs>
<polygon id="path-1" points="0 73.8367 0 0.367 146.939 0.367 146.939 147.3064 0 147.3064 0 73.8367"></polygon>
<path d="M0.247,27.531 C0.247,42.319 12.235,54.306 27.023,54.306 C41.811,54.306 53.797,42.319 53.797,27.531 C53.797,12.743 41.811,0.756 27.023,0.756 C12.235,0.756 0.247,12.743 0.247,27.531 Z" id="path-3"></path>
</defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="home_use_linphone">
<g id="Page-1">
<g id="Group-6" transform="translate(0.000000, 0.633000)">
<g id="Group-3">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-2"></g>
<path d="M146.939,73.8364 C146.939,114.4124 114.045,147.3064 73.47,147.3064 C32.894,147.3064 0,114.4124 0,73.8364 C0,33.2604 32.894,0.3664 73.47,0.3664 C114.045,0.3664 146.939,33.2604 146.939,73.8364" id="Fill-1" fill="#4C5964" mask="url(#mask-2)"></path>
</g>
<path d="M66.0894,44.0962 C64.2094,42.6172 63.2694,40.2382 63.2694,36.9562 C63.2694,33.6772 64.2094,31.2972 66.0894,29.8172 C67.9684,28.3372 70.5484,27.5962 73.8294,27.5962 C77.1094,27.5962 79.6894,28.3372 81.5694,29.8172 C83.4484,31.2972 84.3894,33.6772 84.3894,36.9562 C84.3894,40.2382 83.4484,42.6172 81.5694,44.0962 C79.6894,45.5772 77.1094,46.3172 73.8294,46.3172 C70.5484,46.3172 67.9684,45.5772 66.0894,44.0962 L66.0894,44.0962 Z M56.1894,109.1972 L60.9894,106.5572 C62.2684,105.9172 63.0684,105.0572 63.3894,103.9772 C63.7084,102.8972 63.8694,100.7962 63.8694,97.6762 L63.8694,67.9162 C63.8694,65.8372 63.7084,64.4172 63.3894,63.6572 C63.0684,62.8972 62.2294,62.1572 60.8694,61.4372 L56.1894,59.1572 L56.1894,56.2772 L81.8694,53.0362 L83.0694,54.2372 L83.0694,97.6762 C83.0694,100.7962 83.2294,102.8972 83.5494,103.9772 C83.8684,105.0572 84.6694,105.9172 85.9494,106.5572 L90.7494,109.1972 L90.7494,112.0762 L56.1894,112.0762 L56.1894,109.1972 Z" id="Fill-4" fill="#FEFEFE"></path>
</g>
<g id="Group-9" transform="translate(88.000000, 93.633000)">
<mask id="mask-4" fill="white">
<use xlink:href="#path-3"></use>
</mask>
<g id="Clip-8"></g>
<polygon id="Fill-7" fill="#EB601D" mask="url(#mask-4)" points="-6.446 61 60.491 61 60.491 -5.938 -6.446 -5.938"></polygon>
</g>
<path d="M128.5508,126.5666 C128.5508,128.3316 127.1198,129.7626 125.3558,129.7626 L120.2228,129.7626 L117.1738,136.7326 L112.8188,129.7626 L104.6888,129.7626 C102.9228,129.7626 101.4918,128.3316 101.4918,126.5666 L101.4918,113.7916 C101.4918,112.0256 102.9228,110.5956 104.6888,110.5956 L125.3558,110.5956 C127.1198,110.5956 128.5508,112.0256 128.5508,113.7916 L128.5508,126.5666 Z" id="Stroke-10" stroke="#FEFEFE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -345,23 +345,59 @@ Server url not configured.</translation>
<name>Home</name>
<message>
<source>invitContactQuestion</source>
<translation>Are your friends already know Linphone?</translation>
<translation type="vanished">Are your friends already know Linphone?</translation>
</message>
<message>
<source>invitContact</source>
<translation>INVIT YOUR FRIENDS</translation>
<translation type="vanished">INVIT YOUR FRIENDS</translation>
</message>
<message>
<source>addContactQuestion</source>
<translation>Quickly add your contacts in your notebook.</translation>
<translation type="vanished">Quickly add your contacts in your notebook.</translation>
</message>
<message>
<source>addContact</source>
<translation>ADD CONTACTS</translation>
<translation type="vanished">ADD CONTACTS</translation>
</message>
<message>
<source>displayTooltip</source>
<translation>Display tooltips to discover Linphone Desktop</translation>
<translation type="vanished">Display tooltips to discover Linphone Desktop</translation>
</message>
<message>
<source>howToDescription</source>
<translation>Need help on how to use Linphone?</translation>
</message>
<message>
<source>howToTitle</source>
<translation>HOW TO USE LINPHONE</translation>
</message>
<message>
<source>inviteDescription</source>
<translation>Invite your friends on Linphone.</translation>
</message>
<message>
<source>inviteTitle</source>
<translation>INVITE YOUR FRIENDS</translation>
</message>
<message>
<source>accountAssistantDescription</source>
<translation>Create or manage your Linphone account.</translation>
</message>
<message>
<source>accountAssistantTitle</source>
<translation>ACCOUNT ASSISTANT</translation>
</message>
<message>
<source>assistantButton</source>
<translation>ASSISTANT</translation>
</message>
<message>
<source>showTooltips</source>
<translation>Show tooltips</translation>
</message>
<message>
<source>inviteButton</source>
<translation>INVITE</translation>
</message>
</context>
<context>
......
......@@ -333,23 +333,59 @@ Url du serveur non configurée.</translation>
<name>Home</name>
<message>
<source>invitContactQuestion</source>
<translation>Vos amis connaissent-ils déjà Linphone ?</translation>
<translation type="vanished">Vos amis connaissent-ils déjà Linphone ?</translation>
</message>
<message>
<source>invitContact</source>
<translation>INVITER VOS AMIS</translation>
<translation type="vanished">INVITER VOS AMIS</translation>
</message>
<message>
<source>addContactQuestion</source>
<translation>Ajouter vos contacts dans votre carnet d&apos;adresses.</translation>
<translation type="vanished">Ajouter vos contacts dans votre carnet d&apos;adresses.</translation>
</message>
<message>
<source>addContact</source>
<translation>AJOUTER CONTACTS</translation>
<translation type="vanished">AJOUTER CONTACTS</translation>
</message>
<message>
<source>displayTooltip</source>
<translation>Afficher les tooltips pour découvrir Linphone Desktop</translation>
<translation type="vanished">Afficher les tooltips pour découvrir Linphone Desktop</translation>
</message>
<message>
<source>howToDescription</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>howToTitle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>inviteDescription</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>inviteTitle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>accountAssistantDescription</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>accountAssistantTitle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>assistantButton</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>showTooltips</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>inviteButton</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
......
......@@ -94,8 +94,11 @@
<file>assets/images/history_normal.svg</file>
<file>assets/images/history_pressed.svg</file>
<file>assets/images/history.svg</file>
<file>assets/images/home_account_assistant.svg</file>
<file>assets/images/home_invite_friends.svg</file>
<file>assets/images/home_normal.svg</file>
<file>assets/images/home_selected.svg</file>
<file>assets/images/home_use_linphone.svg</file>
<file>assets/images/incoming_call.svg</file>
<file>assets/images/led_green.svg</file>
<file>assets/images/led_orange.svg</file>
......@@ -253,6 +256,7 @@
<file>ui/modules/Linphone/Account/AccountStatus.qml</file>
<file>ui/modules/Linphone/Calls/CallControls.qml</file>
<file>ui/modules/Linphone/Calls/Calls.qml</file>
<file>ui/modules/Linphone/CardBlock.qml</file>
<file>ui/modules/Linphone/Chat/Chat.qml</file>
<file>ui/modules/Linphone/Chat/Event.qml</file>
<file>ui/modules/Linphone/Chat/FileMessage.qml</file>
......@@ -274,6 +278,7 @@
<file>ui/modules/Linphone/Styles/Account/AccountStatusStyle.qml</file>
<file>ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml</file>
<file>ui/modules/Linphone/Styles/Calls/CallsStyle.qml</file>
<file>ui/modules/Linphone/Styles/CardBlockStyle.qml</file>
<file>ui/modules/Linphone/Styles/ChatStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/AvatarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml</file>
......@@ -319,6 +324,7 @@
<file>ui/views/App/Styles/Main/ContactEditStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactsStyle.qml</file>
<file>ui/views/App/Styles/Main/ConversationStyle.qml</file>
<file>ui/views/App/Styles/Main/HomeStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowMenuBarStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
<file>ui/views/App/Styles/qmldir</file>
......
......@@ -8,14 +8,22 @@ import Common 1.0
ListView {
id: listView
ScrollBar.horizontal: ForceScrollBar {
id: hScrollBar
onPressedChanged: pressed ? listView.movementStarted() : listView.movementEnded()
}
ScrollBar.vertical: ForceScrollBar {
id: scrollBar
id: vScrollBar
onPressedChanged: pressed ? listView.movementStarted() : listView.movementEnded()
}
boundsBehavior: Flickable.StopAtBounds
clip: true
contentWidth: width - scrollBar.width
contentWidth: vScrollBar.visible ? width - vScrollBar.width : width
contentHeight: hScrollBar.visible ? height - hScrollBar.height : height
spacing: 0
}
import QtQuick 2.7
import Common 1.0
import Linphone.Styles 1.0
// =============================================================================
Column {
default property alias _content: content.data
property alias icon: icon.icon
property alias title: title.text
property alias description: description.text
// ---------------------------------------------------------------------------
spacing: CardBlockStyle.spacing
width: CardBlockStyle.width
Icon {
id: icon
iconSize: CardBlockStyle.icon.size
height: CardBlockStyle.icon.size + CardBlockStyle.icon.bottomMargin
width: parent.width
}
Column {
width: parent.width
spacing: CardBlockStyle.title.bottomMargin
Text {
id: title
color: CardBlockStyle.title.color
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font {
bold: true
pointSize: CardBlockStyle.title.fontSize
}
height: CardBlockStyle.title.height
width: parent.width
}
Text {
id: description
color: CardBlockStyle.description.color
elide: Text.ElideRight
font.pointSize: CardBlockStyle.description.fontSize
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
height: CardBlockStyle.description.height
width: parent.width
}
}
// ---------------------------------------------------------------------------
Item {
id: content
height: CardBlockStyle.content.height
width: parent.width
}
}
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property int spacing: 30
property int width: 200
property QtObject content: QtObject {
property int height: 40
}
property QtObject description: QtObject {
property color color: Colors.w
property int fontSize: 9
property int height: 40
}
property QtObject icon: QtObject {
property int bottomMargin: 20
property int size: 148
}
property QtObject title: QtObject {
property color color: Colors.j
property int bottomMargin: 10
property int fontSize: 9
property int height: 20
}
}
......@@ -6,6 +6,8 @@ module Linphone.Style
singleton AccountStatusStyle 1.0 Account/AccountStatusStyle.qml
singleton CardBlockStyle 1.0 CardBlockStyle.qml
singleton ChatStyle 1.0 ChatStyle.qml
singleton CallsStyle 1.0 Calls/CallsStyle.qml
......
......@@ -9,6 +9,9 @@ module Linphone
# Account
AccountStatus 1.0 Account/AccountStatus.qml
# CardBlock
CardBlock 1.0 CardBlock.qml
# Calls
Calls 1.0 Calls/Calls.qml
......
......@@ -9,6 +9,6 @@
// Returns the username of a contact object or URI string.
function getContactUsername (contact) {
return Utils.isString(contact)
? contact.substring(4, contact.indexOf('@')) // 4 = length("sip:")
? contact.substring(4, contact.indexOf('@')) // 4 = length('sip:')
: contact.vcard.username
}
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import App.Styles 1.0
// =============================================================================
ColumnLayout {
spacing: 0
ColumnLayout {
Layout.alignment: Qt.AlignTop
Layout.fillHeight: true
Layout.fillWidth: true
Layout.leftMargin: 50
Layout.topMargin: 50
spacing: 30
// Invit friends.
Column {
spacing: 8
Text {
color: '#5A585B'
font.bold: true
font.pointSize: 11
text: qsTr('invitContactQuestion')
}
Rectangle {
color: HomeStyle.color
TextButtonB {
text: qsTr('invitContact')
}
ScrollableListView {
anchors.horizontalCenter: parent.horizontalCenter
orientation: ListView.Horizontal
spacing: HomeStyle.spacing
height: parent.height
width: {
var width = CardBlockStyle.width * count + (count - 1) * spacing
return parent.width < width ? parent.width : width
}
// Add contacts.
Column {
spacing: 8
model: ListModel {
ListElement {
$component: 'checkBox'
$componentText: qsTr('showTooltips')
$description: qsTr('howToDescription')
$icon: 'home_use_linphone'
$title: qsTr('howToTitle')
}
Text {
color: '#5A585B'
font.bold: true
font.pointSize: 11
text: qsTr('addContactQuestion')
ListElement {
$component: 'button'
$componentText: qsTr('inviteButton')
$description: qsTr('inviteDescription')
$icon: 'home_invite_friends'
$title: qsTr('inviteTitle')
}
TextButtonB {
text: qsTr('addContact')
ListElement {
$component: 'button'
$componentText: qsTr('assistantButton')
$description: qsTr('accountAssistantDescription')
$icon: 'home_account_assistant'
$title: qsTr('accountAssistantTitle')
}
}
}
// Tooltip checkbox area.
CheckBoxText {
Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
Layout.leftMargin: 50
Layout.preferredHeight: 70
delegate: CardBlock {
anchors.verticalCenter: parent.verticalCenter
description: $description
icon: $icon
title: $title
text: qsTr('displayTooltip')
Loader {
Component {
id: button
TextButtonB {
text: $componentText
}
}
Component {
id: checkBox
CheckBoxText {
text: $componentText
}
}
anchors.horizontalCenter: parent.horizontalCenter
sourceComponent: $component === 'button' ? button : checkBox
}
}
}
}
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property color color: Colors.k
property int spacing: 20
}
......@@ -10,6 +10,7 @@ singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml