forked from qt-creator/qt-creator
OutputWindow: Fix freeze when zooming out very far
Task-number: QTCREATORBUG-22721 Change-Id: I5a3bc8d1aa677614bd7fdc5e5094b589721e378d Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Eike Ziller
parent
2d402bf7fe
commit
2ec58eac25
@@ -232,6 +232,12 @@ void OutputWindow::wheelEvent(QWheelEvent *e)
|
|||||||
if (d->zoomEnabled) {
|
if (d->zoomEnabled) {
|
||||||
if (e->modifiers() & Qt::ControlModifier) {
|
if (e->modifiers() & Qt::ControlModifier) {
|
||||||
float delta = e->angleDelta().y() / 120.f;
|
float delta = e->angleDelta().y() / 120.f;
|
||||||
|
|
||||||
|
// Workaround for QTCREATORBUG-22721, remove when properly fixed in Qt
|
||||||
|
const float newSize = float(font().pointSizeF()) + delta;
|
||||||
|
if (delta < 0.f && newSize < 4.f)
|
||||||
|
return;
|
||||||
|
|
||||||
zoomInF(delta);
|
zoomInF(delta);
|
||||||
emit wheelZoom();
|
emit wheelZoom();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user