From f4a883ea5d0a3b9e65244264503ea1ccd8c58cc9 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sat, 22 Jun 2019 16:17:23 +0200 Subject: [PATCH 1/3] Partial fix for high res displays Summary: On high res displays we end up using the tile manager on single pages, that doesn't work (for reasons that aren't yet clear) - but it doesn't make sense if we most of the page anyway. BUG: 401339 Reviewers: #okular, aacid Subscribers: okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D20882 --- core/document.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index ddc00e5ee..0a5f0f009 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -1303,6 +1303,7 @@ void DocumentPrivate::sendGeneratorPixmapRequest() QRect requestRect = r->isTile() ? r->normalizedRect().geometry( r->width(), r->height() ) : QRect( 0, 0, r->width(), r->height() ); TilesManager *tilesManager = r->d->tilesManager(); + const double normalizedArea = r->normalizedRect().width() * r->normalizedRect().height(); // If it's a preload but the generator is not threaded no point in trying to preload if ( r->preload() && !m_generator->hasFeature( Generator::Threaded ) ) @@ -1328,8 +1329,10 @@ void DocumentPrivate::sendGeneratorPixmapRequest() m_pixmapRequestsStack.pop_back(); delete r; } - // If the requested area is above 8000000 pixels, switch on the tile manager - else if ( !tilesManager && m_generator->hasFeature( Generator::TiledRendering ) && (long)r->width() * (long)r->height() > 8000000L ) + // If the requested area is above 8000000 pixels, and we're not rendering most of the page, switch on the tile manager + else if ( !tilesManager && m_generator->hasFeature( Generator::TiledRendering ) && + (long)r->width() * (long)r->height() > 8000000L && + normalizedArea < 0.75 && normalizedArea != 0 ) { // if the image is too big. start using tiles qCDebug(OkularCoreDebug).nospace() << "Start using tiles on page " << r->pageNumber() From 16e30bd2e801bf88cae22e49b3c2b3add534908f Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Tue, 25 Jun 2019 07:24:33 +0200 Subject: [PATCH 2/3] GIT_SILENT made messages (after extraction) --- mobile/app/org.kde.okular.kirigami.appdata.xml | 1 + shell/org.kde.okular.appdata.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/mobile/app/org.kde.okular.kirigami.appdata.xml b/mobile/app/org.kde.okular.kirigami.appdata.xml index c1768feec..f6d1307cf 100644 --- a/mobile/app/org.kde.okular.kirigami.appdata.xml +++ b/mobile/app/org.kde.okular.kirigami.appdata.xml @@ -191,6 +191,7 @@ Lesen eines Handbuchs in Okular Reading manual in Okular Lectura del manual en Okular + Eskuliburua Okularren irakurtzea Oppaan lukeminen Okularissa Lecture d'un manuel dans Okular Ler o manual en Okular diff --git a/shell/org.kde.okular.appdata.xml b/shell/org.kde.okular.appdata.xml index 197ca9619..11c6e3bfb 100644 --- a/shell/org.kde.okular.appdata.xml +++ b/shell/org.kde.okular.appdata.xml @@ -254,6 +254,7 @@ Lesen eines Handbuchs in Okular Reading manual in Okular Lectura del manual en Okular + Eskuliburua Okularren irakurtzea Oppaan lukeminen Okularissa Lecture d'un manuel dans Okular Ler o manual en Okular From cf7d847a331c20f1b58bb4b58a6147023902ec55 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 3 Jul 2019 00:15:31 +0200 Subject: [PATCH 3/3] Fix saving "don't show again" when not using frameworksintegration When not using frameworks integration we only get "false" in shouldBeShownYesNo when the saved value is yes/no so set it to yes. Also it was a bit weird before because we were using an uninitialized value, so this is much better :) BUGS: 409430 --- shell/shell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/shell.cpp b/shell/shell.cpp index 19fdc311f..c2ebce9ac 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -573,7 +573,7 @@ bool Shell::queryClose() if (m_tabs.count() > 1) { const QString dontAskAgainName = "ShowTabWarning"; - KMessageBox::ButtonCode dummy; + KMessageBox::ButtonCode dummy = KMessageBox::Yes; if (shouldBeShownYesNo(dontAskAgainName, dummy)) { QDialog *dialog = new QDialog(this);