mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 10:16:34 +01:00
[Windows] Fixed color of selected text when view loses focus.
Closes #756
This commit is contained in:
parent
d01c512520
commit
1cbc8c6d2d
@ -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
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user