From: Bartosz Szatkowski Date: Tue, 14 Sep 2010 06:57:01 +0000 (+0200) Subject: Fixed #6404 - minimal and maximal zoom factors X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=fb7dc48a8f883c0eaa033ecb3806e18783a63b1d;p=mdictionary Fixed #6404 - minimal and maximal zoom factors --- diff --git a/src/mdictionary/backbone/backbone.cpp b/src/mdictionary/backbone/backbone.cpp index 9fd0297..db80542 100644 --- a/src/mdictionary/backbone/backbone.cpp +++ b/src/mdictionary/backbone/backbone.cpp @@ -99,7 +99,7 @@ void Backbone::init() { SLOT(translationReady())); // In common opinion perfect thread count is cores_number+1 (in qt perfect - // thread count is set to cores number) + // thread count is set to cores number) so iam changin it QThreadPool::globalInstance()->setMaxThreadCount( QThreadPool::globalInstance()->maxThreadCount()+1); diff --git a/src/mdictionary/gui/TranslationTextEdit.cpp b/src/mdictionary/gui/TranslationTextEdit.cpp index ed8c01a..41d5aaa 100644 --- a/src/mdictionary/gui/TranslationTextEdit.cpp +++ b/src/mdictionary/gui/TranslationTextEdit.cpp @@ -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()); }