Changeset View
Changeset View
Standalone View
Standalone View
krusader/DiskUsage/radialMap/labels.cpp
Context not available. | |||||
292 | 292 | | |||
---|---|---|---|---|---|
293 | qs = fm.elidedText((*it)->segment->file()->name(), Qt::ElideMiddle, width() - x2); | 293 | qs = fm.elidedText((*it)->segment->file()->name(), Qt::ElideMiddle, width() - x2); | ||
294 | 294 | | |||
295 | #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) | ||||
296 | x3 = width() - fm.horizontalAdvance(qs) | ||||
297 | #else | ||||
295 | x3 = width() - fm.width(qs) | 298 | x3 = width() - fm.width(qs) | ||
299 | #endif | ||||
296 | - LABEL_HMARGIN //outer margin | 300 | - LABEL_HMARGIN //outer margin | ||
297 | - LABEL_TEXT_HMARGIN //margin between strut and text | 301 | - LABEL_TEXT_HMARGIN //margin between strut and text | ||
298 | //- ((*it)->lvl - startLevel) * LABEL_HMARGIN //indentation | 302 | //- ((*it)->lvl - startLevel) * LABEL_HMARGIN //indentation | ||
Context not available. | |||||
315 | 319 | | |||
316 | //**** needs a little tweaking: | 320 | //**** needs a little tweaking: | ||
317 | 321 | | |||
322 | #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) | ||||
323 | tx = fm.horizontalAdvance(qs) + LABEL_HMARGIN/* + ((*it)->lvl - startLevel) * LABEL_HMARGIN*/; | ||||
324 | #else | ||||
318 | tx = fm.width(qs) + LABEL_HMARGIN/* + ((*it)->lvl - startLevel) * LABEL_HMARGIN*/; | 325 | tx = fm.width(qs) + LABEL_HMARGIN/* + ((*it)->lvl - startLevel) * LABEL_HMARGIN*/; | ||
326 | #endif | ||||
319 | if (tx > x2) { //text is too long | 327 | if (tx > x2) { //text is too long | ||
320 | tx = LABEL_HMARGIN + x2 - tx; //some text will be lost from sight | 328 | tx = LABEL_HMARGIN + x2 - tx; //some text will be lost from sight | ||
321 | x3 = x2; //no text margin (right side of text here) | 329 | x3 = x2; //no text margin (right side of text here) | ||
Context not available. |