diff --git a/linphone-app/assets/images/admin_selected.svg b/linphone-app/assets/images/admin_selected.svg
new file mode 100644
index 000000000..1d937c84d
--- /dev/null
+++ b/linphone-app/assets/images/admin_selected.svg
@@ -0,0 +1,48 @@
+
+
diff --git a/linphone-app/assets/images/menu_copy_text.svg b/linphone-app/assets/images/menu_copy_text.svg
new file mode 100644
index 000000000..3a32b9908
--- /dev/null
+++ b/linphone-app/assets/images/menu_copy_text.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/linphone-app/assets/images/menu_delete.svg b/linphone-app/assets/images/menu_delete.svg
new file mode 100644
index 000000000..4c9eff791
--- /dev/null
+++ b/linphone-app/assets/images/menu_delete.svg
@@ -0,0 +1,50 @@
+
+
diff --git a/linphone-app/assets/images/menu_devices_selected.svg b/linphone-app/assets/images/menu_devices_selected.svg
new file mode 100644
index 000000000..a74c1fc7e
--- /dev/null
+++ b/linphone-app/assets/images/menu_devices_selected.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/linphone-app/assets/images/menu_ephemeral_selected.svg b/linphone-app/assets/images/menu_ephemeral_selected.svg
new file mode 100644
index 000000000..5d55601c2
--- /dev/null
+++ b/linphone-app/assets/images/menu_ephemeral_selected.svg
@@ -0,0 +1,58 @@
+
+
diff --git a/linphone-app/assets/images/menu_imdn_info.svg b/linphone-app/assets/images/menu_imdn_info.svg
new file mode 100644
index 000000000..b3a491d93
--- /dev/null
+++ b/linphone-app/assets/images/menu_imdn_info.svg
@@ -0,0 +1,76 @@
+
+
+
+
diff --git a/linphone-app/assets/images/menu_infos.svg b/linphone-app/assets/images/menu_infos.svg
index 924798bb9..fab872712 100644
--- a/linphone-app/assets/images/menu_infos.svg
+++ b/linphone-app/assets/images/menu_infos.svg
@@ -4,9 +4,9 @@
+ inkscape:current-layer="g8" />
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAACsBAMAAAAUH1rrAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC
+AK7OHOkAAAAtUExURUdwTEREREdHR0REREREREpKSkVFRUREREZGRkVFRUVFRUZGRkREREVFRURE
+RI1WHrEAAAAOdFJOUwDmJvimEYC7SmGNOdBzeAAmQQAABepJREFUaN7FW91rHFUU36w7m83HSkHj
+i+2yVMFYJKj9QGwZosaKqCWhD6JIWakg+BDSQilikaJPIpQifvRBQxHUJ8uKgvVBiYj4ZFjBpyDF
+3Ulj0sb5G8zOvXPnztc9vzuZg+dl2Z07v5053+fccyuV/5Gm1+bO/3zXI3vPz339TlmYD772i6/R
+seMflAH6hJ+iu3cL/FIGaAD80S5AnU/8XHpzvihq4ynfQIcuFkM90PKN1P+8COr9rk+Q96Q96nc+
+QM/Zon7vQ/SWHeoD8buPHb/y/v55Z//19+Km4ftnbVBf1vnafyFmsNN/6qL0vrDQLO3G/rPt5OXq
+h/p1WM+qb0d3/d7OXPFXtOKfNgh7GlBNTamPYKgvQoakmeA5O8YeMZq9c9qKvYvh6nsIZ+K8Gq7c
+sGDBPtJFOX/AbJhoWQhC8aHfJVa+a6U2ShUfM68bc+2UPJSvd9m47IatSYZm/q9p0bh8p3txQ/9G
+3nLVsOaEZKxFnHIke9fzl9QkCzo23q4u2TCbu+KaNQs0NtzKu94U17ctQ7WzKu7r5VxftvAcGYa5
+laODLsV7s6S9bF3/ltYUs14ezWRRC/VGeV6vnyWUUfGXnSKwdXHvUu4/3iqWWF3Le9MGpdRGkoaU
+FtqCMNui2aUw4amc338tCvtK9lPV82WJmVorU+D35WseRkLrH83kQc8UYD7+0lSJNLO40CAFNjZ0
+KPtIoV3M0IMpw7OuUj4zCyJQZ69LOtWD+aFzwk2ZU9UlLKwaJrxHCUvz2il/MEW9oVkFF1J+4acc
+00snZga/KcR+OylFgx44UdJ/mNAFDWUiU5V17YqS7638VcKkugn/0yEdFBGT6gkfOBMIw6Dqo1qp
+YFgW+IVBPMSZsqhJrbKhMrj1uFJOYbDbFUINleaOk0EMZEI9poIjwZ/MA5kkEeyEHu6R3y6RgbwR
+wW6SgX1Tl9hho5OOijuTCConNZmJRzeH3GUF2yMDsGTnGOUQdJltV2hmXY5u6UMRkOCBZJZwYqeQ
+bOYh+bBtILu5GfFtQAVskWw+TSybibxRcMMKWV7uVOQe2fKZjFShRQpY0PUrXXJNU8mpGrwd2sKg
+qlUFNgYoAk6tUMNqBQsGQxkxGzqarbJgl0NnM4PoF0wKbVl3Zrsm9e6Lu8jtc5zNRsjkXlmwzVAB
+Vmn/ZUGN0M25JVqDtAcv+oRoeu0MVQ7Kp2zQzjnEDHq3FKzkaRMyMueHsB/cQcysJ2L1BoH5VRQi
+KdhFkSrUKNv98ZnYRkEHsd5ZAbtJVjAw7CUBO8oBuyTCxO3yYIf1grciYAflwc6IyDjCAbtHwN4s
+D/aUgL1j+PG3Yd1nbzzvWsDeOVz0MA27QwfsYUkmaG1dCyaMIKFswVpkkwjsuLWCjVLmkEjyEXPY
+sTLSeKPq1cZ4awhs1drV1JCkxrF2jONQG9S3deNY0MFhZdDBQiQOK0MkFtBx2DDtgNIPGFY9JZQs
+wbCKp1BqB8MqDYASURhWJaJQ2gzDqrQZSvJhWIUGlSQwrHp3qICCYVUBBZV7MKwq96DiFIXVwJBS
+GoWNSmmo8EdhtcIfaVOgsFqbAmmqoLBaUwVpAaGwWgsIaFhpsewq2rAC2mta5J1F22tAM1DLE5bQ
+ZiDQutR64ytw65JutGq98QHcaKXbwiex/m28LUw3sU9o00RdtIlNtdydT/Xi4fGuObtej5tcnkG8
+fiE5xbb3nKltOkhIpANVOgaxJbczjJsvOGxy88W4VYTDplBMG1swbHpjy7QNB8Omt+FMm4YwbHrT
+kN7ipClji5PekKUpC4LePiYpa/tY/tgpjlrPfDCmrXmmQQKmsQeuIQ2mkRKmARiucR2m4SKmUSiu
+wS2mMTOuoTimET6VavWslIscOGQaj+Qa5mQaPeUalGUa67UbQq7AQ8hMI9NcA95c4+hMw/Nco/5c
+BxOYjlFwHfpIHFFxE0dU3KJHVLgO1HAd/+E6rMR1tIrrIBjXsbUK0yG7IbEcCQyAOQ4wCoNdm7sw
+PG75W4nHLYvQf75b9GgluOBTAAAAAElFTkSuQmCC
+"
+ id="image10" />
diff --git a/linphone-app/assets/images/menu_infos2.svg b/linphone-app/assets/images/menu_infos2.svg
deleted file mode 100644
index 8cc59adc3..000000000
--- a/linphone-app/assets/images/menu_infos2.svg
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
diff --git a/linphone-app/assets/images/menu_infos_selected.svg b/linphone-app/assets/images/menu_infos_selected.svg
new file mode 100644
index 000000000..618e4f6ad
--- /dev/null
+++ b/linphone-app/assets/images/menu_infos_selected.svg
@@ -0,0 +1,287 @@
+
+
+
+
diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc
index 6351569cb..31afb924f 100644
--- a/linphone-app/resources.qrc
+++ b/linphone-app/resources.qrc
@@ -15,6 +15,7 @@
assets/images/add_participant_hovered.svg
assets/images/add_participant_normal.svg
assets/images/add_participant_pressed.svg
+ assets/images/admin_selected.svg
assets/images/attachment_disabled.svg
assets/images/attachment_hovered.svg
assets/images/attachment_normal.svg
@@ -145,12 +146,18 @@
assets/images/led_orange.svg
assets/images/led_red.svg
assets/images/led_white.svg
+ assets/images/menu_copy_text.svg
+ assets/images/menu_delete.svg
+ assets/images/menu_imdn_info.svg
assets/images/menu_vdots_normal.svg
assets/images/menu_vdots_hovered.svg
assets/images/menu_vdots_pressed.svg
assets/images/menu_infos.svg
+ assets/images/menu_infos_selected.svg
assets/images/menu_devices.svg
+ assets/images/menu_devices_selected.svg
assets/images/menu_ephemeral.svg
+ assets/images/menu_ephemeral_selected.svg
assets/images/message_sign.svg
assets/images/micro_off_hovered.svg
assets/images/micro_off_normal.svg
@@ -439,6 +446,7 @@
ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml
ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml
ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml
+ ui/modules/Linphone/Styles/View/ParticipantsViewStyle.qml
ui/modules/Linphone/TelKeypad/TelKeypadButton.qml
ui/modules/Linphone/TelKeypad/TelKeypad.js
ui/modules/Linphone/TelKeypad/TelKeypad.qml
@@ -541,6 +549,7 @@
ui/views/App/Styles/Main/ConversationStyle.qml
ui/views/App/Styles/Main/Dialogs/AboutStyle.qml
ui/views/App/Styles/Main/Dialogs/AuthenticationRequestStyle.qml
+ ui/views/App/Styles/Main/Dialogs/InfoChatRoomStyle.qml
ui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qml
ui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qml
ui/views/App/Styles/Main/HomeStyle.qml
diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.cpp b/linphone-app/src/components/chat-room/ChatRoomModel.cpp
index 5579a19a0..98b935652 100644
--- a/linphone-app/src/components/chat-room/ChatRoomModel.cpp
+++ b/linphone-app/src/components/chat-room/ChatRoomModel.cpp
@@ -352,7 +352,13 @@ int ChatRoomModel::getSecurityLevel() const{
bool ChatRoomModel::isGroupEnabled() const{
return mChatRoom && mChatRoom->getCurrentParams()->groupEnabled();
}
+bool ChatRoomModel::isMeAdmin() const{
+ return mChatRoom->getMe()->isAdmin();
+}
+bool ChatRoomModel::canHandleParticipants() const{
+ return mChatRoom->canHandleParticipants();
+}
/*
bool ChatRoomModel::getIsRemoteComposing () const {
return mIsRemoteComposing;
@@ -687,7 +693,7 @@ void ChatRoomModel::onChatMessageSent(const std::shared_ptr
void ChatRoomModel::onParticipantAdded(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog){
auto events = chatRoom->getHistoryEvents(0);
auto e = std::find(events.begin(), events.end(), eventLog);
- if( e == events.end() )
+ if( e != events.end() )
insertNotice(*e);
emit participantAdded(chatRoom, eventLog);
emit fullPeerAddressChanged();
@@ -704,6 +710,7 @@ void ChatRoomModel::onParticipantRemoved(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog){
emit participantAdminStatusChanged(chatRoom, eventLog);
+ emit isMeAdminChanged(); // It is not the case all the time but calling getters is not a heavy request
}
void ChatRoomModel::onStateChanged(const std::shared_ptr & chatRoom, linphone::ChatRoom::State newState){
diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.hpp b/linphone-app/src/components/chat-room/ChatRoomModel.hpp
index a4fa31a9e..bbad57214 100644
--- a/linphone-app/src/components/chat-room/ChatRoomModel.hpp
+++ b/linphone-app/src/components/chat-room/ChatRoomModel.hpp
@@ -65,6 +65,8 @@ public:
Q_PROPERTY(int securityLevel READ getSecurityLevel NOTIFY securityLevelChanged)
Q_PROPERTY(bool groupEnabled READ isGroupEnabled NOTIFY groupEnabledChanged)
Q_PROPERTY(bool haveEncryption READ haveEncryption CONSTANT)
+ Q_PROPERTY(bool isMeAdmin READ isMeAdmin NOTIFY isMeAdminChanged)
+ Q_PROPERTY(bool canHandleParticipants READ canHandleParticipants CONSTANT)
//Q_PROPERTY(bool isComposing MEMBER mIsRemoteComposing NOTIFY isRemoteComposingChanged)
Q_PROPERTY(QList composers READ getComposers NOTIFY isRemoteComposingChanged)
@@ -120,11 +122,13 @@ public:
Q_INVOKABLE bool isSecure() const;
int getSecurityLevel() const;
bool isGroupEnabled() const;
+ bool isMeAdmin() const;
+ bool canHandleParticipants() const;
bool getIsRemoteComposing () const;
ParticipantListModel* getParticipants() const;
std::shared_ptr getChatRoom();
QList getComposers();
-
+
//---- Setters
void setLastUpdateTime(const QDateTime& lastUpdateDate);
@@ -209,6 +213,7 @@ signals:
void securityLevelChanged(int securityLevel);
void groupEnabledChanged(bool groupEnabled);
+ void isMeAdminChanged();
void stateChanged(int state);
void hasBeenLeftChanged();
void ephemeralEnabledChanged();
diff --git a/linphone-app/src/components/other/colors/Colors.hpp b/linphone-app/src/components/other/colors/Colors.hpp
index 87a5f684a..a71913cd8 100644
--- a/linphone-app/src/components/other/colors/Colors.hpp
+++ b/linphone-app/src/components/other/colors/Colors.hpp
@@ -61,17 +61,17 @@ class Colors : public QObject {
// Primary color for hovered items.
ADD_COLOR(b, "#D64D00")
- ADD_COLOR(c, "#CBCBCB")
+ ADD_COLOR(c, "#CBCBCB") // Button pressed / separators / fields
ADD_COLOR(d, "#5A585B")
ADD_COLOR(e, "#F3F3F3")
ADD_COLOR(f, "#E8E8E8")
- ADD_COLOR(g, "#6B7A86")// SipAddress
+ ADD_COLOR(g, "#6B7A86")// SipAddress / Contact Text
ADD_COLOR(h, "#687680")
// Primary color.
ADD_COLOR(i, "#FE5E00")
- ADD_COLOR(j, "#4B5964")// Username
+ ADD_COLOR(j, "#4B5964")// Username, Background cancel button hovered
// Popups, home, call, assistant and settings background.
ADD_COLOR(k, "#FFFFFF")
@@ -82,7 +82,7 @@ class Colors : public QObject {
ADD_COLOR(m, "#FF8600")
ADD_COLOR(n, "#A1A1A1")
- ADD_COLOR(o, "#D0D8DE")
+ ADD_COLOR(o, "#D0D8DE")// Disabled button
// Progress bar.
ADD_COLOR(p, "#17A81A")
@@ -90,9 +90,14 @@ class Colors : public QObject {
// Fields, backgrounds and text color on some items.
ADD_COLOR(q, "#FFFFFF")
- ADD_COLOR(r, "#909fab")//Background button
+ ADD_COLOR(r, "#909fab")//Background button normal
ADD_COLOR(s, "#96be64")// Security
+
+ ADD_COLOR(t, "#C2C2C2")// Title Header
+ ADD_COLOR(u, "#D2D2D2")// Menu border (message)
+ ADD_COLOR(v, "#E7E7E7")// Menu pressed (message)
+ ADD_COLOR(w, "#EDEDED")// Menu background (conversation)
// Field error.
ADD_COLOR(error, "#FF0000")
@@ -130,7 +135,11 @@ signals:
void colorTqChanged (const QColor &color);
void colorTrChanged (const QColor &color);
void colorTsChanged (const QColor &color);
-
+ void colorTtChanged (const QColor &color);
+ void colorTuChanged (const QColor &color);
+ void colorTvChanged (const QColor &color);
+ void colorTwChanged (const QColor &color);
+
void colorTerrorChanged (const QColor &color);
private:
diff --git a/linphone-app/src/components/participant/ParticipantListModel.cpp b/linphone-app/src/components/participant/ParticipantListModel.cpp
index cb5316fdc..0853bac8e 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.cpp
@@ -177,27 +177,43 @@ void ParticipantListModel::updateParticipants () {
while(itParticipant != mParticipants.end()) {
auto itDbParticipant = dbParticipants.begin();
while(itDbParticipant != dbParticipants.end()
- && !(*itDbParticipant)->getAddress()->weakEqual((*itParticipant)->getParticipant()->getAddress())){
+ && ((*itParticipant)->getParticipant() && !(*itDbParticipant)->getAddress()->weakEqual((*itParticipant)->getParticipant()->getAddress())
+ || !(*itParticipant)->getParticipant() && !(*itDbParticipant)->getAddress()->weakEqual(Utils::interpretUrl((*itParticipant)->getSipAddress()))
+ )
+ ){
++itDbParticipant;
}
if( itDbParticipant == dbParticipants.end()){
+ int row = itParticipant - mParticipants.begin();
+ beginRemoveRows(QModelIndex(), row, row);
itParticipant = mParticipants.erase(itParticipant);
+ endRemoveRows();
changed = true;
}else
++itParticipant;
}
// Add new
for(auto dbParticipant : dbParticipants){
- auto itParticipant = mParticipants.begin();
- while(itParticipant != mParticipants.end() && !dbParticipant->getAddress()->weakEqual((*itParticipant)->getParticipant()->getAddress())){
+ auto itParticipant = mParticipants.begin();
+ while(itParticipant != mParticipants.end() && ( (*itParticipant)->getParticipant() && !dbParticipant->getAddress()->weakEqual((*itParticipant)->getParticipant()->getAddress())
+ || (!(*itParticipant)->getParticipant() && !dbParticipant->getAddress()->weakEqual(Utils::interpretUrl((*itParticipant)->getSipAddress())))
+ )
+ ){
+
++itParticipant;
}
if( itParticipant == mParticipants.end()){
auto participant = std::make_shared(dbParticipant);
connect(this, &ParticipantListModel::deviceSecurityLevelChanged, participant.get(), &ParticipantModel::onDeviceSecurityLevelChanged);
connect(this, &ParticipantListModel::securityLevelChanged, participant.get(), &ParticipantModel::onSecurityLevelChanged);
+ connect(participant.get(),&ParticipantModel::updateAdminStatus, this, &ParticipantListModel::setAdminStatus);
+ int row = mParticipants.count();
+ beginInsertRows(QModelIndex(), row, row);
mParticipants << participant;
+ endInsertRows();
changed = true;
+ }else if(!(*itParticipant)->getParticipant()){
+ (*itParticipant)->setParticipant(dbParticipant);
}
}
if( changed)
@@ -249,6 +265,12 @@ const std::shared_ptr ParticipantListModel::getParticipant(con
}
//-------------------------------------------------------------
+
+
+void ParticipantListModel::setAdminStatus(const std::shared_ptr participant, const bool& isAdmin){
+ mChatRoomModel->getChatRoom()->setParticipantAdminStatus(participant, isAdmin);
+}
+
void ParticipantListModel::onSecurityEvent(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog) {
auto address = eventLog->getParticipantAddress();
if(address) {
diff --git a/linphone-app/src/components/participant/ParticipantListModel.hpp b/linphone-app/src/components/participant/ParticipantListModel.hpp
index 1c70919df..39f2587de 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.hpp
@@ -61,6 +61,8 @@ public:
public slots:
+ void setAdminStatus(const std::shared_ptr participant, const bool& isAdmin);
+
void onSecurityEvent(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog);
void onConferenceJoined(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog);
void onParticipantAdded(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog);
diff --git a/linphone-app/src/components/participant/ParticipantModel.cpp b/linphone-app/src/components/participant/ParticipantModel.cpp
index 3235a1fe6..2478bb2d1 100644
--- a/linphone-app/src/components/participant/ParticipantModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantModel.cpp
@@ -33,9 +33,10 @@ using namespace std;
ParticipantModel::ParticipantModel (shared_ptr linphoneParticipant, QObject *parent) : QObject(parent) {
App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
- mAdminStatus = false;
mParticipant = linphoneParticipant;
+ mAdminStatus = false;
if(mParticipant){
+ mAdminStatus = mParticipant->isAdmin();
mParticipantDevices = std::make_shared(mParticipant);
connect(this, &ParticipantModel::deviceSecurityLevelChanged, mParticipantDevices.get(), &ParticipantDeviceListModel::securityLevelChanged);
}
@@ -55,6 +56,11 @@ int ParticipantModel::getDeviceCount() const{
return (mParticipant ? mParticipant->getDevices().size() : 0);
}
+bool ParticipantModel::getInviting() const{
+ bool is = !mParticipant;
+ return is;
+}
+
QString ParticipantModel::getSipAddress() const{
return (mParticipant ? Utils::coreStringToAppString(mParticipant->getAddress()->asString()) : mSipAddress);
}
@@ -72,7 +78,6 @@ bool ParticipantModel::isFocus() const{
return (mParticipant ? mParticipant->isFocus() : false);
}
-
//------------------------------------------------------------------------
void ParticipantModel::setSipAddress(const QString& address){
@@ -85,10 +90,22 @@ void ParticipantModel::setSipAddress(const QString& address){
void ParticipantModel::setAdminStatus(const bool& status){
if(status != mAdminStatus){
mAdminStatus = status;
- emit adminStatusChanged();
+ if(mParticipant)
+ emit updateAdminStatus(mParticipant, mAdminStatus);
+ else
+ emit adminStatusChanged();
}
}
+void ParticipantModel::setParticipant(std::shared_ptr participant){
+ mParticipant = participant;
+ if(mParticipant){
+ mAdminStatus = mParticipant->isAdmin();
+ mParticipantDevices = std::make_shared(mParticipant);
+ connect(this, &ParticipantModel::deviceSecurityLevelChanged, mParticipantDevices.get(), &ParticipantDeviceListModel::securityLevelChanged);
+ }
+ emit invitingChanged();
+}
//------------------------------------------------------------------------
void ParticipantModel::onSecurityLevelChanged(){
diff --git a/linphone-app/src/components/participant/ParticipantModel.hpp b/linphone-app/src/components/participant/ParticipantModel.hpp
index d7088c59a..51de53743 100644
--- a/linphone-app/src/components/participant/ParticipantModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantModel.hpp
@@ -45,6 +45,8 @@ public:
Q_PROPERTY(bool focus READ isFocus CONSTANT)
Q_PROPERTY(int securityLevel READ getSecurityLevel NOTIFY securityLevelChanged)
Q_PROPERTY(int deviceCount READ getDeviceCount NOTIFY deviceCountChanged)
+
+ Q_PROPERTY(bool inviting READ getInviting NOTIFY invitingChanged)
ContactModel *getContactModel() const;
QString getSipAddress() const;
@@ -54,9 +56,11 @@ public:
bool isFocus() const;
int getSecurityLevel() const;
int getDeviceCount() const;
+ bool getInviting() const;
void setSipAddress(const QString& address);
void setAdminStatus(const bool& status);
+ void setParticipant(std::shared_ptr participant);
std::shared_ptr getParticipant();
Q_INVOKABLE ParticipantDeviceProxyModel * getProxyDevices();
@@ -74,8 +78,10 @@ signals:
void securityLevelChanged();
void deviceSecurityLevelChanged(std::shared_ptr device);
void sipAddressChanged();
+ void updateAdminStatus(const std::shared_ptr participant, const bool& isAdmin);// Split in two signals in order to sequancialize execution between SDK and GUI
void adminStatusChanged();
void deviceCountChanged();
+ void invitingChanged();
// void contactUpdated ();
diff --git a/linphone-app/src/components/participant/ParticipantProxyModel.cpp b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
index 30c71c300..b01c5dc36 100644
--- a/linphone-app/src/components/participant/ParticipantProxyModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
@@ -83,15 +83,20 @@ void ParticipantProxyModel::setChatRoomModel(ChatRoomModel * chatRoomModel){
void ParticipantProxyModel::add(const QString& address){
ParticipantListModel * participantsModel = dynamic_cast(sourceModel());
if(!participantsModel->contains(address)){
- std::shared_ptr participant = std::make_shared(nullptr);
+ std::shared_ptr participant = std::make_shared(nullptr);
participant->setSipAddress(address);
participantsModel->add(participant);
+ if(mChatRoomModel && mChatRoomModel->getChatRoom())// Invite and wait for its creation
+ mChatRoomModel->getChatRoom()->addParticipant(Utils::interpretUrl(address));
}
}
void ParticipantProxyModel::remove(ParticipantModel * participant){
- if(participant)
- dynamic_cast(sourceModel())->remove(participant);
+ if(participant) {
+ if(mChatRoomModel && mChatRoomModel->getChatRoom() && participant->getParticipant() )
+ mChatRoomModel->getChatRoom()->removeParticipant(participant->getParticipant());
+ //dynamic_cast(sourceModel())->remove(participant);
+ }
}
// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/utils/Utils.cpp b/linphone-app/src/utils/Utils.cpp
index b64966137..c91345bc8 100644
--- a/linphone-app/src/utils/Utils.cpp
+++ b/linphone-app/src/utils/Utils.cpp
@@ -78,7 +78,10 @@ bool Utils::hasCapability(const QString& address, const LinphoneEnums::FriendCap
}
QString Utils::toDateTimeString(QDateTime date){
- return date.toString("yyyy/MM/dd hh:mm:ss");
+ if(date.date() == QDate::currentDate())
+ return toTimeString(date);
+ else
+ return date.toString("yyyy/MM/dd hh:mm:ss");
}
QString Utils::toTimeString(QDateTime date){
diff --git a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
index 3ce013fbc..47e194b1b 100644
--- a/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
+++ b/linphone-app/ui/modules/Common/Dialog/DialogPlus.qml
@@ -17,6 +17,17 @@ Rectangle {
property int buttonsAlignment : Qt.AlignLeft
property bool flat : false // Remove margins
property alias showCloseCross : titleBar.showCloseCross
+
+ property int buttonsLeftMargin :(buttonsAlignment & Qt.AlignLeft )== Qt.AlignLeft
+ ? DialogStyle.buttons.leftMargin
+ : (buttonsAlignment & Qt.AlignRight) == Qt.AlignRight
+ ? DialogStyle.buttons.rightMargin
+ : DialogStyle.buttons.leftMargin
+ property int buttonsRightMargin : (buttonsAlignment & Qt.AlignRight )== Qt.AlignRight
+ ? DialogStyle.buttons.rightMargin
+ : (buttonsAlignment & Qt.AlignLeft) == Qt.AlignLeft
+ ? DialogStyle.buttons.leftMargin
+ : DialogStyle.buttons.rightMargin
default property alias _content: content.data
property bool _disableExitStatus
@@ -90,12 +101,8 @@ Rectangle {
Layout.alignment: buttonsAlignment
Layout.bottomMargin: DialogStyle.buttons.bottomMargin
- Layout.leftMargin: (buttonsAlignment & Qt.AlignLeft )== Qt.AlignLeft
- ? DialogStyle.buttons.leftMargin
- : (buttonsAlignment & Qt.AlignRight) == Qt.AlignRight
- ? DialogStyle.buttons.rightMargin
- : DialogStyle.buttons.leftMargin
- Layout.rightMargin: DialogStyle.buttons.rightMargin
+ Layout.leftMargin: buttonsLeftMargin
+ Layout.rightMargin: buttonsRightMargin
Layout.topMargin: DialogStyle.buttons.topMargin
spacing: DialogStyle.buttons.spacing
visible: children.length>0
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml b/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
index 9b459db68..b59c32e61 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
@@ -19,9 +19,15 @@ Item {
property color textColorHovered: textColorNormal
property color textColorNormal
property color textColorPressed: textColorNormal
+
+ property color borderColorDisabled
+ property color borderColorHovered
+ property color borderColorNormal
+ property color borderColorPressed
property alias text: button.text
property bool enabled: true
+ property bool showBorder : false
signal clicked
@@ -36,6 +42,16 @@ Item {
? colorPressed
: (button.hovered ? colorHovered : colorNormal)
}
+
+ function _getBorderColor () {
+ if (!wrappedButton.enabled) {
+ return borderColorDisabled
+ }
+
+ return button.down
+ ? borderColorPressed
+ : (button.hovered ? borderColorHovered : borderColorNormal)
+ }
function _getTextColor () {
if (!wrappedButton.enabled) {
@@ -60,6 +76,8 @@ Item {
background: Rectangle {
color: _getBackgroundColor()
radius: AbstractTextButtonStyle.background.radius
+ border.color: _getBorderColor()
+ border.width: (showBorder ? 1 : 0)
}
contentItem: Text {
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/TextButtonA.qml b/linphone-app/ui/modules/Common/Form/Buttons/TextButtonA.qml
index e290716f4..f798ad33a 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/TextButtonA.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/TextButtonA.qml
@@ -3,13 +3,20 @@ import Common.Styles 1.0
// =============================================================================
AbstractTextButton {
- colorDisabled: TextButtonAStyle.backgroundColor.disabled
- colorHovered: TextButtonAStyle.backgroundColor.hovered
- colorNormal: TextButtonAStyle.backgroundColor.normal
- colorPressed: TextButtonAStyle.backgroundColor.pressed
-
- textColorDisabled: TextButtonAStyle.textColor.disabled
- textColorHovered: TextButtonAStyle.textColor.hovered
- textColorNormal: TextButtonAStyle.textColor.normal
- textColorPressed: TextButtonAStyle.textColor.pressed
+ property var textButtonStyle : TextButtonAStyle
+
+ colorDisabled: textButtonStyle.backgroundColor.disabled
+ colorHovered: textButtonStyle.backgroundColor.hovered
+ colorNormal: textButtonStyle.backgroundColor.normal
+ colorPressed: textButtonStyle.backgroundColor.pressed
+
+ textColorDisabled: textButtonStyle.textColor.disabled
+ textColorHovered: textButtonStyle.textColor.hovered
+ textColorNormal: textButtonStyle.textColor.normal
+ textColorPressed: textButtonStyle.textColor.pressed
+
+ borderColorDisabled: textButtonStyle.borderColor.disabled
+ borderColorHovered: textButtonStyle.borderColor.hovered
+ borderColorNormal: textButtonStyle.borderColor.normal
+ borderColorPressed: textButtonStyle.borderColor.pressed
}
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/TextButtonB.qml b/linphone-app/ui/modules/Common/Form/Buttons/TextButtonB.qml
index dd14455bc..df3158cd7 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/TextButtonB.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/TextButtonB.qml
@@ -14,4 +14,9 @@ AbstractTextButton {
textColorHovered: textButtonStyle.textColor.hovered
textColorNormal: textButtonStyle.textColor.normal
textColorPressed: textButtonStyle.textColor.pressed
+
+ borderColorDisabled: textButtonStyle.borderColor.disabled
+ borderColorHovered: textButtonStyle.borderColor.hovered
+ borderColorNormal: textButtonStyle.borderColor.normal
+ borderColorPressed: textButtonStyle.borderColor.pressed
}
diff --git a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml
index 5adda6d71..01a5c0d3e 100644
--- a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml
+++ b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml
@@ -85,6 +85,7 @@ Item {
}
// Record audio
ActionButton {
+ visible:false // TODO
id: recordAudioButton
//anchors.verticalCenter: parent.verticalCenter
diff --git a/linphone-app/ui/modules/Common/Menus/Menu.qml b/linphone-app/ui/modules/Common/Menus/Menu.qml
index 37430aa2b..dae3d5379 100644
--- a/linphone-app/ui/modules/Common/Menus/Menu.qml
+++ b/linphone-app/ui/modules/Common/Menus/Menu.qml
@@ -8,14 +8,21 @@ import Common.Styles 1.0
Controls.Menu {
id: menu
+ property var menuStyle : MenuStyle.normal
background: Rectangle {
- implicitWidth: MenuStyle.width
- color: MenuStyle.color
-
+ implicitWidth: menuStyle.width
+ color: menuStyle.color
+ radius: menuStyle.radius
+
+ border{
+ color:menuStyle.border.color
+ width: menuStyle.border.width
+ }
+
layer {
- enabled: true
+ enabled: menuStyle.shadowEnabled
effect: PopupShadow {}
- }
+ }
}
}
diff --git a/linphone-app/ui/modules/Common/Menus/MenuItem.qml b/linphone-app/ui/modules/Common/Menus/MenuItem.qml
index ff8028071..4ed98f3d5 100644
--- a/linphone-app/ui/modules/Common/Menus/MenuItem.qml
+++ b/linphone-app/ui/modules/Common/Menus/MenuItem.qml
@@ -1,5 +1,6 @@
import QtQuick 2.7
import QtQuick.Controls 2.2 as Controls
+import QtQuick.Layouts 1.3
import Common 1.0
@@ -14,48 +15,76 @@ Controls.MenuItem {
id: button
property alias iconMenu : iconArea.icon
property alias iconSizeMenu : iconArea.iconSize
+ property alias iconLayoutDirection : rowArea.layoutDirection
+ property var menuItemStyle : MenuItemStyle.normal
- background: Rectangle {
+ property alias textWeight : rowText.font.bold
+ property int offsetTopMargin : 0
+ property int offsetBottomMargin : 0
+
+ height:visible?undefined:0
+
+ background: Rectangle {
color: button.down
- ? MenuItemStyle.background.color.pressed
+ ? menuItemStyle.background.color.pressed
: (
button.hovered
- ? MenuItemStyle.background.color.hovered
- : MenuItemStyle.background.color.normal
+ ? menuItemStyle.background.color.hovered
+ : menuItemStyle.background.color.normal
)
- implicitHeight: MenuItemStyle.background.height
+ implicitHeight: button.menuItemStyle.background.height
}
- contentItem:Row{
- leftPadding: MenuItemStyle.leftPadding
- rightPadding: MenuItemStyle.rightPadding
+ contentItem:RowLayout{
+ id:rowArea
spacing:20
Icon{
id: iconArea
visible: icon
width: icon?iconSize:0
+ Layout.leftMargin:(iconLayoutDirection == Qt.LeftToRight ? menuItemStyle.leftMargin : 0)
+ Layout.rightMargin:(iconLayoutDirection == Qt.LeftToRight ? 0 : menuItemStyle.rightMargin)
}
Text {
+ id:rowText
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Layout.leftMargin:(iconLayoutDirection == Qt.LeftToRight ? 0 : menuItemStyle.leftMargin)
+ Layout.rightMargin:(iconLayoutDirection == Qt.LeftToRight ? menuItemStyle.rightMargin : 0)
color: button.enabled
- ? MenuItemStyle.text.color.enabled
- : MenuItemStyle.text.color.disabled
+ ? (button.down
+ ? menuItemStyle.text.color.pressed
+ : (
+ button.hovered
+ ? menuItemStyle.text.color.hovered
+ : menuItemStyle.text.color.normal
+ ))
+ : menuItemStyle.text.color.disabled
elide: Text.ElideRight
font {
- bold: true
- pointSize: MenuItemStyle.text.pointSize
+ weight: menuItemStyle.text.weight
+ pointSize: menuItemStyle.text.pointSize
}
text: button.text
- //leftPadding: MenuItemStyle.leftPadding
- //rightPadding: MenuItemStyle.rightPadding
-
+ //leftPadding: menuItemStyle.leftPadding
+ //rightPadding: menuItemStyle.rightPadding
+ horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- anchors.top: parent.top
- anchors.bottom : parent.bottom
+ //anchors.top: parent.top
+ //anchors.bottom : parent.bottom
}
}
hoverEnabled: true
+ MouseArea{
+ anchors.fill:parent
+ propagateComposedEvents:true
+ acceptedButtons: Qt.NoButton
+ cursorShape: parent.hovered
+ ? Qt.PointingHandCursor
+ : Qt.ArrowCursor
+ }
}
diff --git a/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml b/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml
index 68c4372d2..034a52d47 100644
--- a/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml
+++ b/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml
@@ -6,17 +6,18 @@ import Colors 1.0
// =============================================================================
QtObject {
- property QtObject backgroundColor: QtObject {
- property color disabled: Colors.o
- property color hovered: Colors.j
- property color normal: Colors.r
- property color pressed: Colors.i
- }
-
- property QtObject textColor: QtObject {
- property color disabled: Colors.q
- property color hovered: Colors.q
- property color normal: Colors.q
- property color pressed: Colors.q
- }
+ property QtObject backgroundColor: QtObject {
+ property color disabled: Colors.o
+ property color hovered: Colors.j
+ property color normal: Colors.r
+ property color pressed: Colors.i
+ }
+
+ property QtObject textColor: QtObject {
+ property color disabled: Colors.q
+ property color hovered: Colors.q
+ property color normal: Colors.q
+ property color pressed: Colors.q
+ }
+ property QtObject borderColor : backgroundColor
}
diff --git a/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml b/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml
index 82cd317dd..bcb82e20a 100644
--- a/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml
+++ b/linphone-app/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml
@@ -20,4 +20,5 @@ QtObject {
property color normal: Colors.q
property color pressed: Colors.q
}
+ property QtObject borderColor : backgroundColor
}
diff --git a/linphone-app/ui/modules/Common/Styles/Menus/MenuItemStyle.qml b/linphone-app/ui/modules/Common/Styles/Menus/MenuItemStyle.qml
index f8afdb692..24c9c1725 100644
--- a/linphone-app/ui/modules/Common/Styles/Menus/MenuItemStyle.qml
+++ b/linphone-app/ui/modules/Common/Styles/Menus/MenuItemStyle.qml
@@ -1,5 +1,6 @@
pragma Singleton
import QtQml 2.2
+import QtQuick 2.3
import Colors 1.0
import Units 1.0
@@ -7,25 +8,108 @@ import Units 1.0
// =============================================================================
QtObject {
- property int leftPadding: 5
- property int rightPadding: 5
-
- property QtObject background: QtObject {
- property int height: 30
-
- property QtObject color: QtObject {
- property color hovered: Colors.o
- property color normal: Colors.q
- property color pressed: Colors.o
- }
- }
-
- property QtObject text: QtObject {
- property int pointSize: Units.dp * 10
-
- property QtObject color: QtObject {
- property color enabled: Colors.j
- property color disabled: Colors.l50
- }
- }
+ property QtObject normal : QtObject{
+ property int leftMargin: 5
+ property int rightMargin: 5
+
+ property QtObject background: QtObject {
+ property int height: 30
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.o
+ property color normal: Colors.q
+ property color pressed: Colors.o
+ }
+ }
+
+ property QtObject text: QtObject {
+ property int pointSize: Units.dp * 10
+ property int weight : Font.Bold
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.j
+ property color normal: Colors.j
+ property color pressed: Colors.j
+ property color disabled: Colors.l50
+ }
+ }
+ }
+ property QtObject aux : QtObject{
+ property int leftMargin: 10
+ property int rightMargin: 10
+
+ property QtObject background: QtObject {
+ property int height: 40
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.v
+ property color normal: Colors.a
+ property color pressed: Colors.v
+ }
+ }
+
+ property QtObject text: QtObject {
+ property int pointSize: Units.dp * 10
+ property int weight : Font.Normal
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.j
+ property color normal: Colors.j
+ property color pressed: Colors.j
+ property color disabled: Colors.l50
+ }
+ }
+ }
+ property QtObject auxRed : QtObject{
+ property int leftMargin: 10
+ property int rightMargin: 10
+
+ property QtObject background: QtObject {
+ property int height: 40
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.v
+ property color normal: Colors.a
+ property color pressed: Colors.v
+ }
+ }
+
+ property QtObject text: QtObject {
+ property int pointSize: Units.dp * 10
+ property int weight : Font.Normal
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.error
+ property color normal: Colors.error
+ property color pressed: Colors.error
+ property color disabled: Colors.l50
+ }
+ }
+ }
+ property QtObject aux2 : QtObject{
+ property int leftMargin: 10
+ property int rightMargin: 10
+
+ property QtObject background: QtObject {
+ property int height: 50
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.w
+ property color normal: Colors.w
+ property color pressed: Colors.w
+ }
+ }
+
+ property QtObject text: QtObject {
+ property int pointSize: Units.dp * 11
+ property int weight : Font.Normal
+
+ property QtObject color: QtObject {
+ property color hovered: Colors.m
+ property color normal: Colors.j
+ property color pressed: Colors.m
+ property color disabled: Colors.l50
+ }
+ }
+ }
}
diff --git a/linphone-app/ui/modules/Common/Styles/Menus/MenuStyle.qml b/linphone-app/ui/modules/Common/Styles/Menus/MenuStyle.qml
index bd33aa11a..8c4dfc804 100644
--- a/linphone-app/ui/modules/Common/Styles/Menus/MenuStyle.qml
+++ b/linphone-app/ui/modules/Common/Styles/Menus/MenuStyle.qml
@@ -6,6 +6,37 @@ import Colors 1.0
// =============================================================================
QtObject {
- property color color: Colors.q
- property int width: 130
+ property QtObject normal : QtObject {
+ property color color: Colors.q
+ property int width: 130
+ property bool shadowEnabled: true
+ property int radius : 0
+
+ property QtObject border : QtObject {
+ property color color: Colors.u
+ property int width: 0
+ }
+ }
+ property QtObject aux : QtObject {
+ property color color: Colors.q
+ property int width: 200
+ property bool shadowEnabled: false
+ property int radius : 5
+
+ property QtObject border : QtObject {
+ property color color: Colors.u
+ property int width: 1
+ }
+ }
+ property QtObject aux2 : QtObject {
+ property color color: Colors.q
+ property int width: 250
+ property bool shadowEnabled: false
+ property int radius : 0
+
+ property QtObject border : QtObject {
+ property color color: Colors.u
+ property int width: 0
+ }
+ }
}
diff --git a/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml b/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml
index 1bac788e0..ad5ad5993 100644
--- a/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml
+++ b/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml
@@ -31,16 +31,16 @@ Core.ToolTip {
}
function _getRelativeXArrowCenter () {
- return tooltip.parent.width / 2 - icon.width / 2
+ return (tooltip.parent ? tooltip.parent.width / 2 - icon.width / 2 : 0)
}
function _getRelativeYArrowCenter () {
- return tooltip.parent.height / 2 - icon.height / 2
+ return (tooltip.parent ? tooltip.parent.height / 2 - icon.height / 2 : 0)
}
function _setArrowEdge () {
var a = container.mapToItem(null, 0, 0)
- var b = tooltip.parent.mapToItem(null, 0, 0)
+ var b = (tooltip.parent ?tooltip.parent.mapToItem(null, 0, 0) : {x:0,y:0})
if (a.x + container.width < b.x) {
_edge = 'left'
@@ -59,7 +59,7 @@ Core.ToolTip {
// Called when new image is loaded. (When the is edge is updated.)
function _setArrowPosition () {
var a = container.mapToItem(null, 0, 0)
- var b = tooltip.parent.mapToItem(null, 0, 0)
+ var b = (tooltip.parent ?tooltip.parent.mapToItem(null, 0, 0) : {x:0,y:0})
if (_edge === 'left') {
icon.x = container.width - TooltipStyle.margins - _getArrowWidthMargin()
diff --git a/linphone-app/ui/modules/Linphone/Chat/Message.qml b/linphone-app/ui/modules/Linphone/Chat/Message.qml
index f23dba6ee..36a67405c 100644
--- a/linphone-app/ui/modules/Linphone/Chat/Message.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/Message.qml
@@ -3,11 +3,13 @@ import QtQuick.Layouts 1.3
import Clipboard 1.0
import Common 1.0
+import Common.Styles 1.0
import Linphone.Styles 1.0
import TextToSpeech 1.0
import Utils 1.0
import Units 1.0
import UtilsCpp 1.0
+import LinphoneEnums 1.0
import 'Message.js' as Logic
@@ -102,24 +104,44 @@ Item {
Menu {
id: messageMenu
-
+ menuStyle : MenuStyle.aux
MenuItem {
text: qsTr('menuCopy')
+ iconMenu: 'menu_copy_text'
+ iconSizeMenu: 17
+ iconLayoutDirection: Qt.RightToLeft
+ menuItemStyle : MenuItemStyle.aux
onTriggered: Clipboard.text = $chatEntry.content
}
MenuItem {
enabled: TextToSpeech.available
text: qsTr('menuPlayMe')
-
+ iconMenu: 'speaker'
+ iconSizeMenu: 17
+ iconLayoutDirection: Qt.RightToLeft
+ menuItemStyle : MenuItemStyle.aux
onTriggered: TextToSpeech.say($chatEntry.content)
}
MenuItem {
text: 'Delivery Status'
-
+ iconMenu: 'menu_imdn_info'
+ iconSizeMenu: 17
+ iconLayoutDirection: Qt.RightToLeft
+ menuItemStyle : MenuItemStyle.aux
+ visible: deliveryLayout.model.rowCount() > 0
+ onTriggered: deliveryLayout.visible = !deliveryLayout.visible
+ }
+ MenuItem {
+ text: 'Delete'
+ iconMenu: 'menu_delete'
+ iconSizeMenu: 17
+ iconLayoutDirection: Qt.RightToLeft
+ menuItemStyle : MenuItemStyle.auxRed
onTriggered: deliveryLayout.visible = !deliveryLayout.visible
}
}
+
// Handle hovered link.
@@ -169,10 +191,27 @@ Item {
}
}*/
model: $chatEntry.getProxyImdnStates()
+ property var i18n: [
+ 'Envoyé à %1 - %2', // LinphoneEnums.ChatMessageStateDelivered
+ 'Reçu par %1 - %2', // LinphoneEnums.ChatMessageStateDeliveredToUser
+ 'Lu par %1 - %2' , // LinphoneEnums.ChatMessageStateDisplayed
+ "%1 n'a encore rien reçu" // LinphoneEnums.ChatMessageStateNotDelivered
+ ]
+ function getText(state){
+ if(state == LinphoneEnums.ChatMessageStateDelivered)
+ return i18n[0]
+ else if(state == LinphoneEnums.ChatMessageStateDeliveredToUser)
+ return i18n[1]
+ else if(state == LinphoneEnums.ChatMessageStateDisplayed)
+ return i18n[2]
+ else if(state == LinphoneEnums.ChatMessageStateNotDelivered)
+ return i18n[3]
+ else return ''
+ }
delegate:Text{
height:ChatStyle.composingText.height-5
width:parent.width
- text:'Vu par %1 le %2'.arg(modelData.displayName).arg(UtilsCpp.toDateTimeString(modelData.stateChangeTime))
+ text:deliveryLayout.getText(modelData.state).arg(modelData.displayName).arg(UtilsCpp.toDateTimeString(modelData.stateChangeTime))
color:"#B1B1B1"
font.pointSize: Units.dp * 8
elide: Text.ElideMiddle
diff --git a/linphone-app/ui/modules/Linphone/Contact/Contact.qml b/linphone-app/ui/modules/Linphone/Contact/Contact.qml
index 86f4c0dde..872cae38e 100644
--- a/linphone-app/ui/modules/Linphone/Contact/Contact.qml
+++ b/linphone-app/ui/modules/Linphone/Contact/Contact.qml
@@ -18,6 +18,7 @@ Rectangle {
property alias sipAddressColor: description.sipAddressColor
property alias usernameColor: description.usernameColor
+ property alias statusText : description.statusText
property bool displayUnreadMessageCount: false
property bool showContactAddress : true
diff --git a/linphone-app/ui/modules/Linphone/Contact/ContactDescription.qml b/linphone-app/ui/modules/Linphone/Contact/ContactDescription.qml
index da280ba77..8ffaecf0a 100644
--- a/linphone-app/ui/modules/Linphone/Contact/ContactDescription.qml
+++ b/linphone-app/ui/modules/Linphone/Contact/ContactDescription.qml
@@ -9,11 +9,20 @@ import Common 1.0
Column {
property alias username: username.text
property string sipAddress
+ property alias statusText : status.text
- property color sipAddressColor: ContactDescriptionStyle.sipAddress.color
- property color usernameColor: ContactDescriptionStyle.username.color
+ property var contactDescriptionStyle : ContactDescriptionStyle
+
+ property color sipAddressColor: contactDescriptionStyle.sipAddress.color
+ property color usernameColor: contactDescriptionStyle.username.color
property int horizontalTextAlignment
- property int contentWidth : Math.max(username.implicitWidth, address.implicitWidth)+10
+ property int contentWidth : Math.max(username.implicitWidth, address.implicitWidth)
+ +10
+ +statusWidth
+ property int contentHeight : Math.max(username.implicitHeight, address.implicitHeight)+10
+
+ readonly property int statusWidth : (status.visible ? status.width + 5 : 0)
+
// ---------------------------------------------------------------------------
@@ -23,14 +32,25 @@ Column {
color: usernameColor
elide: Text.ElideRight
- font.bold: true
- font.pointSize: ContactDescriptionStyle.username.pointSize
+ font.weight: contactDescriptionStyle.username.weight
+ font.pointSize: contactDescriptionStyle.username.pointSize
horizontalAlignment: horizontalTextAlignment
verticalAlignment: (address.visible?Text.AlignBottom:Text.AlignVCenter)
- width: parent.width
+ width: Math.min(parent.width-statusWidth, implicitWidth)
height: (parent.height-parent.topPadding-parent.bottomPadding)/parent.visibleChildren.length
- //onTextChanged: console.log("username width: "+text+"=>"+contentWidth+"/"+width)
- //onContentWidthChanged: console.log("usr : "+text+"=>"+contentWidth)
+ Text{
+ id:status
+ anchors.top:parent.top
+ anchors.bottom : parent.bottom
+ anchors.left:parent.right
+ anchors.leftMargin:5
+ verticalAlignment: Text.AlignVCenter
+ visible: text != ''
+ text : ''
+ color: contactDescriptionStyle.username.status.color
+ font.pointSize: contactDescriptionStyle.username.status.pointSize
+ font.italic : true
+ }
}
Text {
@@ -38,14 +58,13 @@ Column {
text: SipAddressesModel.cleanSipAddress(sipAddress)
color: sipAddressColor
elide: Text.ElideRight
- font.pointSize: ContactDescriptionStyle.sipAddress.pointSize
+ font.weight: contactDescriptionStyle.sipAddress.weight
+ font.pointSize: contactDescriptionStyle.sipAddress.pointSize
horizontalAlignment: horizontalTextAlignment
verticalAlignment: (username.visible?Text.AlignTop:Text.AlignVCenter)
- width: parent.width
+ width: Math.min(parent.width-statusWidth, implicitWidth)
height: (parent.height-parent.topPadding-parent.bottomPadding)/parent.visibleChildren.length
visible: text != ''
- //onTextChanged: console.log("address width: "+text+"=>"+contentWidth+"/"+width)
- //onContentWidthChanged: console.log("addr : "+text+"=>"+contentWidth)
}
}
diff --git a/linphone-app/ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml b/linphone-app/ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml
index be43d67cb..12b3ecbbf 100644
--- a/linphone-app/ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml
+++ b/linphone-app/ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml
@@ -1,5 +1,6 @@
pragma Singleton
import QtQml 2.2
+import QtQuick 2.7
import Colors 1.0
import Units 1.0
@@ -7,13 +8,20 @@ import Units 1.0
// =============================================================================
QtObject {
- property QtObject sipAddress: QtObject {
- property color color: Colors.n
- property int pointSize: Units.dp * 10
- }
-
- property QtObject username: QtObject {
- property color color: Colors.j
- property int pointSize: Units.dp * 11
- }
+ property QtObject sipAddress: QtObject {
+ property color color: Colors.n
+ property int pointSize: Units.dp * 10
+ property int weight: Font.Normal
+ }
+
+ property QtObject username: QtObject {
+ property color color: Colors.j
+ property int pointSize: Units.dp * 11
+ property int weight: Font.Bold
+ property QtObject status : QtObject{
+ property color color : Colors.g
+ property int pointSize : Units.dp * 9
+ }
+ }
+
}
diff --git a/linphone-app/ui/modules/Linphone/Styles/View/ParticipantsViewStyle.qml b/linphone-app/ui/modules/Linphone/Styles/View/ParticipantsViewStyle.qml
new file mode 100644
index 000000000..0e7676a89
--- /dev/null
+++ b/linphone-app/ui/modules/Linphone/Styles/View/ParticipantsViewStyle.qml
@@ -0,0 +1,17 @@
+pragma Singleton
+import QtQml 2.2
+
+import Colors 1.0
+import Units 1.0
+
+// =============================================================================
+
+QtObject {
+ property QtObject entry: QtObject {
+
+ property QtObject status: QtObject {
+ property color color : Colors.g
+ property int pointSize : Units.dp * 8
+ }
+ }
+}
diff --git a/linphone-app/ui/modules/Linphone/Styles/qmldir b/linphone-app/ui/modules/Linphone/Styles/qmldir
index e6ee7fb0c..2eccc00c5 100644
--- a/linphone-app/ui/modules/Linphone/Styles/qmldir
+++ b/linphone-app/ui/modules/Linphone/Styles/qmldir
@@ -42,3 +42,4 @@ singleton TelKeypadStyle 1.0 TelKeypad/TelKeypadStyle.qml
singleton TimelineStyle 1.0 Timeline/TimelineStyle.qml
singleton SipAddressesViewStyle 1.0 View/SipAddressesViewStyle.qml
+singleton ParticipantsViewStyle 1.0 View/ParticipantsViewStyle.qml
diff --git a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
index 868bbdde3..3b7e14ac8 100644
--- a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
+++ b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
@@ -21,7 +21,7 @@ ScrollableListView {
property string genSipAddress
- // Optional parameters.
+ // Optional parameters.chatRoomModel.isMeAdmin
property string headerButtonDescription
property string headerButtonIcon
property var headerButtonAction
@@ -29,6 +29,7 @@ ScrollableListView {
property bool showContactAddress : true
property bool showSwitch : false
property bool showSeparator : true
+ property bool showAdminStatus : false
property bool isSelectable : true
property var switchHandler : function(checked, index){
@@ -226,16 +227,25 @@ ScrollableListView {
Layout.fillHeight: true
Layout.fillWidth: true
showContactAddress: sipAddressesView.showContactAddress
+ statusText : showAdminStatus && modelData.adminStatus ? '(Admin)' : ''
entry: modelData
MouseArea {
anchors.fill: parent
- onClicked: sipAddressesView.entryClicked(entry)
+ onClicked: sipAddressesView.entryClicked(parent.entry, index)
+ }
+ BusyIndicator{
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ width:15
+ height:15
+ running: modelData.inviting
}
}
+
// ---------------------------------------------------------------------
// Actions
// ---------------------------------------------------------------------
diff --git a/linphone-app/ui/scripts/Utils/utils.js b/linphone-app/ui/scripts/Utils/utils.js
index f82a23da4..74f0aa134 100644
--- a/linphone-app/ui/scripts/Utils/utils.js
+++ b/linphone-app/ui/scripts/Utils/utils.js
@@ -477,27 +477,39 @@ function findIndex (array, cb, context) {
}
// -----------------------------------------------------------------------------
-
function formatElapsedTime (seconds) {
seconds = parseInt(seconds, 10)
-
- var h = Math.floor(seconds / 3600)
- var m = Math.floor((seconds - h * 3600) / 60)
- var s = seconds - h * 3600 - m * 60
-
- if (h < 10 && h > 0) {
- h = '0' + h
- }
-
- if (m < 10) {
- m = '0' + m
- }
-
- if (s < 10) {
- s = '0' + s
- }
-
- return (h === 0 ? '' : h + ':') + m + ':' + s
+//s, m, h, d, W, M, Y
+//1, 60, 3600, 86400, 604800, 2592000, 31104000
+ var y = Math.floor(seconds / 31104000)
+ if(y > 0)
+ return y+ ' years'
+ var M = Math.floor(seconds / 2592000)
+ if(M > 0)
+ return M+' months'
+ var w = Math.floor(seconds / 604800)
+ if(w>0)
+ return w+' week';
+ var d = Math.floor(seconds / 86400)
+ if(d>0)
+ return d+' days'
+ var h = Math.floor(seconds / 3600)
+ var m = Math.floor((seconds - h * 3600) / 60)
+ var s = seconds - h * 3600 - m * 60
+
+ if (h < 10 && h > 0) {
+ h = '0' + h
+ }
+
+ if (m < 10) {
+ m = '0' + m
+ }
+
+ if (s < 10) {
+ s = '0' + s
+ }
+
+ return (h === 0 ? '' : h + ':') + m + ':' + s
}
// -----------------------------------------------------------------------------
diff --git a/linphone-app/ui/views/App/Main/Conversation.qml b/linphone-app/ui/views/App/Main/Conversation.qml
index bfc367035..635af428b 100644
--- a/linphone-app/ui/views/App/Main/Conversation.qml
+++ b/linphone-app/ui/views/App/Main/Conversation.qml
@@ -6,6 +6,9 @@ import Linphone 1.0
import Utils 1.0
import App.Styles 1.0
+import Common.Styles 1.0
+import Units 1.0
+import Colors 1.0
import 'Conversation.js' as Logic
@@ -74,40 +77,71 @@ ColumnLayout {
Icon {
id: groupChat
- Layout.preferredHeight: ConversationStyle.bar.avatarSize
- Layout.preferredWidth: ConversationStyle.bar.avatarSize
+ Layout.preferredHeight: ConversationStyle.bar.groupChatSize
+ Layout.preferredWidth: ConversationStyle.bar.groupChatSize
icon:'chat_room'
- iconSize: ConversationStyle.bar.avatarSize
+ iconSize: ConversationStyle.bar.groupChatSize
visible: chatRoomModel.groupEnabled
}
RowLayout{
Layout.fillHeight: true
Layout.fillWidth: true
spacing:0
- ContactDescription {
+
+ ColumnLayout{
Layout.fillHeight: true
Layout.minimumWidth: 20
Layout.maximumWidth: contactBar.width-avatar.width-actionBar.width-3*ConversationStyle.bar.spacing
- Layout.preferredWidth: contentWidth
- //sipAddress: conversation.peerAddress
- sipAddressColor: ConversationStyle.bar.description.sipAddressColor
- username: avatar.username
- usernameColor: ConversationStyle.bar.description.usernameColor
-
- sipAddress: {
- if(chatRoomModel) {
- if(chatRoomModel.groupEnabled) {
- return chatRoomModel.participants.displayNamesToString();
- }else if(chatRoomModel.isSecure()) {
- return chatRoomModel.participants.addressesToString();
- }else {
- return chatRoomModel.sipAddress;
- }
- }else {
- return conversation.sipAddress || conversation.fullPeerAddress || conversation.peerAddress || '';
- }
+ Layout.preferredWidth: contactDescription.contentWidth
+ spacing: 5
+ Row{
+ Layout.topMargin: 15
+ Layout.preferredHeight: implicitHeight
+ Layout.alignment: Qt.AlignBottom
+ visible:chatRoomModel.isMeAdmin
+ Icon{
+ id:adminIcon
+ icon : 'admin_selected'
+ iconSize:14
+ }
+ Text{
+ anchors.verticalCenter: parent.verticalCenter
+ text:'Admin'
+ color:"#9FA6AB"
+ font.pointSize: Units.dp * 8
+ }
+ }
+
+ ContactDescription {
+ id:contactDescription
+ Layout.minimumWidth: 20
+ Layout.maximumWidth: contactBar.width-avatar.width-actionBar.width-3*ConversationStyle.bar.spacing
+ Layout.preferredWidth: contentWidth
+ Layout.preferredHeight: contentHeight
+ Layout.alignment: Qt.AlignTop | Qt.AlignLeft
+ contactDescriptionStyle: ConversationStyle.bar.contactDescription
+ username: avatar.username
+ sipAddress: {
+ if(chatRoomModel) {
+ if(chatRoomModel.groupEnabled) {
+ return chatRoomModel.participants.displayNamesToString();
+ }else if(chatRoomModel.isSecure()) {
+ return chatRoomModel.participants.addressesToString();
+ }else {
+ return chatRoomModel.sipAddress;
+ }
+ }else {
+ return conversation.sipAddress || conversation.fullPeerAddress || conversation.peerAddress || '';
+ }
+
+ }
+ }
+ Item{
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ visible: chatRoomModel.isMeAdmin
}
}
Icon{
@@ -213,31 +247,44 @@ ColumnLayout {
id:conversationMenu
x:mainBar.width-width
y:mainBar.height
- width:250
+ menuStyle : MenuStyle.aux2
MenuItem{
text:'Groupe informations'
- iconMenu: 'menu_infos'
- iconSizeMenu: 20
+ iconMenu: (hovered ? 'menu_infos_selected' : 'menu_infos')
+ iconSizeMenu: 25
+ menuItemStyle : MenuItemStyle.aux2
onTriggered: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/InfoChatRoom.qml')
,{chatRoomModel:chatRoomModel})
}
}
+ Rectangle{
+ height:1
+ width:parent.width
+ color:Colors.u
+ }
MenuItem{
text:"Conversation's devices"
- iconMenu: 'menu_devices'
- iconSizeMenu: 20
+ iconMenu: (hovered ? 'menu_devices_selected' : 'menu_devices' )
+ iconSizeMenu: 25
+ menuItemStyle : MenuItemStyle.aux2
onTriggered: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/ParticipantsDevices.qml')
,{chatRoomModel:chatRoomModel, window:window})
}
}
+ Rectangle{
+ height:1
+ width:parent.width
+ color:Colors.u
+ }
MenuItem{
text:'Ephemeral messages'
- iconMenu: 'menu_ephemeral'
- iconSizeMenu: 20
+ iconMenu: (hovered ? 'menu_ephemeral_selected' : 'menu_ephemeral')
+ iconSizeMenu: 25
+ menuItemStyle : MenuItemStyle.aux2
onTriggered: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/EphemeralChatRoom.qml')
diff --git a/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml b/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml
index da69aaf59..b1bad8b4e 100644
--- a/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml
+++ b/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml
@@ -19,57 +19,69 @@ DialogPlus {
buttons: [
TextButtonA {
text: 'QUITTER LE GROUPE'
-
+ textButtonStyle: InfoChatRoomStyle.leaveButton
+ showBorder: true
onClicked:{
chatRoomModel.leaveChatRoom();
exit(0)
}
+ enabled:!chatRoomModel.hasBeenLeft
+ },Item{
+ Layout.fillWidth: true
},
TextButtonB {
text: 'OK'
onClicked: {
- chatRoomModel.updateParticipants(selectedParticipants.getParticipants()) // Remove/New
+ if(!chatRoomModel.hasBeenLeft)
+ chatRoomModel.updateParticipants(selectedParticipants.getParticipants()) // Remove/New
exit(1)
}
}
]
flat : true
+ showCloseCross: true
title: "Group information"
property ChatRoomModel chatRoomModel
- buttonsAlignment: Qt.AlignCenter
+ buttonsAlignment: Qt.AlignBottom
+ buttonsLeftMargin: InfoChatRoomStyle.mainLayout.leftMargin
+ buttonsRightMargin: InfoChatRoomStyle.mainLayout.rightMargin
- height: ManageAccountsStyle.height
- width: ManageAccountsStyle.width
+ height: InfoChatRoomStyle.height
+ width: InfoChatRoomStyle.width
+
+ readonly property bool adminMode : chatRoomModel.isMeAdmin && !chatRoomModel.hasBeenLeft
// ---------------------------------------------------------------------------
ColumnLayout {
+ id:mainLayout
anchors.fill: parent
- anchors.topMargin: 15
- anchors.leftMargin: 10
- anchors.rightMargin: 10
- spacing: 0
+ anchors.topMargin: InfoChatRoomStyle.mainLayout.topMargin
+ anchors.leftMargin: InfoChatRoomStyle.mainLayout.leftMargin
+ anchors.rightMargin: InfoChatRoomStyle.mainLayout.rightMargin
+ spacing: InfoChatRoomStyle.mainLayout.spacing
SmartSearchBar {
id: smartSearchBar
Layout.fillWidth: true
- Layout.topMargin: ConferenceManagerStyle.columns.selector.spacing
+ Layout.topMargin: InfoChatRoomStyle.searchBar.topMargin
showHeader:false
+ visible: dialog.adminMode && chatRoomModel.canHandleParticipants
+
maxMenuHeight: MainWindowStyle.searchBox.maxHeight
- placeholderText: 'toto'
- tooltipText: 'tooltip'
+ placeholderText: 'Ajouter des participants'
+ tooltipText: "Rechercher des participants dans votre liste de contact pour les inviter dans le groupe. L'ajout est effectif une fois le formulaire validé."
actions:[{
icon: 'add_participant',
secure:0,
handler: function (entry) {
selectedParticipants.add(entry.sipAddress)
smartSearchBar.addAddressToIgnore(entry.sipAddress);
- //++lastContacts.reloadCount;
},
}]
@@ -78,60 +90,92 @@ DialogPlus {
}
}
- Text{
- Layout.preferredHeight: 20
- Layout.rightMargin: 65
- Layout.alignment: Qt.AlignRight | Qt.AlignBottom
- Layout.topMargin: ConferenceManagerStyle.columns.selector.spacing
- text : 'Admin'
-
- color: Colors.g
- font.pointSize: Units.dp * 11
- font.weight: Font.Light
- visible: participantView.count > 0
-
- }
+
ScrollableListViewField {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.bottomMargin: 5
//readOnly: toAddView.count >= conferenceManager.maxParticipants
- textFieldStyle: TextFieldStyle.unbordered
+ textFieldStyle: TextFieldStyle.normal
- ParticipantsView {
- id: participantView
- anchors.fill: parent
-
- showContactAddress:false
- showSwitch : true
- showSeparator: false
- isSelectable: false
-
-
- actions: [{
- icon: 'remove_participant',
- tooltipText: 'Remove this participant from the selection',
- handler: function (entry) {
- smartSearchBar.removeAddressToIgnore(entry.sipAddress)
- selectedParticipants.remove(entry)
-// ++lastContacts.reloadCount
- }
- }]
-
- genSipAddress: ''
-
- model: ParticipantProxyModel {
- id:selectedParticipants
- chatRoomModel:dialog.chatRoomModel
+ ColumnLayout{
+ anchors.fill:parent
+ spacing:0
+ Text{
+ Layout.topMargin: InfoChatRoomStyle.results.title.topMargin
+ Layout.leftMargin: InfoChatRoomStyle.results.title.leftMargin
+ text:'Liste des participants'
+ color: InfoChatRoomStyle.results.title.color
+ font.pointSize:InfoChatRoomStyle.results.title.pointSize
+ font.weight: InfoChatRoomStyle.results.title.weight
+ }
+ Text{
+ Layout.preferredHeight: implicitHeight
+ Layout.rightMargin: InfoChatRoomStyle.results.header.rightMargin
+ Layout.alignment: Qt.AlignRight | Qt.AlignBottom
+ //Layout.topMargin: InfoChatRoomStyle.results.topMargin
+ text : 'Admin'
+
+ color: InfoChatRoomStyle.results.header.color
+ font.pointSize: InfoChatRoomStyle.results.header.pointSize
+ font.weight: InfoChatRoomStyle.results.header.weight
+ visible: dialog.adminMode && participantView.count > 0
}
- onEntryClicked: actions[0].handler(entry)
-
+ ParticipantsView {
+ id: participantView
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ //anchors.fill: parent
+
+ showContactAddress:false
+ showSwitch : dialog.adminMode
+ showSeparator: false
+ showAdminStatus:!dialog.adminMode
+ isSelectable: false
+
+
+ actions: dialog.adminMode ? [{
+ icon: 'remove_participant',
+ tooltipText: 'Remove this participant from the selection',
+ handler: function (entry) {
+ smartSearchBar.removeAddressToIgnore(entry.sipAddress)
+ selectedParticipants.remove(entry)
+ // ++lastContacts.reloadCount
+ }
+ }]
+ : []
+
+ genSipAddress: ''
+
+ model: ParticipantProxyModel {
+ id:selectedParticipants
+ chatRoomModel:dialog.chatRoomModel
+
+ }
+
+ onEntryClicked: {//actions[0].handler(entry)
+ if(tooltip.delay>0) {
+ tooltip.oldDelay = tooltip.delay
+ tooltip.delay = 0
+ }
+ tooltip.show(entry.sipAddress, -1);
+ }
+ ToolTip{
+ id:tooltip
+ property int oldDelay : 0
+ MouseArea{
+ anchors.fill:parent
+ onClicked : {
+ tooltip.hide()
+ tooltip.delay = tooltip.oldDelay
+ }
+ }
+ }
+ }
}
}
-
}
-
}
\ No newline at end of file
diff --git a/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml b/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml
index 0cbc42ecc..a1bb21bc5 100644
--- a/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml
+++ b/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml
@@ -1,50 +1,68 @@
pragma Singleton
import QtQml 2.2
+import QtQuick 2.7
import Colors 1.0
+import Units 1.0
// =============================================================================
QtObject {
- property QtObject bar: QtObject {
- property color backgroundColor: Colors.e
- property int avatarSize: 60
- property int height: 80
- property int leftMargin: 40
- property int rightMargin: 30
- property int spacing: 20
-
- property QtObject actions: QtObject {
- property int spacing: 40
-
- property QtObject call: QtObject {
- property int iconSize: 40
- }
-
- property QtObject del: QtObject {
- property int iconSize: 22
- }
-
- property QtObject edit: QtObject {
- property int iconSize: 22
- }
- }
-
- property QtObject description: QtObject {
- property color sipAddressColor: Colors.g
- property color usernameColor: Colors.j
- }
- }
-
- property QtObject filters: QtObject {
- property color backgroundColor: Colors.q
- property int height: 51
- property int leftMargin: 40
-
- property QtObject border: QtObject {
- property color color: Colors.g10
- property int bottomWidth: 1
- property int topWidth: 0
- }
- }
+ property QtObject bar: QtObject {
+ property color backgroundColor: Colors.e
+ property int avatarSize: 60
+ property int groupChatSize: 55
+ property int height: 80
+ property int leftMargin: 40
+ property int rightMargin: 10
+ property int spacing: 20
+
+ property QtObject actions: QtObject {
+ property int spacing: 20
+
+ property QtObject call: QtObject {
+ property int iconSize: 40
+ }
+
+ property QtObject del: QtObject {
+ property int iconSize: 22
+ }
+
+ property QtObject edit: QtObject {
+ property int iconSize: 22
+ }
+ }
+
+ property QtObject contactDescription : QtObject {
+ property QtObject sipAddress: QtObject {
+ property color color: Colors.n
+ property int pointSize: Units.dp * 10
+ property int weight: Font.Light
+ }
+
+ property QtObject username: QtObject {
+ property color color: Colors.j
+ property int pointSize: Units.dp * 11
+ property int weight: Font.Normal
+ property QtObject status : QtObject{
+ property color color : Colors.g
+ property int pointSize : Units.dp * 9
+ }
+ }
+ }
+ }
+
+ property QtObject filters: QtObject {
+ property color backgroundColor: Colors.q
+ property int height: 51
+ property int leftMargin: 40
+
+ property QtObject border: QtObject {
+ property color color: Colors.g10
+ property int bottomWidth: 1
+ property int topWidth: 0
+ }
+ }
+
+
}
diff --git a/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoChatRoomStyle.qml b/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoChatRoomStyle.qml
new file mode 100644
index 000000000..92a9227db
--- /dev/null
+++ b/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoChatRoomStyle.qml
@@ -0,0 +1,64 @@
+pragma Singleton
+import QtQml 2.2
+import QtQuick 2.7
+
+import Colors 1.0
+import Units 1.0
+
+// =============================================================================
+QtObject {
+ property int height: 500
+ property int width: 450
+
+ property QtObject mainLayout: QtObject {
+ property int topMargin: 15
+ property int leftMargin: 25
+ property int rightMargin: 25
+ property int spacing: 7
+
+ }
+ property QtObject searchBar : QtObject{
+ property int topMargin : 10
+ }
+ property QtObject results : QtObject{
+ property int topMargin : 10
+ property color color : Colors.g
+ property QtObject title : QtObject{
+ property int topMargin: 10
+ property int leftMargin: 20
+ property color color: Colors.j
+ property int pointSize : Units.dp * 11
+ property int weight : Font.DemiBold
+ }
+ property QtObject header: QtObject{
+ property int rightMargin: 55
+ property color color: Colors.t
+ property int weight : Font.Light
+ property int pointSize : Units.dp * 10
+
+ }
+ }
+
+ property QtObject leaveButton :
+ QtObject {
+ property QtObject backgroundColor: QtObject {
+ property color disabled: Colors.o
+ property color hovered: Colors.j
+ property color normal: Colors.k
+ property color pressed: Colors.i
+ }
+
+ property QtObject textColor: QtObject {
+ property color disabled: Colors.q
+ property color hovered: Colors.q
+ property color normal: Colors.i
+ property color pressed: Colors.q
+ }
+ property QtObject borderColor : QtObject{
+ property color disabled: Colors.q
+ property color hovered: Colors.q
+ property color normal: Colors.i
+ property color pressed: Colors.q
+ }
+ }
+}
\ No newline at end of file
diff --git a/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qml b/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qml
index 85a9a1e10..890470f7b 100644
--- a/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qml
+++ b/linphone-app/ui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qml
@@ -1,7 +1,10 @@
pragma Singleton
import QtQml 2.2
+import QtQuick 2.7
import Colors 1.0
+import Units 1.0
+
// =============================================================================
diff --git a/linphone-app/ui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qml b/linphone-app/ui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qml
index 534334493..a72644dab 100644
--- a/linphone-app/ui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qml
+++ b/linphone-app/ui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qml
@@ -4,11 +4,11 @@ import QtQml 2.2
// =============================================================================
QtObject {
- property int height: 353
- property int heightWithoutPresence: 284
- property int width: 450
-
- property QtObject accountSelector: QtObject {
- property int height: 176
- }
+ property int height: 353
+ property int heightWithoutPresence: 284
+ property int width: 450
+
+ property QtObject accountSelector: QtObject {
+ property int height: 176
+ }
}
diff --git a/linphone-app/ui/views/App/Styles/qmldir b/linphone-app/ui/views/App/Styles/qmldir
index 225ecd325..b00cb5fa0 100644
--- a/linphone-app/ui/views/App/Styles/qmldir
+++ b/linphone-app/ui/views/App/Styles/qmldir
@@ -36,6 +36,7 @@ singleton MainWindowStyle 1.0 Main/MainWindowStyl
singleton AboutStyle 1.0 Main/Dialogs/AboutStyle.qml
singleton AuthenticationRequestStyle 1.0 Main/Dialogs/AuthenticationRequestStyle.qml
singleton ManageAccountsStyle 1.0 Main/Dialogs/ManageAccountsStyle.qml
+singleton InfoChatRoomStyle 1.0 Main/Dialogs/InfoChatRoomStyle.qml
singleton InfoEncryptionStyle 1.0 Main/Dialogs/InfoEncryptionStyle.qml
# Settings Window --------------------------------------------------------------