Merge branch 'master' into apa-notification-on-live

This commit is contained in:
pajlada
2018-09-16 17:43:53 +02:00
committed by GitHub
53 changed files with 628 additions and 227 deletions
+6 -1
View File
@@ -305,6 +305,7 @@ void ChannelView::clearMessages()
{
// Clear all stored messages in this chat widget
this->messages.clear();
this->scrollBar_->clearHighlights();
// Layout chat widget messages, and force an update regardless if there are
// no messages
@@ -870,11 +871,15 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
return;
}
const auto &tooltip = hoverLayoutElement->getCreator().getTooltip();
bool isLinkValid = hoverLayoutElement->getLink().isValid();
if (tooltip.isEmpty()) {
tooltipWidget->hide();
} else if (isLinkValid && !getSettings()->enableLinkInfoTooltip) {
tooltipWidget->hide();
} else {
tooltipWidget->moveTo(this, event->globalPos());
tooltipWidget->setWordWrap(isLinkValid);
tooltipWidget->setText(tooltip);
tooltipWidget->adjustSize();
tooltipWidget->show();
@@ -882,7 +887,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
}
// check if word has a link
if (hoverLayoutElement->getLink().isValid()) {
if (isLinkValid) {
this->setCursor(Qt::PointingHandCursor);
} else {
this->setCursor(Qt::ArrowCursor);