comparison widgets/WindowShapePreview.cpp @ 1157:e6c798c9bc91 project-file-rework

Minor build updates
author Chris Cannam
date Tue, 25 Oct 2016 15:29:01 +0100
parents 07e8ac88bcce
children 6796afa25c88
comparison
equal deleted inserted replaced
1156:2ab1cf27a766 1157:e6c798c9bc91
45 } 45 }
46 46
47 void 47 void
48 WindowShapePreview::updateLabels() 48 WindowShapePreview::updateLabels()
49 { 49 {
50 float scaleRatio = QFontMetrics(font()).height() / 14.f; 50 float scaleRatio = float(QFontMetrics(font()).height()) / 14.f;
51 if (scaleRatio < 1.f) scaleRatio = 1.f; 51 if (scaleRatio < 1.f) scaleRatio = 1.f;
52 52
53 int step = int(24 * scaleRatio); 53 int step = int(24 * scaleRatio);
54 float peak = int(48 * scaleRatio); 54 float peak = float(48 * scaleRatio);
55 55
56 int w = step * 4, h = (peak * 4) / 3; 56 int w = step * 4, h = int((peak * 4) / 3);
57 57
58 WindowType type = m_windowType; 58 WindowType type = m_windowType;
59 Window<float> windower = Window<float>(type, step * 2); 59 Window<float> windower = Window<float>(type, step * 2);
60 60
61 QPixmap timeLabel(w, h + 1); 61 QPixmap timeLabel(w, h + 1);