diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-07-27 22:08:01 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-08-05 09:36:49 +0000 |
commit | 114674f7d8bf4c1e919d42d76ce34ad43830ed09 (patch) | |
tree | 456174fc0e4d4a6c5a4f33d956610f57587a68c1 | |
parent | 3ab6239530810b482d6033bac3d781acea8453ac (diff) | |
download | qtlocation-114674f7d8bf4c1e919d42d76ce34ad43830ed09.tar.gz |
Fix for invisible copyright notice with Holo theme on android
The copyright notice is currently rendered using the default application
palette.
This patch forces the text and link colors to black and blue, since
the notice is always shown on top of the map and other colors may not
work.
Task-number: QTBUG-54964
Change-Id: Icc8832124cd64d5326e0aa7540e3287c4325d31d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp index f2c44833..a33f10ff 100644 --- a/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp +++ b/src/imports/location/qdeclarativegeomapcopyrightsnotice.cpp @@ -137,7 +137,11 @@ void QDeclarativeGeoMapCopyrightNotice::copyrightsChanged(const QString ©rig m_copyrightsImage.fill(qPremultiply(qRgba(255, 255, 255, 128))); QPainter painter(&m_copyrightsImage); - m_copyrightsHtml->drawContents(&painter); + //m_copyrightsHtml->drawContents(&painter); // <- this uses the default application palette, that might have, f.ex., white text + QAbstractTextDocumentLayout::PaintContext ctx; + ctx.palette.setColor(QPalette::Text, QColor(QStringLiteral("black"))); + ctx.palette.setColor(QPalette::Link, QColor(QStringLiteral("blue"))); + m_copyrightsHtml->documentLayout()->draw(&painter, ctx); setWidth(m_copyrightsImage.width()); setHeight(m_copyrightsImage.height()); |