- Add load sip address model time debug.

- Add copy text banner
This commit is contained in:
Julien Wadel 2021-10-19 14:16:15 +02:00
parent f4c95cae50
commit aa745fa44c
25 changed files with 353 additions and 81 deletions

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="80"
height="80"
viewBox="0 0 80 80"
version="1.1"
id="svg12"
sodipodi:docname="menu_copy_text_light.svg"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs16" />
<sodipodi:namedview
id="namedview14"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="6.4191176"
inkscape:cx="21.887743"
inkscape:cy="29.599084"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
<g
fill="none"
fill-rule="evenodd"
id="g10"
transform="matrix(4.7763786,0,0,4.7058824,7,0)">
<g
fill="#ffffff"
fill-rule="nonzero"
id="g8">
<g
id="g6">
<g
id="g4">
<path
d="m 8.446,17 c 1.399,0 2.095,-0.716 2.095,-2.122 v -1.25 h 1.182 c 1.392,0 2.095,-0.716 2.095,-2.121 V 6.02 c 0,-0.83 -0.17,-1.358 -0.676,-1.878 L 9.73,0.676 C 9.25,0.182 8.682,0 7.96,0 H 5.371 C 3.98,0 3.277,0.716 3.277,2.122 v 1.25 H 2.095 C 0.703,3.372 0,4.082 0,5.493 v 9.385 C 0,16.291 0.696,17 2.095,17 h 6.35 z m 3.216,-4.46 H 10.541 V 9.602 c 0,-0.865 -0.102,-1.243 -0.642,-1.797 L 6.176,4.015 C 5.662,3.487 5.236,3.373 4.48,3.373 H 4.365 v -1.23 c 0,-0.669 0.358,-1.054 1.06,-1.054 h 2.987 v 3.466 c 0,0.784 0.379,1.155 1.156,1.155 h 3.162 v 5.777 c 0,0.676 -0.365,1.055 -1.068,1.055 z M 12.446,4.73 H 9.723 C 9.486,4.73 9.392,4.628 9.392,4.392 V 1.622 Z M 8.392,15.912 h -6.25 c -0.696,0 -1.054,-0.378 -1.054,-1.054 V 5.507 c 0,-0.662 0.358,-1.048 1.06,-1.048 h 2.217 v 3.92 c 0,0.85 0.432,1.276 1.27,1.276 h 3.818 v 5.203 c 0,0.676 -0.365,1.054 -1.061,1.054 z M 9.243,8.635 H 5.763 C 5.493,8.635 5.385,8.527 5.385,8.257 V 4.709 Z"
id="path2" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -456,10 +456,6 @@
<translation>Fejl ved fil overførsel.
Server url ikke konfigureret.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 indtaster</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ Server url ikke konfigureret.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Datei kann nicht gesendet werden.
Server URL ist nicht konfiguriert.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 schreibt gerade</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ Server URL ist nicht konfiguriert.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Unable to send file.
Server URL not configured.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 is typing</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ Server URL not configured.</translation>
<numerusform>%1 are typing</numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation>Copied to clipboard</translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation>Selection copied to clipboard</translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Imposible enviar fichero.
URL del servidor no configurada.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 está escribiendo</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ URL del servidor no configurada.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Impossible d&apos;envoyer un fichier.
URL du serveur non configurée.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 est en train d&apos;écrire</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ URL du serveur non configurée.</translation>
<numerusform>%1 sont en train d&apos;écrire</numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Nem sikerült elküldeni a fájlt.
A kiszolgáló URL-je nincs konfigurálva.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 gépel</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -467,6 +463,16 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
<numerusform>%1 éppen gépel</numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Impossibile inviare il file.
URL del server non configurato.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 sta scrivendo</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ URL del server non configurato.</translation>
<numerusform>%1 stanno scrivendo</numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>
URLが設定されていません</translation>
</message>
<message>
<source>isComposing</source>
<translation>: %1</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -467,6 +463,16 @@
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Nepavyko išsiųsti failą.
Nesukonfigūruotas serverio url.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 rašo</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -469,6 +465,16 @@ Nesukonfigūruotas serverio url.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Não foi possível enviar o arquivo.
URL do servidor não configurado.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 está a escrever</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ URL do servidor não configurado.</translation>
<numerusform>%1 estão digitando</numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Не удалось отправить файл.
Не настроен адрес сервера.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 печатает</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -469,6 +465,16 @@
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Det gick inte att skicka filen.
Serverwebbadressen är inte konfigurerad.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 skriver</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -468,6 +464,16 @@ Serverwebbadressen är inte konfigurerad.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Dosya gönderilemiyor.
Sunucu url&apos;si yapılandırılmadı.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 yazıyor</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -467,6 +463,16 @@ Sunucu url&apos;si yapılandırılmadı.</translation>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>Не вдалося відіслати файл.
Не налаштовано адресу сервера.</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 друкує</translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -469,6 +465,16 @@
<numerusform></numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -456,10 +456,6 @@
<translation>
</translation>
</message>
<message>
<source>isComposing</source>
<translation>%1 </translation>
</message>
<message numerus="yes">
<source>chatTyping</source>
<extracomment>&apos;%1 is typing...&apos; indicate that someone is composing in chat</extracomment>
@ -467,6 +463,16 @@
<numerusform>%1 </numerusform>
</translation>
</message>
<message>
<source>allTextCopied</source>
<extracomment>&quot;Copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>selectedTextCopied</source>
<extracomment>&quot;Selection copied to clipboard&quot; : when a user copy a text from the menu, this message show up.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ChatDeliveries</name>

