diff --git a/CHANGELOG b/CHANGELOG index 2b3bd8cc8..d29f54c3c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,6 +33,8 @@ Version 1.4.0 * fixed possible crash in saving page screen of a really long page * fixed showing window in fullscreen with XFCE * X11: fixed Ctrl+Q shortcut for DEs other than KDE and Gnome + * windows: fixed color of found text when searching on page + * windows: fixed navigating to file links and x: labels in file: scheme handler * windows: fixed downloading utf-8 encoded adblock subscriptions * windows: improved installer allows registering as default web browser * windows: check and set as default browser from preferences diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 0e8eef39b..946e3948c 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -977,7 +977,18 @@ RegisterQAppAssociation* MainApplication::associationManager() QUrl MainApplication::userStyleSheet(const QString &filePath) const { - QString userStyle = AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}"; + QString userStyle; + +#ifdef Q_OS_WIN + // Don't grey out selection on losing focus (to prevent graying out found text) + QPalette pal = style()->standardPalette(); + QString highlightColor = pal.color(QPalette::Highlight).name(); + QString highlightedTextColor = pal.color(QPalette::HighlightedText).name(); + + userStyle += QString("::selection {background: %1; color: %2;} ").arg(highlightColor, highlightedTextColor); +#endif + + userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}"; QFile file(filePath); if (!filePath.isEmpty() && file.open(QFile::ReadOnly)) {