Commit d017c8ae authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Ming Rui Zhang

contactpicker: fix toggle button

Change-Id: Ida5bb5bed0b3a1de68253a49176f3acd383f8919
parent 95263431
...@@ -204,14 +204,15 @@ VideoOverlay::on_transferButton_toggled(bool checked) ...@@ -204,14 +204,15 @@ VideoOverlay::on_transferButton_toggled(bool checked)
// receive the signal that ensure the button checked status is correct and contactpicker // receive the signal that ensure the button checked status is correct and contactpicker
// is properly hidden // is properly hidden
Utils::oneShotConnect(contactPicker_, &ContactPicker::willClose, [this](QMouseEvent *event) { Utils::oneShotConnect(contactPicker_, &ContactPicker::willClose,
contactPicker_->hide(); [this](QMouseEvent *event) {
// check if current mouse position is on button contactPicker_->hide();
auto relativeCursorPos = ui->transferCallButton->mapFromGlobal(event->pos()); // check if current mouse position is on button
if (!ui->transferCallButton->rect().contains(relativeCursorPos)) { auto relativeClickPos = ui->transferCallButton->mapFromGlobal(event->globalPos());
ui->transferCallButton->setChecked(false); if (!ui->transferCallButton->rect().contains(relativeClickPos)) {
} ui->transferCallButton->setChecked(false);
}); }
});
// for esc key, receive reject signal // for esc key, receive reject signal
Utils::oneShotConnect(contactPicker_, &QDialog::rejected, Utils::oneShotConnect(contactPicker_, &QDialog::rejected,
......
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