diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2018-03-21 18:49:01 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2018-03-21 18:49:13 -0400 |
commit | 65e219e1dd55bbebc7c02feddfa2b770f4d80f3a (patch) | |
tree | 17c4159c88457ab3ec33ddf8a8c3966ff26ffb61 /src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | |
parent | Update the port makefile for deskutils/lumina-pdf to expose the MuPDF/Poppler... (diff) | |
download | lumina-65e219e1dd55bbebc7c02feddfa2b770f4d80f3a.tar.gz lumina-65e219e1dd55bbebc7c02feddfa2b770f4d80f3a.tar.bz2 lumina-65e219e1dd55bbebc7c02feddfa2b770f4d80f3a.zip |
Added a splitter for the bookmarks menu to be able to change size
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp index 65a71a74..2ef271de 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp @@ -156,6 +156,7 @@ void PrintWidget::highlightText(TextData *text) { QPen highlightOutline(QColor(255, 255, 100, 125)); scene->addRect(rect, highlightOutline, highlightFill); text->highlighted(true); + goToPosition(text->page(), rect.x(), rect.y()); } } @@ -316,16 +317,12 @@ void PrintWidget::fit(bool doFitting) { void PrintWidget::goToPosition(int pagenum, float x, float y) { setCurrentPage(pagenum+1); - QPointF pt = this->transform().map(pages.at(pagenum)->pos()); - - if (zoomMode != FitInView) { - if(x != 0) { - QScrollBar *hsc = this->horizontalScrollBar(); - hsc->setValue(int(pt.x() + x) - 10); - } - if(y != 0) { - QScrollBar *vsc = this->verticalScrollBar(); - vsc->setValue(int(pt.y() + y) - 10); - } + if(x != 0) { + QScrollBar *hsc = this->horizontalScrollBar(); + hsc->setValue((int)x - 10); + } + if(y != 0) { + QScrollBar *vsc = this->verticalScrollBar(); + vsc->setValue((int)y - 10); } } |