aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/usermanual.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/usermanual.cpp b/qt-ui/usermanual.cpp
index 6bbfb79e5..6b676f16b 100644
--- a/qt-ui/usermanual.cpp
+++ b/qt-ui/usermanual.cpp
@@ -54,8 +54,11 @@ UserManual::UserManual(QWidget *parent) : QWidget(parent)
setWindowTitle(tr("User manual"));
setWindowIcon(QIcon(":/subsurface-icon"));
-
userManual = new QWebView(this);
+ QString colorBack = palette().highlight().color().name(QColor::HexRgb);
+ QString colorText = palette().highlightedText().color().name(QColor::HexRgb);
+ userManual->setStyleSheet(QString("QWebView { selection-background-color: %1; selection-color: %2; }")
+ .arg(colorBack).arg(colorText));
userManual->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
QString searchPath = getSubsurfaceDataPath("Documentation");
if (searchPath.size()) {