Changeset View
Changeset View
Standalone View
Standalone View
src/radialMap/labels.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | 152 | do { | |||
---|---|---|---|---|---|
191 | 191 | | |||
192 | int prevLeftY = 0; | 192 | int prevLeftY = 0; | ||
193 | int prevRightY = height(); | 193 | int prevRightY = height(); | ||
194 | 194 | | |||
195 | QFont font; | 195 | QFont font; | ||
196 | 196 | | |||
197 | for (it = list.begin(); it != list.end(); ++it) { | 197 | for (it = list.begin(); it != list.end(); ++it) { | ||
198 | Label *label = *it; | 198 | Label *label = *it; | ||
199 | //** bear in mind that text is drawn with QPoint param as BOTTOM left corner of text box | 199 | //** bear in mind that text is drawn with QPointF param as BOTTOM left corner of text box | ||
200 | QString string = label->segment->file()->displayName(); | 200 | QString string = label->segment->file()->displayName(); | ||
201 | if (varySizes) { | 201 | if (varySizes) { | ||
202 | font.setPointSize(sizes[label->level]); | 202 | font.setPointSize(sizes[label->level]); | ||
203 | } | 203 | } | ||
204 | QFontMetrics fontMetrics(font); | 204 | QFontMetrics fontMetrics(font); | ||
205 | const int minTextWidth = fontMetrics.width(QStringLiteral("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string | 205 | const int minTextWidth = fontMetrics.width(QStringLiteral("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string | ||
206 | 206 | | |||
207 | const int fontHeight = fontMetrics.height() + LABEL_TEXT_VMARGIN; //used to ensure label texts don't overlap | 207 | const int fontHeight = fontMetrics.height() + LABEL_TEXT_VMARGIN; //used to ensure label texts don't overlap | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |