[Kst] branches/work/kst/portto4/kst/src/libkstapp

Mike Fenton mike at staikos.net
Thu Apr 3 17:46:39 CEST 2008


SVN commit 793312 by fenton:

Fix for Font size jumping.


 M  +2 -2      view.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #793311:793312
@@ -356,7 +356,7 @@
 
 
 void View::updateFont() {
-  qreal fontSize = (height() + width()) / (ApplicationSettings::self()->referenceViewHeight() + ApplicationSettings::self()->referenceViewWidth());
+  qreal fontSize = (qreal)(height() + width()) / (ApplicationSettings::self()->referenceViewHeight() + ApplicationSettings::self()->referenceViewWidth());
   fontSize *= ApplicationSettings::self()->referenceFontSize();
 
   if (fontSize < ApplicationSettings::self()->minimumFontSize()) {
@@ -371,7 +371,7 @@
 QFont View::defaultFont(double scale) const {
   QFont font(_defaultFont);
 
-  qreal fontSize = (height() + width()) / (ApplicationSettings::self()->referenceViewHeight() + ApplicationSettings::self()->referenceViewWidth());
+  qreal fontSize = (qreal)(height() + width()) / (ApplicationSettings::self()->referenceViewHeight() + ApplicationSettings::self()->referenceViewWidth());
   fontSize *= scale;
   fontSize += font.pointSizeF();
 


More information about the Kst mailing list