mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Focus the text input area when clicking on the text area
This commit is contained in:
parent
324d075cfe
commit
424af0505e
|
@ -87,6 +87,7 @@ void ChatAreaWidget::mouseReleaseEvent(QMouseEvent * event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
emit onClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatAreaWidget::onAnchorClicked(const QUrl &url)
|
void ChatAreaWidget::onAnchorClicked(const QUrl &url)
|
||||||
|
|
|
@ -41,6 +41,7 @@ public slots:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void onFileTranfertInterract(QString widgetName, QString buttonName);
|
void onFileTranfertInterract(QString widgetName, QString buttonName);
|
||||||
|
void onClick();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseReleaseEvent(QMouseEvent * event);
|
void mouseReleaseEvent(QMouseEvent * event);
|
||||||
|
|
|
@ -152,6 +152,7 @@ GenericChatForm::GenericChatForm(QWidget *parent) :
|
||||||
|
|
||||||
connect(emoteButton, SIGNAL(clicked()), this, SLOT(onEmoteButtonClicked()));
|
connect(emoteButton, SIGNAL(clicked()), this, SLOT(onEmoteButtonClicked()));
|
||||||
connect(chatWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onChatContextMenuRequested(QPoint)));
|
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->document()->setDefaultStyleSheet(Style::getStylesheet(":ui/chatArea/innerStyle.css"));
|
||||||
chatWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatArea.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)
|
void GenericChatForm::onEmoteInsertRequested(QString str)
|
||||||
{
|
{
|
||||||
// insert the emoticon
|
// insert the emoticon
|
||||||
|
|
|
@ -69,6 +69,7 @@ protected slots:
|
||||||
void onEmoteButtonClicked();
|
void onEmoteButtonClicked();
|
||||||
void onEmoteInsertRequested(QString str);
|
void onEmoteInsertRequested(QString str);
|
||||||
void clearChatArea(bool);
|
void clearChatArea(bool);
|
||||||
|
void onChatWidgetClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString getElidedName(const QString& name);
|
QString getElidedName(const QString& name);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user