Implement oneToOne() and bestFit()

This commit is contained in:
2020-05-16 22:53:12 +02:00
parent 0a856bc14d
commit e350591b3f
+4 -2
View File
@@ -329,12 +329,14 @@ void ImageScrollAreaGL::zoomOut()
void ImageScrollAreaGL::bestFit()
{
m_scale = std::min((float)m_imageWidget->width()/m_imgWidth, (float)m_imageWidget->height()/m_imgHeight);
zoom(0.0f);
}
void ImageScrollAreaGL::oneToOne()
{
m_scale = 1.0f;
zoom(0.0f);
}
void ImageScrollAreaGL::scrollEvent()