comparison src/changesetview.cpp @ 678:c0b46d0514a7 scale

Incomplete scaling updates. Should do this differently
author Chris Cannam
date Thu, 06 Dec 2018 14:55:45 +0000
parents ae67ea0af696
children
comparison
equal deleted inserted replaced
677:0329bbd4b57c 678:c0b46d0514a7
17 17
18 #include "changesetview.h" 18 #include "changesetview.h"
19 #include "changesetscene.h" 19 #include "changesetscene.h"
20 #include "colourset.h" 20 #include "colourset.h"
21 #include "debug.h" 21 #include "debug.h"
22 #include "common.h"
22 23
23 #include <QScrollBar> 24 #include <QScrollBar>
24 25
25 ChangesetView::ChangesetView() : 26 ChangesetView::ChangesetView() :
26 Panned() 27 Panned()
74 for (ChangesetScene::DateRanges::const_iterator i = ranges.begin(); 75 for (ChangesetScene::DateRanges::const_iterator i = ranges.begin();
75 i != ranges.end(); ++i) { 76 i != ranges.end(); ++i) {
76 77
77 ChangesetScene::DateRange range = i.value(); 78 ChangesetScene::DateRange range = i.value();
78 79
79 QRectF r = QRectF(x, range.minrow * 90 - 25, 80 int rowSpace = scalePixelSize(90);
80 w, range.nrows * 90).normalized(); 81
82 QRectF r = QRectF(x, range.minrow * rowSpace - scalePixelSize(25),
83 w, range.nrows * rowSpace).normalized();
81 84
82 paint->fillRect(r, range.even ? evenBrush : oddBrush); 85 paint->fillRect(r, range.even ? evenBrush : oddBrush);
83 paint->drawText(px, range.minrow * 90 - 10, range.label); 86 paint->drawText(px, range.minrow * rowSpace - scalePixelSize(10), range.label);
84 } 87 }
85 88
86 paint->restore(); 89 paint->restore();
87 } 90 }
88 91