#include "aboutdata.h"
+#include <QFontMetrics>
+
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
setWindowTitle("About " + AboutData::DisplayName);
- ui->label->setText(QString(
- "<h2>A visualizer for heaptrack data files.</h2>" \
+ ui->textEdit->viewport()->setAutoFillBackground(false);
+
+ ui->textEdit->setHtml(QString(
+ "<h2>A visualizer for heaptrack data files</h2>" \
"<p>Copyright 2015, Milian Wolff " \
"<<a href=mailto:mail@milianw.de>mail@milianw.de</a>></p>" \
"<p>GNU LESSER GENERAL PUBLIC LICENSE v.2.1</p>" \
"(<a href=http://www.doublejdesign.co.uk>www.doublejdesign.co.uk</a>)</p>")
.arg(AboutData::Organization)
);
+
+ QFontMetrics fm(ui->textEdit->font());
+ QRect rect = fm.boundingRect("The application is based in part on the work of the Qwt project (qwt.sf.net)");
+ int m = ui->verticalLayout->margin();
+ int h = ui->buttonBox->height();
+ int textWidth = (int)round(rect.width() * 1.03);
+ int textHeight = (int)round(rect.height() * 1.03 * 14);
+ resize(std::max(420, 2 * m + textWidth), std::max(252, 2 * m + h + textHeight));
}
AboutDialog::~AboutDialog()
</property>
<property name="minimumSize">
<size>
- <width>426</width>
- <height>254</height>
+ <width>352</width>
+ <height>198</height>
</size>
</property>
<property name="windowTitle">
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string><html><head/><body><p>See cpp-file</p></body></html></string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="wordWrap">
+ <widget class="QTextEdit" name="textEdit">
+ <property name="readOnly">
<bool>true</bool>
</property>
+ <property name="html">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
+ </property>
</widget>
</item>
<item>