View file

@ -98,6 +98,7 @@
<file>assets/images/contact_disabled.svg</file>
<file>assets/images/contact_normal.svg</file>
<file>assets/images/contact_selected.svg</file>
<file>assets/images/copy_light.svg</file>
<file>assets/images/current_account_status_online.svg</file>
<file>assets/images/current_account_status_offline.svg</file>
<file>assets/images/current_account_status_dnd.svg</file>

View file

@ -566,15 +566,19 @@ void SipAddressesModel::removeContactOfSipAddress (const QString &sipAddress) {
// -----------------------------------------------------------------------------
void SipAddressesModel::initSipAddresses () {
QElapsedTimer timer;
timer.start();
QElapsedTimer timer, stepsTimer;
timer.start();
initSipAddressesFromChat();
initSipAddressesFromCalls();
initRefs();
initSipAddressesFromContacts();
qInfo() << "Sip addresses model initialized in:" << timer.elapsed() << "ms.";
stepsTimer.start();
initSipAddressesFromChat();
qInfo() << "Sip addresses model from Chats :" << stepsTimer.restart() << "ms.";
initSipAddressesFromCalls();
qInfo() << "Sip addresses model from Calls :" << stepsTimer.restart() << "ms.";
initRefs();
qInfo() << "Sip addresses model from Refs :" << stepsTimer.restart() << "ms.";
initSipAddressesFromContacts();
qInfo() << "Sip addresses model from Contacts :" << stepsTimer.restart() << "ms.";
qInfo() << "Sip addresses model initialized in:" << timer.elapsed() << "ms.";
}
void SipAddressesModel::initSipAddressesFromChat () {

View file

@ -17,6 +17,9 @@ Rectangle {
property alias proxyModel: chat.model // ChatRoomProxyModel
property alias tryingToLoadMoreEntries : chat.tryToLoadMoreEntries
property string noticeBannerText : '' // When set, show a banner with text and hide after some time
onNoticeBannerTextChanged: if(noticeBannerText!='') messageBlock.state = "showed"
// ---------------------------------------------------------------------------
signal messageToSend (string text)
@ -251,24 +254,97 @@ Rectangle {
// Display content.
Loader {
id: loader
Layout.fillWidth: true
source: Logic.getComponentFromEntry($chatEntry)
}
Connections{
target: loader.item
ignoreUnknownSignals: true
//: "Copied to clipboard" : when a user copy a text from the menu, this message show up.
onCopyAllDone: container.noticeBannerText = qsTr("allTextCopied")
//: "Selection copied to clipboard" : when a user copy a text from the menu, this message show up.
onCopySelectionDone: container.noticeBannerText = qsTr("selectedTextCopied")
}
}
}
}
}
footer: Text {
property var composers : container.proxyModel.composers
color: ChatStyle.composingText.color
font.pointSize: ChatStyle.composingText.pointSize
height: visible ? undefined : 0
leftPadding: ChatStyle.composingText.leftPadding
visible: composers.length > 0 && SettingsModel.chatEnabled
wrapMode: Text.Wrap
//: '%1 is typing...' indicate that someone is composing in chat
text:(composers.length==0?'': qsTr('chatTyping','',composers.length).arg(container.proxyModel.getDisplayNameComposers()))
footer: Item{
Text {
property var composers : container.proxyModel.composers
color: ChatStyle.composingText.color
font.pointSize: ChatStyle.composingText.pointSize
height: visible ? undefined : 0
leftPadding: ChatStyle.composingText.leftPadding
visible: composers.length > 0 && SettingsModel.chatEnabled
wrapMode: Text.Wrap
//: '%1 is typing...' indicate that someone is composing in chat
text:(composers.length==0?'': qsTr('chatTyping','',composers.length).arg(container.proxyModel.getDisplayNameComposers()))
}
}
Rectangle{
id: messageBlock
height: 32
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.leftMargin: ChatStyle.entry.leftMargin
anchors.rightMargin: ChatStyle.entry.leftMargin
anchors.bottomMargin: ChatStyle.entry.bottomMargin
color: ChatStyle.messageBanner.color
radius: 10
state: "hidden"
Timer{
id: hideNoticeBanner
interval: 4000
repeat: false
onTriggered: messageBlock.state = "hidden"
}
RowLayout{
anchors.centerIn: parent
spacing: 5
Icon{
icon: "copy_light"
iconSize: 20
}
Text{
Layout.fillHeight: true
Layout.fillWidth: true
text: container.noticeBannerText
font {
pointSize: ChatStyle.messageBanner.pointSize
}
color: ChatStyle.messageBanner.textColor
}
}
states: [
State {
name: "hidden"
PropertyChanges { target: messageBlock; opacity: 0 }
},
State {
name: "showed"
PropertyChanges { target: messageBlock; opacity: 1 }
}
]
transitions: [
Transition {
from: "*"; to: "showed"
SequentialAnimation{
NumberAnimation{ properties: "opacity"; easing.type: Easing.OutBounce; duration: 500 }
ScriptAction{ script: hideNoticeBanner.start()}
}
},
Transition {
SequentialAnimation{
NumberAnimation{ properties: "opacity"; duration: 1000 }
ScriptAction{ script: container.noticeBannerText = '' }
}
}
]
}
}
@ -277,6 +353,7 @@ Rectangle {
// -------------------------------------------------------------------------
Borders {
id: textAreaBorders
Layout.fillWidth: true
Layout.preferredHeight: textArea.height
@ -326,6 +403,8 @@ Rectangle {
}
}
// ---------------------------------------------------------------------------
// Scroll at end if necessary.
// ---------------------------------------------------------------------------

View file

@ -16,7 +16,7 @@ import LinphoneEnums 1.0
import 'Message.js' as Logic
// =============================================================================
// ChatMenu
Item {
id: container
property string lastTextSelected
@ -26,6 +26,8 @@ Item {
signal deliveryStatusClicked()
signal removeEntryRequested()
signal copyAllDone()
signal copySelectionDone()
function open(){
messageMenu.popup()
@ -44,7 +46,15 @@ Item {
iconSizeMenu: 17
iconLayoutDirection: Qt.RightToLeft
menuItemStyle : MenuItemStyle.aux
onTriggered: Clipboard.text = (container.lastTextSelected == '' ? container.content : container.lastTextSelected)
onTriggered: {
if( container.lastTextSelected == ''){
Clipboard.text = container.content
container.copyAllDone();
}else{
Clipboard.text = container.lastTextSelected
container.copySelectionDone()
}
}
visible: content != ''
}

View file

@ -21,6 +21,9 @@ Row {
property bool isOutgoing : $chatEntry.isOutgoing || $chatEntry.state == LinphoneEnums.ChatMessageStateIdle;
signal copyAllDone()
signal copySelectionDone()
Item {
height: ChatStyle.entry.lineHeight
width: ChatStyle.entry.metaWidth
@ -269,6 +272,9 @@ Row {
onDeliveryStatusClicked: deliveryLayout.visible = !deliveryLayout.visible
onRemoveEntryRequested: removeEntry()
deliveryVisible: deliveryLayout.visible
onCopyAllDone: mainRow.copyAllDone()
onCopySelectionDone: mainRow.copySelectionDone()
}
}
}

View file

@ -10,6 +10,10 @@ import LinphoneUtils 1.0
RowLayout {
id:mainRow
signal copyAllDone()
signal copySelectionDone()
implicitHeight: message.height
spacing: 0
@ -55,6 +59,9 @@ RowLayout {
Message {
id: message
onCopyAllDone: parent.copyAllDone()
onCopySelectionDone: parent.copySelectionDone()
Layout.fillWidth: true
// Not a style. Workaround to avoid a 0 width.

View file

@ -32,6 +32,11 @@ Item {
// ---------------------------------------------------------------------------
signal copyAllDone()
signal copySelectionDone()
// ---------------------------------------------------------------------------
implicitHeight: message.contentHeight
+ (ephemeralTimerRow.visible? message.padding * 4 : message.padding * 2)
+ (deliveryLayout.visible? deliveryLayout.height : 0)
@ -127,6 +132,9 @@ Item {
onDeliveryStatusClicked: deliveryLayout.visible = !deliveryLayout.visible
onRemoveEntryRequested: removeEntry()
deliveryVisible: deliveryLayout.visible
onCopyAllDone: container.copyAllDone()
onCopySelectionDone: container.copySelectionDone()
}
}

View file

@ -13,10 +13,16 @@ import Utils 1.0
Item {
implicitHeight: message.height
width: parent.width
signal copyAllDone()
signal copySelectionDone()
Message {
id: message
onCopyAllDone: parent.copyAllDone()
onCopySelectionDone: parent.copySelectionDone()
anchors {
left: parent.left
leftMargin: ChatStyle.entry.metaWidth

View file

@ -39,11 +39,18 @@ QtObject {
property int leftPadding: 20
property int pointSize: Units.dp * 9
}
property QtObject messageBanner: QtObject {
property color color: ColorsList.add("Chat_message_banner", "", "Background of message banner", "#9ecd1d").color
property color textColor: ColorsList.add("Chat_message_banner_text", "q", "Text of message banner").color
property int pointSize: Units.dp * 9
}
property QtObject entry: QtObject {
property int bottomMargin: 10
property int deleteIconSize: 22
property int leftMargin: 18
property int rightMargin: 18
property int lineHeight: 30
property int metaWidth: 40