Resize About dialog to minimum size, even out layout spacings and open it as a dialog

This commit is contained in:
Janek Bevendorff 2017-02-25 00:27:51 +01:00
parent f25ad83a02
commit 204bf81dd1
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53
3 changed files with 62 additions and 8 deletions

View File

@ -32,6 +32,9 @@ AboutDialog::AboutDialog(QWidget* parent)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
resize(minimumSize());
setWindowFlags(Qt::Sheet);
m_ui->nameLabel->setText(m_ui->nameLabel->text() + " " + KEEPASSX_VERSION); m_ui->nameLabel->setText(m_ui->nameLabel->text() + " " + KEEPASSX_VERSION);
QFont nameLabelFont = m_ui->nameLabel->font(); QFont nameLabelFont = m_ui->nameLabel->font();
nameLabelFont.setPointSize(nameLabelFont.pointSize() + 4); nameLabelFont.setPointSize(nameLabelFont.pointSize() + 4);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>479</width> <width>479</width>
<height>488</height> <height>478</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -77,17 +77,51 @@
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string notr="true">&lt;p&gt;Website: &lt;a href=&quot;https://keepassxc.org/&quot;&gt;https://keepassxc.org/&lt;/a&gt;&lt;/p&gt; <string notr="true">&lt;p&gt;Website: &lt;a href=&quot;https://keepassxc.org/&quot;&gt;https://keepassxc.org/&lt;/a&gt;&lt;/p&gt;</string>
&lt;p&gt;Report bugs at: &lt;a href=&quot;https://github.com/keepassxreboot/keepassxc/issues&quot;&gt;https://github.com/&lt;/a&gt;&lt;/p&gt;</string>
</property> </property>
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>&lt;p&gt;Report bugs at: &lt;a href=&quot;https://github.com/keepassxreboot/keepassxc/issues&quot;&gt;https://github.com/&lt;/a&gt;&lt;/p&gt;</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</string> <string>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</string>
</property> </property>
@ -107,23 +141,28 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>0</width>
<height>10</height> <height>5</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>&lt;div&gt;Main contributors: <string>&lt;p&gt;Main contributors:&lt;/p&gt;
&lt;ul&gt; &lt;ul&gt;
&lt;li&gt;debfx (KeePassX)&lt;/li&gt; &lt;li&gt;debfx (KeePassX)&lt;/li&gt;
&lt;li&gt;droidmonkey&lt;/li&gt; &lt;li&gt;droidmonkey&lt;/li&gt;
&lt;li&gt;louib&lt;/li&gt; &lt;li&gt;louib&lt;/li&gt;
&lt;li&gt;phoerious&lt;li&gt; &lt;li&gt;phoerious&lt;li&gt;
&lt;li&gt;thezero&lt;/li&gt; &lt;li&gt;thezero&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;</string>
&lt;/div&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -149,6 +188,12 @@
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Include the following information whenever you report a bug:</string> <string>Include the following information whenever you report a bug:</string>
</property> </property>
@ -156,6 +201,12 @@
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="debugInfo"> <widget class="QPlainTextEdit" name="debugInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>

View File

@ -523,7 +523,7 @@ void MainWindow::updateWindowTitle()
void MainWindow::showAboutDialog() void MainWindow::showAboutDialog()
{ {
AboutDialog* aboutDialog = new AboutDialog(this); AboutDialog* aboutDialog = new AboutDialog(this);
aboutDialog->show(); aboutDialog->open();
} }
void MainWindow::switchToDatabases() void MainWindow::switchToDatabases()