Skip to content

Commit

Permalink
Merge pull request #10090 from qgis/backport-10081-to-release-3_4
Browse files Browse the repository at this point in the history
[Backport release-3_4] [maptips] restore wrapping of the long lines (fix #21388)
  • Loading branch information
alexbruy committed May 24, 2019
2 parents c16a98d + a87b46b commit ca0b739
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/gui/qgsmaptip.cpp
Expand Up @@ -106,7 +106,7 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,

backgroundColor = mWidget->palette().base().color().name();
strokeColor = mWidget->palette().shadow().color().name();
mWidget->setStyleSheet( QString(
mWidget->setStyleSheet( QStringLiteral(
".QWidget{"
"border: 1px solid %1;"
"background-color: %2;}" ).arg(
Expand All @@ -126,17 +126,16 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
return;
}

bodyStyle = QString(
bodyStyle = QStringLiteral(
"background-color: %1;"
"margin: 0;"
"white-space: nowrap;"
"font: %2pt \"%3\";" ).arg( backgroundColor ).arg( mFontSize ).arg( mFontFamily );

containerStyle = QString(
containerStyle = QStringLiteral(
"display: inline-block;"
"margin: 0px" );

tipHtml = QString(
tipHtml = QStringLiteral(
"<html>"
"<body style='%1'>"
"<div id='QgsWebViewContainer' style='%2'>%3</div>"
Expand Down

0 comments on commit ca0b739

Please sign in to comment.