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

Make KCalcDisplay font size dependent on width AND height, not just height

parent ee3594b5
......@@ -621,11 +621,11 @@ void KCalcDisplay::updateFont()
{
// Make a working copy of the font
QFont* newFont = new QFont(baseFont());
// Calculate ideal font size
// constant arbitrarily chosen, adjust/increase if scaling issues arise
newFont->setPointSizeF(qMax(double(baseFont().pointSize()), contentsRect().height() / 3.6));
// constants arbitrarily chosen, adjust/increase if scaling issues arise
newFont->setPointSizeF(qMax(double(baseFont().pointSize()), qMin(contentsRect().height() / 4.5, contentsRect().width() / 24.6)));
// Apply font
QFrame::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