ad3e5693cb76 — Chris Cannam 3 years ago
Alternative, and much simpler, approach to scaling
2 files changed, 14 insertions(+), 0 deletions(-)

M src/changesetview.cpp
M src/panned.cpp
M src/changesetview.cpp +1 -0
@@ 59,6 59,7 @@ ChangesetView::drawBackground(QPainter *
 
     paint->save();
     QFont f(paint->font());
+    f.setPixelSize(11);
     f.setBold(true);
     paint->setFont(f);
 

          
M src/panned.cpp +13 -0
@@ 34,6 34,19 @@ Panned::Panned() :
     connect(m_dragTimer, SIGNAL(timeout()), this, SLOT(dragTimerTimeout()));
     setRenderHints(QPainter::Antialiasing |
                    QPainter::TextAntialiasing);
+
+    double baseEm;
+#ifdef Q_OS_MAC
+    baseEm = 17.0;
+#else
+    baseEm = 15.0;
+#endif
+    double em = QFontMetrics(QFont()).height();
+    double ratio = em / baseEm;
+
+    QMatrix m = matrix();
+    m.scale(ratio, ratio);
+    setMatrix(m);
 }
 
 void