diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-01 19:58:13 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-01 19:58:13 +0100 |
commit | 983a40698c47739fee3786cf54c917004523ea36 (patch) | |
tree | 4a0d73577afbf430934cd878ff23674aaa7aea74 /gui/widgets/InstanceDelegate.cpp | |
parent | 866d7029afa10293a57d71aecbe3629399c95d06 (diff) | |
parent | 1936bd181f57a554ce0dd757ffe9419100eb47f4 (diff) | |
download | MultiMC-983a40698c47739fee3786cf54c917004523ea36.tar MultiMC-983a40698c47739fee3786cf54c917004523ea36.tar.gz MultiMC-983a40698c47739fee3786cf54c917004523ea36.tar.lz MultiMC-983a40698c47739fee3786cf54c917004523ea36.tar.xz MultiMC-983a40698c47739fee3786cf54c917004523ea36.zip |
Merge remote-tracking branch 'upstream/feature_derpstances' into feature_derpstances
Diffstat (limited to 'gui/widgets/InstanceDelegate.cpp')
-rw-r--r-- | gui/widgets/InstanceDelegate.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/gui/widgets/InstanceDelegate.cpp b/gui/widgets/InstanceDelegate.cpp index 5020b8b6..33da7130 100644 --- a/gui/widgets/InstanceDelegate.cpp +++ b/gui/widgets/InstanceDelegate.cpp @@ -19,30 +19,7 @@ #include <QTextLayout> #include <QApplication> #include <QtCore/qmath.h> - -// Origin: Qt -static void viewItemTextLayout(QTextLayout &textLayout, int lineWidth, qreal &height, - qreal &widthUsed) -{ - 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(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - } - textLayout.endLayout(); -} - +#include "Common.h" #define QFIXED_MAX (INT_MAX / 256) ListViewDelegate::ListViewDelegate(QObject *parent) : QStyledItemDelegate(parent) |