From 18f936d3032b9354b3c6bbfc79cfa6e3f02f6484 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Tue, 8 Sep 2015 11:02:03 +0200 Subject: [PATCH] undo misplaced changeset --- YACReader/configuration.h | 4 ---- YACReader/viewer.cpp | 15 +-------------- common/yacreader_global.h | 2 -- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/YACReader/configuration.h b/YACReader/configuration.h index edd42b29..ba9e1531 100644 --- a/YACReader/configuration.h +++ b/YACReader/configuration.h @@ -60,12 +60,8 @@ using namespace YACReader; void setGotoSlideSize(const QSize & gss) { settings->setValue(GO_TO_FLOW_SIZE,gss);} float getZoomLevel() { return settings->value(ZOOM_LEVEL).toFloat();} void setZoomLevel(float zl) { settings->setValue(ZOOM_LEVEL,zl);} - float getPageZoomLevel() { return settings->value(PAGE_ZOOM_LEVEL).toFloat();} - void setPageZoomLevel(float zl) { settings->setValue(PAGE_ZOOM_LEVEL,zl);} bool getAdjustToWidth() {return settings->value(FIT).toBool();} void setAdjustToWidth(bool atw=true) {settings->setValue(FIT,atw);} - bool getFitToPage() {return settings->value(PAGEFIT).toBool();} - void setFitToPage(bool b=true) {settings->setValue(PAGEFIT,b);} FlowType getFlowType(){return (FlowType)settings->value(FLOW_TYPE_SW).toInt();} void setFlowType(FlowType type){settings->setValue(FLOW_TYPE_SW,type);} bool getFullScreen(){return settings->value(FULLSCREEN).toBool();} diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index 2427708c..d0389a0a 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -330,13 +330,7 @@ void Viewer::updateContentSize() { if(Configuration::getConfiguration().getAdjustToFullSize()) { - content->resize(currentPage->size()); - } - else if(Configuration::getConfiguration().getFitToPage()) - { - QSize pagefit=currentPage->size(); - pagefit.scale(size(), Qt::KeepAspectRatio); - content->resize(pagefit); + content->resize(currentPage->width(),currentPage->height()); } else { @@ -363,13 +357,6 @@ void Viewer::updateContentSize() } } - if(Configuration::getConfiguration().getPageZoomLevel()) - { - QSize pagesize=content->size(); - pagesize.scale(content->width()*Configuration::getConfiguration().getPageZoomLevel(), content->height(), Qt::KeepAspectRatio); - content->resize(pagesize); - } - if(devicePixelRatio()>1)//only in retina display { QPixmap page = currentPage->scaled(content->width()*devicePixelRatio(), content->height()*devicePixelRatio(), Qt::KeepAspectRatio, Qt::SmoothTransformation); diff --git a/common/yacreader_global.h b/common/yacreader_global.h index f13bf70b..8b97656a 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -15,12 +15,10 @@ #define PATH "PATH" #define MAG_GLASS_SIZE "MAG_GLASS_SIZE" #define ZOOM_LEVEL "ZOOM_LEVEL" -#define PAGE_ZOOM_LEVEL "PAGE_ZOOM_LEVEL" #define SLIDE_SIZE "SLIDE_SIZE" #define GO_TO_FLOW_SIZE "GO_TO_FLOW_SIZE" #define FLOW_TYPE_SW "FLOW_TYPE_SW" #define FIT "FIT" -#define PAGEFIT "PAGEFIT" #define FLOW_TYPE "FLOW_TYPE" #define FULLSCREEN "FULLSCREEN" #define FIT_TO_WIDTH_RATIO "FIT_TO_WIDTH_RATIO"