diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
commit | bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9 (patch) | |
tree | e6497e304b7b9368367565fbc7c06efab1124b1c /application/widgets/Common.cpp | |
parent | 03280cc62e75f8073f8d3d9e9e3952acf21fa77d (diff) | |
download | PrismLauncher-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.gz PrismLauncher-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.bz2 PrismLauncher-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.zip |
NOISSUE tabs -> spaces
Diffstat (limited to 'application/widgets/Common.cpp')
-rw-r--r-- | application/widgets/Common.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/application/widgets/Common.cpp b/application/widgets/Common.cpp index 9b730d6c..f72f3596 100644 --- a/application/widgets/Common.cpp +++ b/application/widgets/Common.cpp @@ -2,26 +2,26 @@ // Origin: Qt QStringList viewItemTextLayout(QTextLayout &textLayout, int lineWidth, qreal &height, - qreal &widthUsed) + qreal &widthUsed) { - QStringList lines; - height = 0; - widthUsed = 0; - textLayout.beginLayout(); - QString str = textLayout.text(); - while (true) - { - QTextLine line = textLayout.createLine(); - if (!line.isValid()) - break; - if (line.textLength() == 0) - break; - line.setLineWidth(lineWidth); - line.setPosition(QPointF(0, height)); - height += line.height(); - lines.append(str.mid(line.textStart(), line.textLength())); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - } - textLayout.endLayout(); - return lines; + QStringList lines; + height = 0; + widthUsed = 0; + textLayout.beginLayout(); + QString str = textLayout.text(); + while (true) + { + QTextLine line = textLayout.createLine(); + if (!line.isValid()) + break; + if (line.textLength() == 0) + break; + line.setLineWidth(lineWidth); + line.setPosition(QPointF(0, height)); + height += line.height(); + lines.append(str.mid(line.textStart(), line.textLength())); + widthUsed = qMax(widthUsed, line.naturalTextWidth()); + } + textLayout.endLayout(); + return lines; } |