mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
update the slider when the zoom changes
This commit is contained in:
parent
65789aaa68
commit
e35c8bf612
@ -539,6 +539,7 @@ void MainWindowViewer::createToolBars()
|
|||||||
|
|
||||||
connect(showZoomSliderlAction,SIGNAL(triggered()),this,SLOT(toggleFitToWidthSlider()));
|
connect(showZoomSliderlAction,SIGNAL(triggered()),this,SLOT(toggleFitToWidthSlider()));
|
||||||
connect(zoomSliderAction, SIGNAL(zoomRatioChanged(float)),viewer,SLOT(updateZoomRatio(float)));
|
connect(zoomSliderAction, SIGNAL(zoomRatioChanged(float)),viewer,SLOT(updateZoomRatio(float)));
|
||||||
|
connect(viewer,SIGNAL(zoomUpdated(float)),zoomSliderAction,SLOT(updateZoomRatio(float)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
comicToolBar->addAction(leftRotationAction);
|
comicToolBar->addAction(leftRotationAction);
|
||||||
|
@ -382,6 +382,8 @@ void Viewer::increaseZoomFactor()
|
|||||||
updateContentSize();
|
updateContentSize();
|
||||||
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
|
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
|
||||||
notificationsLabel->flash();
|
notificationsLabel->flash();
|
||||||
|
|
||||||
|
emit zoomUpdated(zoom);
|
||||||
}
|
}
|
||||||
void Viewer::decreaseZoomFactor()
|
void Viewer::decreaseZoomFactor()
|
||||||
{
|
{
|
||||||
@ -391,6 +393,8 @@ void Viewer::decreaseZoomFactor()
|
|||||||
updateContentSize();
|
updateContentSize();
|
||||||
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
|
notificationsLabel->setText(QString::number(getZoomFactor()*100)+"%");
|
||||||
notificationsLabel->flash();
|
notificationsLabel->flash();
|
||||||
|
|
||||||
|
emit zoomUpdated(zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal Viewer::getZoomFactor()
|
qreal Viewer::getZoomFactor()
|
||||||
|
@ -171,6 +171,7 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
|
|||||||
void reset();
|
void reset();
|
||||||
void openNextComic();
|
void openNextComic();
|
||||||
void openPreviousComic();
|
void openPreviousComic();
|
||||||
|
void zoomUpdated(float);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user