diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/browsertab.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index f98a0f2..18ec5cc 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -1136,6 +1136,7 @@ void BrowserTab::updateUrlBarStyle() // Set all text to default colour if url bar // is focused, is at an internal location (like about:...), // or has an invalid URL. + static bool no_style = false; if (!kristall::options.fancy_urlbar || this->ui->url_bar->hasFocus() || !url.isValid() || @@ -1143,11 +1144,17 @@ void BrowserTab::updateUrlBarStyle() mainWindow->settings_visible) { // Disable styling - setLineEditTextFormat(this->ui->url_bar, - QList<QTextLayout::FormatRange>()); + if (!no_style) + { + setLineEditTextFormat(this->ui->url_bar, + QList<QTextLayout::FormatRange>()); + no_style = true; + } return; } + no_style = false; + // Styling enabled: 'authority' (hostname, port, etc) of // the URL is highlighted (i.e default colour), // the rest is in grey-ish colour @@ -1170,7 +1177,6 @@ void BrowserTab::updateUrlBarStyle() QTextCharFormat f; f.setForeground(mainWindow->palette().color(QPalette::PlaceholderText)); - // Create format range for left-side of URL QTextLayout::FormatRange fr_left; fr_left.start = 0; |
