From 731dead13fbb19a5b283d981e0661f505289bb7e Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Sun, 21 Feb 2021 20:13:42 +1100 Subject: MainWindow: set tab tooltips --- src/mainwindow.cpp | 3 +++ src/widgets/kristalltextbrowser.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8594f7a..8c0fc8a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -376,6 +376,9 @@ void MainWindow::on_tab_titleChanged(const QString &title) updateWindowTitle(); } + // Set tooltip + this->ui->browser_tabs->tab_bar->setTabToolTip(index, title); + // Shorten lengthy titles for tab bar (45 chars max for now - we assume // that Gemini surfers don't usually have loads of tabs open, so the // limit is fairly high) diff --git a/src/widgets/kristalltextbrowser.cpp b/src/widgets/kristalltextbrowser.cpp index 91b5846..e2c017b 100644 --- a/src/widgets/kristalltextbrowser.cpp +++ b/src/widgets/kristalltextbrowser.cpp @@ -111,7 +111,7 @@ void KristallTextBrowser::betterCopy() // as these quotes are usually an annoyance when copying text. // // There is a little trick here though: if a user selects a piece of text - // which consists only of whitespace and fancy quotes (or some punctuation: ,.), + // which consists only of whitespace and fancy quotes // the fancy quotes will be included in the copy. // // In all other cases the quotes will be replaced. This can be said to be @@ -124,7 +124,7 @@ void KristallTextBrowser::betterCopy() if (text.isEmpty()) return; // Check if text only consists of fancy quotes: - static const QRegularExpression REGEX_ONLY_QUOTES(R"(^[\s“”‘’,.]+$)", + static const QRegularExpression REGEX_ONLY_QUOTES(R"(^[\s“”‘’]+$)", QRegularExpression::CaseInsensitiveOption); if (text.contains(REGEX_ONLY_QUOTES)) { -- cgit v1.2.3