Merge pull request #2398 from hunbernd/fix/avatartooltip

Fix avatar tooltip
This commit is contained in:
csoler 2021-03-28 11:11:31 +02:00 committed by GitHub
commit fae6314374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 11 deletions

View File

@ -361,11 +361,9 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
[this](const std::shared_ptr<rb::Session> session)
{
const std::weak_ptr<rb::Service> weakService(mService);
const std::multimap<std::string, std::string> headers
{
{ "Connection", "keep-alive" },
{ "Content-Type", "text/event-stream" }
};
auto headers = corsHeaders;
headers.insert({ "Connection", "keep-alive" });
headers.insert({ "Content-Type", "text/event-stream" });
session->yield(rb::OK, headers);
size_t reqSize = static_cast<size_t>(

View File

@ -1104,7 +1104,7 @@ QString nickname ;
nickname = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE) ;
comment = QString("%1:%2<br/>%3:%4").arg(QApplication::translate("GxsIdDetails", "Identity&nbsp;name"),
comment = QString("%1: %2<br/>%3: %4").arg(QApplication::translate("GxsIdDetails", "Identity&nbsp;name"),
nickname,
QApplication::translate("GxsIdDetails", "Identity&nbsp;Id"),
QString::fromStdString(details.mId.toStdString()));

View File

@ -169,8 +169,11 @@ QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
QString embeddedImage;
if ( RsHtml::makeEmbeddedImage( pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation ).toImage(), embeddedImage, 8*S * 8*S ) )
if ( RsHtml::makeEmbeddedImage( pix.scaled(QSize(5*S,5*S), Qt::KeepAspectRatio, Qt::SmoothTransformation ).toImage(), embeddedImage, -1 ) )
{
embeddedImage.insert(embeddedImage.indexOf("src="), "style=\"float:left\" ");
t = "<table><tr><td>" + embeddedImage + "</td><td>" + t + "</td></table>";
}
return t;
}

View File

@ -563,11 +563,14 @@ QVariant RsGxsForumModel::toolTipRole(const ForumModelPostEntry& fmpe,int column
return QVariant();
int S = QFontMetricsF(QApplication::font()).height();
QImage pix( (*icons.begin()).pixmap(QSize(4*S,4*S)).toImage());
QImage pix( (*icons.begin()).pixmap(QSize(5*S,5*S)).toImage());
QString embeddedImage;
if(RsHtml::makeEmbeddedImage(pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, 8*S * 8*S))
if(RsHtml::makeEmbeddedImage(pix.scaled(QSize(5*S,5*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, -1))
{
embeddedImage.insert(embeddedImage.indexOf("src="), "style=\"float:left\" ");
comment = "<table><tr><td>" + embeddedImage + "</td><td>" + comment + "</td></table>";
}
return comment;
}

View File

@ -399,11 +399,14 @@ QVariant RsMessageModel::toolTipRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
return QVariant();
int S = QFontMetricsF(QApplication::font()).height();
QImage pix( (*icons.begin()).pixmap(QSize(4*S,4*S)).toImage());
QImage pix( (*icons.begin()).pixmap(QSize(5*S,5*S)).toImage());
QString embeddedImage;
if(RsHtml::makeEmbeddedImage(pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, 8*S * 8*S))
if(RsHtml::makeEmbeddedImage(pix.scaled(QSize(5*S,5*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, -1))
{
embeddedImage.insert(embeddedImage.indexOf("src="), "style=\"float:left\" ");
comment = "<table><tr><td>" + embeddedImage + "</td><td>" + comment + "</td></table>";
}
return comment;
}