summaryrefslogtreecommitdiffstats
path: root/gui/widgets/InstanceDelegate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-29 01:20:19 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-29 01:20:19 +0100
commitb4b6091372310f4a811180cffde3ea5611881e6c (patch)
treea836e6376942c9dbabb27d21860ff31c613693b2 /gui/widgets/InstanceDelegate.cpp
parentffbc5bb62c0cd771b26cb1d9b5afdccef77075b4 (diff)
downloadMultiMC-b4b6091372310f4a811180cffde3ea5611881e6c.tar
MultiMC-b4b6091372310f4a811180cffde3ea5611881e6c.tar.gz
MultiMC-b4b6091372310f4a811180cffde3ea5611881e6c.tar.lz
MultiMC-b4b6091372310f4a811180cffde3ea5611881e6c.tar.xz
MultiMC-b4b6091372310f4a811180cffde3ea5611881e6c.zip
Add 'empty text' to all the version selection dialogs.
Customize it for the Forge one so people finally shut up about 1.7.4
Diffstat (limited to 'gui/widgets/InstanceDelegate.cpp')
-rw-r--r--gui/widgets/InstanceDelegate.cpp25
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)