mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
[maptip] Fix illegible map tips with dark themes (fixes #32288)
This commit is contained in:
parent
16676ff93a
commit
01e4849466
@ -67,7 +67,7 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
|
||||
|
||||
// Show the maptip on the canvas
|
||||
QString tipText, lastTipText, tipHtml, bodyStyle, containerStyle,
|
||||
backgroundColor, strokeColor;
|
||||
backgroundColor, strokeColor, textColor;
|
||||
|
||||
delete mWidget;
|
||||
mWidget = new QWidget( pMapCanvas );
|
||||
@ -108,6 +108,7 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
|
||||
|
||||
backgroundColor = mWidget->palette().base().color().name();
|
||||
strokeColor = mWidget->palette().shadow().color().name();
|
||||
textColor = mWidget->palette().text().color().name();
|
||||
mWidget->setStyleSheet( QString(
|
||||
".QWidget{"
|
||||
"border: 1px solid %1;"
|
||||
@ -131,7 +132,8 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,
|
||||
bodyStyle = QString(
|
||||
"background-color: %1;"
|
||||
"margin: 0;"
|
||||
"font: %2pt \"%3\";" ).arg( backgroundColor ).arg( mFontSize ).arg( mFontFamily );
|
||||
"font: %2pt \"%3\";"
|
||||
"color: %4;" ).arg( backgroundColor ).arg( mFontSize ).arg( mFontFamily ).arg( textColor );
|
||||
|
||||
containerStyle = QString(
|
||||
"display: inline-block;"
|
||||
|
Loading…
x
Reference in New Issue
Block a user