Index: src/render/katerenderer.h =================================================================== --- src/render/katerenderer.h +++ src/render/katerenderer.h @@ -237,8 +237,8 @@ /** * Change to a different font (soon to be font set?) */ - void increaseFontSizes(); - void decreaseFontSizes(); + void increaseFontSizes(qreal step = 1.0); + void decreaseFontSizes(qreal step = 1.0); const QFont ¤tFont() const; const QFontMetricsF ¤tFontMetrics() const; Index: src/render/katerenderer.cpp =================================================================== --- src/render/katerenderer.cpp +++ src/render/katerenderer.cpp @@ -143,20 +143,20 @@ m_showSelections = showSelections; } -void KateRenderer::increaseFontSizes() +void KateRenderer::increaseFontSizes(qreal step) { QFont f(config()->font()); - f.setPointSize(f.pointSize() + 1); + f.setPointSizeF(f.pointSizeF() + step); config()->setFont(f); } -void KateRenderer::decreaseFontSizes() +void KateRenderer::decreaseFontSizes(qreal step) { QFont f(config()->font()); - if ((f.pointSize() - 1) > 0) { - f.setPointSize(f.pointSize() - 1); + if ((f.pointSizeF() - step) > 0) { + f.setPointSizeF(f.pointSizeF() - step); } config()->setFont(f); Index: src/view/kateviewinternal.h =================================================================== --- src/view/kateviewinternal.h +++ src/view/kateviewinternal.h @@ -149,8 +149,8 @@ void dynWrapChanged(); public Q_SLOTS: - void slotIncFontSizes(); - void slotDecFontSizes(); + void slotIncFontSizes(qreal step = 1.0); + void slotDecFontSizes(qreal step = 1.0); void paintCursor(); Index: src/view/kateviewinternal.cpp =================================================================== --- src/view/kateviewinternal.cpp +++ src/view/kateviewinternal.cpp @@ -335,14 +335,14 @@ return (viewLine - startLine()) * renderer()->lineHeight(); } -void KateViewInternal::slotIncFontSizes() +void KateViewInternal::slotIncFontSizes(qreal step) { - renderer()->increaseFontSizes(); + renderer()->increaseFontSizes(step); } -void KateViewInternal::slotDecFontSizes() +void KateViewInternal::slotDecFontSizes(qreal step) { - renderer()->decreaseFontSizes(); + renderer()->decreaseFontSizes(step); } /** @@ -3298,9 +3298,9 @@ // ctrl pressed -> change font size (only if angle is reported) if (e->modifiers() == Qt::ControlModifier) { if (e->angleDelta().y() > 0) { - slotIncFontSizes(); + slotIncFontSizes(qreal(e->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep); } else if (e->angleDelta().y() < 0) { - slotDecFontSizes(); + slotDecFontSizes(qreal(-e->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep); } // accept always and be done for zooming