mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr857'
This commit is contained in:
commit
983c0b7e6b
|
@ -87,6 +87,7 @@ void ChatAreaWidget::mouseReleaseEvent(QMouseEvent * event)
|
|||
}
|
||||
}
|
||||
}
|
||||
emit onClick();
|
||||
}
|
||||
|
||||
void ChatAreaWidget::onAnchorClicked(const QUrl &url)
|
||||
|
|
|
@ -41,6 +41,7 @@ public slots:
|
|||
|
||||
signals:
|
||||
void onFileTranfertInterract(QString widgetName, QString buttonName);
|
||||
void onClick();
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent * event);
|
||||
|
|
|
@ -152,6 +152,7 @@ GenericChatForm::GenericChatForm(QWidget *parent) :
|
|||
|
||||
connect(emoteButton, SIGNAL(clicked()), this, SLOT(onEmoteButtonClicked()));
|
||||
connect(chatWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onChatContextMenuRequested(QPoint)));
|
||||
connect(chatWidget, SIGNAL(onClick()), this, SLOT(onChatWidgetClicked()));
|
||||
|
||||
chatWidget->document()->setDefaultStyleSheet(Style::getStylesheet(":ui/chatArea/innerStyle.css"));
|
||||
chatWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatArea.css"));
|
||||
|
@ -252,6 +253,11 @@ void GenericChatForm::onEmoteButtonClicked()
|
|||
}
|
||||
}
|
||||
|
||||
void GenericChatForm::onChatWidgetClicked()
|
||||
{
|
||||
msgEdit->setFocus();
|
||||
}
|
||||
|
||||
void GenericChatForm::onEmoteInsertRequested(QString str)
|
||||
{
|
||||
// insert the emoticon
|
||||
|
|
|
@ -69,6 +69,7 @@ protected slots:
|
|||
void onEmoteButtonClicked();
|
||||
void onEmoteInsertRequested(QString str);
|
||||
void clearChatArea(bool);
|
||||
void onChatWidgetClicked();
|
||||
|
||||
protected:
|
||||
QString getElidedName(const QString& name);
|
||||
|
|
|
@ -209,9 +209,6 @@ void GroupChatForm::onCallClicked()
|
|||
|
||||
void GroupChatForm::keyPressEvent(QKeyEvent* ev)
|
||||
{
|
||||
if (msgEdit->hasFocus())
|
||||
return;
|
||||
|
||||
// Push to talk (CTRL+P)
|
||||
if (ev->key() == Qt::Key_P && (ev->modifiers() & Qt::ControlModifier) && inCall)
|
||||
{
|
||||
|
@ -224,15 +221,15 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev)
|
|||
Style::repolish(micButton);
|
||||
}
|
||||
}
|
||||
|
||||
if (msgEdit->hasFocus())
|
||||
return;
|
||||
}
|
||||
|
||||
void GroupChatForm::keyReleaseEvent(QKeyEvent* ev)
|
||||
{
|
||||
if (msgEdit->hasFocus())
|
||||
return;
|
||||
|
||||
// Push to talk (CTRL+P (only need to release P))
|
||||
if (ev->key() == Qt::Key_P && inCall)
|
||||
// Push to talk (CTRL+P)
|
||||
if (ev->key() == Qt::Key_P && (ev->modifiers() & Qt::ControlModifier) && inCall)
|
||||
{
|
||||
Core* core = Core::getInstance();
|
||||
if (core->isGroupCallMicEnabled(group->getGroupId()))
|
||||
|
@ -243,4 +240,7 @@ void GroupChatForm::keyReleaseEvent(QKeyEvent* ev)
|
|||
Style::repolish(micButton);
|
||||
}
|
||||
}
|
||||
|
||||
if (msgEdit->hasFocus())
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user