mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 23:49:38 -05:00
Merge pull request #2398 from hunbernd/fix/avatartooltip
Fix avatar tooltip
This commit is contained in:
commit
fae6314374
@ -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>(
|
||||
|
@ -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 name"),
|
||||
comment = QString("%1: %2<br/>%3: %4").arg(QApplication::translate("GxsIdDetails", "Identity name"),
|
||||
nickname,
|
||||
QApplication::translate("GxsIdDetails", "Identity Id"),
|
||||
QString::fromStdString(details.mId.toStdString()));
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user