From 223bcc8cb36667eefb601ded9cec6acca2d0f685 Mon Sep 17 00:00:00 2001 From: Olivier SOLDANO <olivier.soldano@savoirfairelinux.com> Date: Wed, 19 Jul 2017 16:05:05 -0400 Subject: [PATCH] change video overlay buttons if fullscreen the buttons back and config were shown on the overlay in full screen. However due the the preemption of the full screen mode, they seem to have no effect for the user, but changes the page in background. Thus when in full screen, these buttons are hidden. Change-Id: Iba0bd7f5630523a7f56a932bc96cf0eb583c4266 Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> --- videooverlay.cpp | 18 ++++++++++++++++++ videooverlay.h | 1 + videoview.cpp | 1 + 3 files changed, 20 insertions(+) diff --git a/videooverlay.cpp b/videooverlay.cpp index 9e30be7..8643b07 100644 --- a/videooverlay.cpp +++ b/videooverlay.cpp @@ -19,12 +19,16 @@ #include "videooverlay.h" #include "ui_videooverlay.h" +// Client #include "contactpicker.h" +// LRC #include "callmodel.h" #include "contactmethod.h" #include "person.h" + + VideoOverlay::VideoOverlay(QWidget* parent) : QWidget(parent), ui(new Ui::VideoOverlay), @@ -101,6 +105,9 @@ VideoOverlay::VideoOverlay(QWidget* parent) : connect(qualityDialog_, &QualityDialog::isVisible, [this] (bool visible) { dialogVisible_ = visible; }); + + // temporary hide + ui->addPersonButton->hide(); } VideoOverlay::~VideoOverlay() @@ -122,6 +129,17 @@ VideoOverlay::setTime(const QString& time) ui->timerLabel->setText(time); } +void VideoOverlay::toggleContextButtons(bool visible) +{ + if (! visible) { + ui->videoCfgBtn->hide(); + ui->videoBackBtn->hide(); + } else { + ui->videoCfgBtn->show(); + ui->videoBackBtn->show(); + } +} + void VideoOverlay::on_hangupButton_clicked() { diff --git a/videooverlay.h b/videooverlay.h index c525a3a..280b13c 100644 --- a/videooverlay.h +++ b/videooverlay.h @@ -42,6 +42,7 @@ public: void setName(const QString& name); void setTime(const QString& time); inline bool isDialogVisible(){ return dialogVisible_; }; + void toggleContextButtons(bool visible); //UI SLOTS private slots: diff --git a/videoview.cpp b/videoview.cpp index 46d069f..511d0be 100644 --- a/videoview.cpp +++ b/videoview.cpp @@ -185,6 +185,7 @@ VideoView::dropEvent(QDropEvent* event) void VideoView::toggleFullScreen() { + overlay_->toggleContextButtons(isFullScreen()); if(isFullScreen()) { dynamic_cast<QSplitter*>(oldParent_)->insertWidget(0,this); this->resize(oldSize_.width(), oldSize_.height()); -- GitLab