diff --git a/YACReader/configuration.cpp b/YACReader/configuration.cpp index 059d4090..909a76c8 100644 --- a/YACReader/configuration.cpp +++ b/YACReader/configuration.cpp @@ -39,11 +39,8 @@ void Configuration::load(QSettings * settings) settings->setValue(FLOW_TYPE,0); if(!settings->contains(FULLSCREEN)) settings->setValue(FULLSCREEN,false); - -//TODO: Replace this with zoom mode if(!settings->contains(FIT_TO_WIDTH_RATIO)) settings->setValue(FIT_TO_WIDTH_RATIO,1); - if(!settings->contains(Y_WINDOW_SIZE)) settings->setValue(Y_WINDOW_SIZE,QSize(0,0)); if(!settings->contains(MAXIMIZED)) diff --git a/YACReader/configuration.h b/YACReader/configuration.h index 559e05d1..213e58ce 100644 --- a/YACReader/configuration.h +++ b/YACReader/configuration.h @@ -27,7 +27,7 @@ using namespace YACReader; QSize magnifyingGlassSize; QSize gotoSlideSize; float zoomLevel; - //bool adjustToWidth; + bool adjustToWidth; bool fullScreen; FlowType flowType; float fitToWidthRatio; diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 3809482b..d69b04f3 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -415,7 +415,7 @@ void MainWindowViewer::createActions() fitToPageAction = new QAction(tr("Fit to page"),this); //fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); - //fitToPageAction->setCheckable(true); + fitToPageAction->setCheckable(true); fitToPageAction->setDisabled(true); //fitToPageAction->setChecked(Configuration::getConfiguration().getFitToPage()); fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y); @@ -423,20 +423,19 @@ void MainWindowViewer::createActions() connect(fitToPageAction,SIGNAL(triggered()),this,SLOT(fitToPageSwitch())); increasePageZoomAction = new QAction(tr("Zoom+"),this); - //increasePageZoomAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); - increasePageZoomAction->setDisabled(true); - increasePageZoomAction->setData(ZOOM_PLUS_ACTION_Y); - increasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_PLUS_ACTION_Y)); - + //fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); + //fitToPageAction->setDisabled(true); + //fitToPageAction->setChecked(Configuration::getConfiguration().getFitToPage()); + //fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y); + increasePageZoomAction->setShortcut(QKeySequence::ZoomIn); connect(increasePageZoomAction,SIGNAL(triggered()),this,SLOT(increasePageZoomLevel())); decreasePageZoomAction = new QAction(tr("Zoom-"),this); - //decreasePageZoomAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); - decreasePageZoomAction->setDisabled(true); - decreasePageZoomAction->setData(ZOOM_MINUS_ACTION_Y); - decreasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_MINUS_ACTION_Y)); - //decreasePageZoomAction->setShortcut(QKeySequence::ZoomOut); - + //fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); + //fitToPageAction->setDisabled(true); + //fitToPageAction->setChecked(Configuration::getConfiguration().getFitToPage()); + //fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y); + decreasePageZoomAction->setShortcut(QKeySequence::ZoomOut); connect(decreasePageZoomAction,SIGNAL(triggered()),this,SLOT(decreasePageZoomLevel())); showFlowAction = new QAction(tr("Show go to flow"),this); @@ -855,8 +854,6 @@ void MainWindowViewer::enableActions() doubleMangaPageAction->setDisabled(false); adjustToFullSizeAction->setDisabled(false); fitToPageAction->setDisabled(false); - increasePageZoomAction->setDisabled(false); - decreasePageZoomAction->setDisabled(false); //setBookmark->setDisabled(false); showBookmarksAction->setDisabled(false); showInfoAction->setDisabled(false); //TODO enable goTo and showInfo (or update) when numPages emited diff --git a/common/yacreader_global.h b/common/yacreader_global.h index bcff7922..a72c372e 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -19,8 +19,8 @@ #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 FIT "FIT" +#define PAGEFIT "PAGEFIT" #define FITMODE "FITMODE" #define FLOW_TYPE "FLOW_TYPE" #define FULLSCREEN "FULLSCREEN" @@ -30,7 +30,7 @@ #define MAXIMIZED "MAXIMIZED" #define DOUBLE_PAGE "DOUBLE_PAGE" #define DOUBLE_MANGA_PAGE "DOUBLE_MANGA_PAGE" -//#define ADJUST_TO_FULL_SIZE "ADJUST_TO_FULL_SIZE" +#define ADJUST_TO_FULL_SIZE "ADJUST_TO_FULL_SIZE" #define BACKGROUND_COLOR "BACKGROUND_COLOR" #define ALWAYS_ON_TOP "ALWAYS_ON_TOP" #define SHOW_TOOLBARS "SHOW_TOOLBARS" diff --git a/shortcuts_management/shortcuts_manager.cpp b/shortcuts_management/shortcuts_manager.cpp index 7434e6a7..bbde5df5 100644 --- a/shortcuts_management/shortcuts_manager.cpp +++ b/shortcuts_management/shortcuts_manager.cpp @@ -52,9 +52,7 @@ void ShortcutsManager::initDefaultShorcuts() defaultShorcuts.insert(ALWAYS_ON_TOP_ACTION_Y, Qt::Key_Q); //deprecated defaultShorcuts.insert(ADJUST_TO_FULL_SIZE_ACTION_Y, Qt::Key_W); defaultShorcuts.insert(SHOW_FLOW_ACTION_Y, Qt::Key_S); - defaultShorcuts.insert(ZOOM_PLUS_ACTION_Y, QKeySequence::ZoomIn); - defaultShorcuts.insert(ZOOM_MINUS_ACTION_Y, QKeySequence::ZoomOut); - + //main_window_viewer defaultShorcuts.insert(TOGGLE_FULL_SCREEN_ACTION_Y, Qt::Key_F); defaultShorcuts.insert(TOGGLE_TOOL_BARS_ACTION_Y, Qt::Key_H); diff --git a/shortcuts_management/shortcuts_manager.h b/shortcuts_management/shortcuts_manager.h index 01e0ff04..c2cd00e8 100644 --- a/shortcuts_management/shortcuts_manager.h +++ b/shortcuts_management/shortcuts_manager.h @@ -111,8 +111,6 @@ public: #define ALWAYS_ON_TOP_ACTION_Y "ALWAYS_ON_TOP_ACTION_Y" #define ADJUST_TO_FULL_SIZE_ACTION_Y "ADJUST_TO_FULL_SIZE_ACTION_Y" #define FIT_TO_PAGE_ACTION_Y "FIT_TO_PAGE_ACTION_Y" -#define ZOOM_PLUS_ACTION_Y "ZOOM_PLUS_ACTION_Y" -#define ZOOM_MINUS_ACTION_Y "ZOOM_MINUS_ACTION_Y" #define SHOW_FLOW_ACTION_Y "SHOW_FLOW_ACTION_Y" #define SHOW_EDIT_SHORTCUTS_ACTION_Y "SHOW_EDIT_SHORTCUTS_ACTION_Y"