Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/PanelView/krinterbriefview.cpp
Context not available. | |||||
545 | { | 545 | { | ||
---|---|---|---|---|---|
546 | QString text = index.data(Qt::DisplayRole).toString(); | 546 | QString text = index.data(Qt::DisplayRole).toString(); | ||
547 | 547 | | |||
548 | #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) | ||||
549 | int textWidth = QFontMetrics(_viewFont).horizontalAdvance(text); | ||||
550 | #else | ||||
548 | int textWidth = QFontMetrics(_viewFont).width(text); | 551 | int textWidth = QFontMetrics(_viewFont).width(text); | ||
552 | #endif | ||||
549 | 553 | | |||
550 | const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; | 554 | const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; | ||
551 | textWidth += 2 * textMargin; | 555 | textWidth += 2 * textMargin; | ||
Context not available. |