Mercurial > hg > easyhg
comparison src/panned.cpp @ 681:ac7b40a64109
Merge from branch scale-alternative
author | Chris Cannam |
---|---|
date | Fri, 07 Dec 2018 13:43:08 +0000 |
parents | ad3e5693cb76 |
children |
comparison
equal
deleted
inserted
replaced
680:21e03596dd93 | 681:ac7b40a64109 |
---|---|
32 m_dragTimer = new QTimer(this); | 32 m_dragTimer = new QTimer(this); |
33 m_dragTimerMs = 50; | 33 m_dragTimerMs = 50; |
34 connect(m_dragTimer, SIGNAL(timeout()), this, SLOT(dragTimerTimeout())); | 34 connect(m_dragTimer, SIGNAL(timeout()), this, SLOT(dragTimerTimeout())); |
35 setRenderHints(QPainter::Antialiasing | | 35 setRenderHints(QPainter::Antialiasing | |
36 QPainter::TextAntialiasing); | 36 QPainter::TextAntialiasing); |
37 | |
38 double baseEm; | |
39 #ifdef Q_OS_MAC | |
40 baseEm = 17.0; | |
41 #else | |
42 baseEm = 15.0; | |
43 #endif | |
44 double em = QFontMetrics(QFont()).height(); | |
45 double ratio = em / baseEm; | |
46 | |
47 QMatrix m = matrix(); | |
48 m.scale(ratio, ratio); | |
49 setMatrix(m); | |
37 } | 50 } |
38 | 51 |
39 void | 52 void |
40 Panned::resizeEvent(QResizeEvent *ev) | 53 Panned::resizeEvent(QResizeEvent *ev) |
41 { | 54 { |