Commit 31484f1a authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2

video: refactor overlay

- Add a button to add cm to contact in call
- Add a pause label to clarify HOLD state
- Add checked state feedback for hold button
- Fixed missing tooltip

Change-Id: I3d07b333477f5b3159e387cd65a065579ca4fe86
Tuleap: #322
parent db818e5b
<svg fill="#FFFFFF" height="48" viewBox="0 0 24 24" width="48" xmlns="http://www.w3.org/2000/svg">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
\ No newline at end of file
<RCC>
<qresource prefix="/">
<file>images/video-conf/btn-join.svg</file>
<file>stylesheet.css</file>
<file>images/ring.png</file>
<file>images/arrow-down-bold-circle-outline.png</file>
<file>images/arrow-left-bold.png</file>
<file>images/arrow-up-bold-circle-outline.png</file>
<file>images/close.png</file>
<file>images/logo-ring-standard-coul.png</file>
<file>images/minus.png</file>
<file>images/plus.png</file>
<file>images/settings.png</file>
<file>images/arrow-down.png</file>
<file>images/arrow-up.png</file>
<file>images/folder-download.png</file>
<file>images/arrow-right.png</file>
<file>images/history.png</file>
<file>images/close-ring.png</file>
<file>images/minimize-ring.png</file>
<file>images/maximize-ring.png</file>
<file>images/search-contact.png</file>
<file>images/hover-contact/btn-video.svg</file>
<file>images/hover-contact/btn-chat.svg</file>
<file>images/hover-contact/btn-contactinfo.svg</file>
<file>images/contactswidgetlist.png</file>
<file>images/historylist.png</file>
<file>images/user/btn-default-userpic.svg</file>
<file>images/call/btn-call.svg</file>
<file>images/call/btn-answer.svg</file>
<file>images/call/btn-ignore.svg</file>
<file>images/video-conf/btn-hangup.svg</file>
<file>images/video-conf/btn-pause.svg</file>
<file>images/video-conf/btn-pause-toggled.svg</file>
<file>images/video-conf/btn-chat.svg</file>
<file>images/video-conf/btn-nomic.svg</file>
<file>images/video-conf/btn-nomic-toggled.svg</file>
<file>images/video-conf/btn-novideo.svg</file>
<file>images/video-conf/btn-novideo-toggled.svg</file>
<file>images/video-conf/btn-missing.svg</file>
<file>images/video-conf/btn-add-contact-to-conf.svg</file>
<file>images/video-conf/btn-transfer.svg</file>
<file>images/btn-info.svg</file>
<file>images/ic_arrow_back_white.svg</file>
<file>images/video-conf/ic_high_quality_white.svg</file>
<file>images/ic_send_white.svg</file>
</qresource>
<qresource prefix="/">
<file>images/video-conf/btn-join.svg</file>
<file>stylesheet.css</file>
<file>images/ring.png</file>
<file>images/arrow-down-bold-circle-outline.png</file>
<file>images/arrow-left-bold.png</file>
<file>images/arrow-up-bold-circle-outline.png</file>
<file>images/close.png</file>
<file>images/logo-ring-standard-coul.png</file>
<file>images/minus.png</file>
<file>images/plus.png</file>
<file>images/settings.png</file>
<file>images/arrow-down.png</file>
<file>images/arrow-up.png</file>
<file>images/folder-download.png</file>
<file>images/arrow-right.png</file>
<file>images/history.png</file>
<file>images/close-ring.png</file>
<file>images/minimize-ring.png</file>
<file>images/maximize-ring.png</file>
<file>images/search-contact.png</file>
<file>images/hover-contact/btn-video.svg</file>
<file>images/hover-contact/btn-chat.svg</file>
<file>images/hover-contact/btn-contactinfo.svg</file>
<file>images/contactswidgetlist.png</file>
<file>images/historylist.png</file>
<file>images/user/btn-default-userpic.svg</file>
<file>images/call/btn-call.svg</file>
<file>images/call/btn-answer.svg</file>
<file>images/call/btn-ignore.svg</file>
<file>images/video-conf/btn-hangup.svg</file>
<file>images/video-conf/btn-pause.svg</file>
<file>images/video-conf/btn-pause-toggled.svg</file>
<file>images/video-conf/btn-chat.svg</file>
<file>images/video-conf/btn-nomic.svg</file>
<file>images/video-conf/btn-nomic-toggled.svg</file>
<file>images/video-conf/btn-novideo.svg</file>
<file>images/video-conf/btn-novideo-toggled.svg</file>
<file>images/video-conf/btn-missing.svg</file>
<file>images/video-conf/btn-add-contact-to-conf.svg</file>
<file>images/video-conf/btn-transfer.svg</file>
<file>images/btn-info.svg</file>
<file>images/ic_arrow_back_white.svg</file>
<file>images/video-conf/ic_high_quality_white.svg</file>
<file>images/ic_send_white.svg</file>
<file>images/ic_pause_white.svg</file>
</qresource>
</RCC>
......@@ -97,20 +97,18 @@ QPushButton#transferButton, QPushButton#addPersonButton, QPushButton#joinButton,
}
QPushButton#holdButton:hover, QPushButton#chatButton:hover, QPushButton#noMicButton:hover, QPushButton#noVideoButton:hover,
QPushButton#transferButton:hover, QPushButton#addPersonButton:hover, QPushButton#joinButton:hover, QPushButton#qualityButton:hover{
QPushButton#transferButton:hover, QPushButton#addPersonButton:hover, QPushButton#joinButton:hover, QPushButton#qualityButton:hover,
QPushButton#addToContactButton:hover{
background-color: rgba(0, 192, 213, 0.6);
border-radius: 18px;
border:solid 1px;
}
QPushButton#holdButton:pressed, QPushButton#chatButton:pressed, QPushButton#noMicButton:pressed, QPushButton#noVideoButton:pressed,
QPushButton#transferButton:pressed, QPushButton#addPersonButton:pressed, QPushButton#joinButton:pressed, QPushButton#qualityButton:pressed{
QPushButton#transferButton:pressed, QPushButton#addPersonButton:pressed, QPushButton#joinButton:pressed, QPushButton#qualityButton:pressed,
QPushButton#addToContactButton:pressed{
background-color: rgba(0, 192, 213, 0.8);
border-radius: 18px;
border:solid 1px;
}
QPushButton#noMicButton:checked, QPushButton#noVideoButton:checked{
QPushButton#holdButton:checked, QPushButton#noMicButton:checked, QPushButton#noVideoButton:checked{
background-color: rgba(0, 192, 213, 0.8);
}
......@@ -128,7 +126,7 @@ QPushButton#hangupButton:pressed{
background-color: rgba(255, 0, 0, 0.8);
}
QPushButton#imBackButton{
QPushButton#imBackButton, QPushButton#addToContactButton{
background-color: #414141;
border-radius: 15px;
border:solid 1px;
......
......@@ -19,7 +19,11 @@
#include "videooverlay.h"
#include "ui_videooverlay.h"
#include "contactpicker.h"
#include "callmodel.h"
#include "contactmethod.h"
#include "person.h"
VideoOverlay::VideoOverlay(QWidget* parent) :
QWidget(parent),
......@@ -57,6 +61,7 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
case UserActionModel::Action::HOLD:
ui->holdButton->setChecked(idx.data(Qt::CheckStateRole).value<bool>());
ui->holdButton->setEnabled(idx.flags() & Qt::ItemIsEnabled);
ui->onHoldLabel->setVisible(idx.data(Qt::CheckStateRole).value<bool>());
break;
default:
break;
......@@ -83,6 +88,9 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
ui->joinButton->hide();
}
if (auto contactMethod = c->peerContactMethod())
ui->addToContactButton->setVisible(not contactMethod->contact()
|| contactMethod->contact()->isPlaceHolder());
}
});
}
......@@ -177,3 +185,15 @@ VideoOverlay::on_qualityButton_clicked()
pos.y() - (qualityDialog_->height()));
qualityDialog_->show();
}
void
VideoOverlay::on_addToContactButton_clicked()
{
QPoint globalPos = mapToGlobal(ui->addToContactButton->pos());
if (auto contactMethod = CallModel::instance().selectedCall()->peerContactMethod()) {
ContactPicker contactPicker(contactMethod);
contactPicker.move(globalPos.x(),
globalPos.y() + ui->addToContactButton->height());
contactPicker.exec();
}
}
......@@ -53,6 +53,7 @@ private slots:
void on_noMicButton_clicked();
void on_noVideoButton_clicked();
void on_qualityButton_clicked();
void on_addToContactButton_clicked();
private:
Ui::VideoOverlay* ui;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment