Commit ee3594b5 authored by Niklas Freund's avatar Niklas Freund
Browse files

Fix history not keeping zoom factor for very small font zoom

parent 3292024a
......@@ -168,7 +168,7 @@ void KCalcHistory::updateFont(double zoomFactor)
// Calculate actual font size by keeping the ratio, keeping previous zoomFactor, using historyFont as minimum size
double ratio = (minimumSize().width() - contentsMargins().left() - contentsMargins().right()) / baseFont().pointSizeF();
idealPointSizeF_ = contentsRect().width() / ratio;
newFont->setPointSizeF(qMax(double(baseFont().pointSizeF()), idealPointSizeF_ *zoomFactor));
newFont->setPointSizeF(qMax(double(baseFont().pointSizeF()), idealPointSizeF_) * zoomFactor);
// Apply font
QTextEdit::setFont(*newFont);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment