Fixed #6404 - minimal and maximal zoom factors
[mdictionary] / src / mdictionary / gui / TranslationTextEdit.cpp
index ed8c01a..41d5aaa 100644 (file)
@@ -102,12 +102,16 @@ void TranslationTextEdit::contextMenuEvent(QContextMenuEvent *e) {
 
 
 void TranslationTextEdit::zoomIn() {
+    if(zoomFactor() >= 3)
+        return;
     setZoomFactor(zoomFactor()*1.05);
     realParent->updateZoom(zoomFactor());
 
 }
 
 void TranslationTextEdit::zoomOut() {
+    if(zoomFactor() <= 0.5)
+        return;
     setZoomFactor(zoomFactor()*0.95);
     realParent->updateZoom(zoomFactor());
 }