update the slider when the zoom changes

This commit is contained in:
Luis Ángel San Martín 2015-12-09 00:03:15 +01:00
parent 65789aaa68
commit e35c8bf612
3 changed files with 6 additions and 0 deletions

View File

@ -539,6 +539,7 @@ void MainWindowViewer::createToolBars()
connect(showZoomSliderlAction,SIGNAL(triggered()),this,SLOT(toggleFitToWidthSlider()));
connect(zoomSliderAction, SIGNAL(zoomRatioChanged(float)),viewer,SLOT(updateZoomRatio(float)));
connect(viewer,SIGNAL(zoomUpdated(float)),zoomSliderAction,SLOT(updateZoomRatio(float)));
#endif
comicToolBar->addAction(leftRotationAction);

View File

@ -382,6 +382,8 @@ void Viewer::increaseZoomFactor()
updateContentSize();
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
notificationsLabel->flash();
emit zoomUpdated(zoom);
}
void Viewer::decreaseZoomFactor()
{
@ -391,6 +393,8 @@ void Viewer::decreaseZoomFactor()
updateContentSize();
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
notificationsLabel->flash();
emit zoomUpdated(zoom);
}
qreal Viewer::getZoomFactor()

View File

@ -171,6 +171,7 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
void reset();
void openNextComic();
void openPreviousComic();
void zoomUpdated(float);
};
#endif