Changeset View
Changeset View
Standalone View
Standalone View
layers/selections/text/kpTextSelection.cpp
Context not available. | |||||
188 | // public static | 188 | // public static | ||
---|---|---|---|---|---|
189 | int kpTextSelection::PreferredMinimumWidthForTextStyle (const kpTextStyle &textStyle) | 189 | int kpTextSelection::PreferredMinimumWidthForTextStyle (const kpTextStyle &textStyle) | ||
190 | { | 190 | { | ||
191 | const int about15CharsWidth = | 191 | const int about15CharsWidth =textStyle.fontMetrics (). | ||
192 | textStyle.fontMetrics ().width ( | 192 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) | ||
193 | QStringLiteral ("1234567890abcde")); | 193 | horizontalAdvance | ||
194 | #else | ||||
195 | width | ||||
196 | #endif | ||||
197 | (QStringLiteral ("1234567890abcde")); | ||||
194 | 198 | | |||
195 | const int preferredMinWidth = | 199 | const int preferredMinWidth = | ||
196 | qMax (150, | 200 | qMax (150, | ||
Context not available. |