Skip to content

Commit 2df29fa

Browse files
committed
AboutDialog: Change layout to fit large font better
1 parent 67a70dd commit 2df29fa

File tree

3 files changed

+56
-58
lines changed

3 files changed

+56
-58
lines changed

src/AboutDialog.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ AboutDialog::AboutDialog(QWidget *parent) :
77
ui(new Ui::AboutDialog)
88
{
99
ui->setupUi(this);
10-
this->setFixedSize(this->width(), this->height());
1110
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
1211
ui->label_version->setText(Application::versionInformation());
1312
}
1413

14+
void AboutDialog::showEvent(QShowEvent *e)
15+
{
16+
this->adjustSize();
17+
this->setFixedSize(this->width(), this->height());
18+
}
19+
1520
AboutDialog::~AboutDialog()
1621
{
1722
delete ui;

src/AboutDialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class AboutDialog : public QDialog
1717

1818
private:
1919
Ui::AboutDialog *ui;
20+
void showEvent(QShowEvent *e) override;
2021
};
2122

2223
#endif

src/AboutDialog.ui

Lines changed: 49 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -20,54 +20,24 @@
2020
<property name="sizeGripEnabled">
2121
<bool>false</bool>
2222
</property>
23-
<layout class="QVBoxLayout" name="verticalLayout_2">
23+
<layout class="QVBoxLayout" name="verticalLayout">
2424
<item>
2525
<layout class="QHBoxLayout" name="horizontalLayout">
26-
<property name="bottomMargin">
27-
<number>0</number>
28-
</property>
2926
<item>
30-
<layout class="QVBoxLayout" name="verticalLayout">
31-
<item>
32-
<spacer name="verticalSpacer_2">
33-
<property name="orientation">
34-
<enum>Qt::Vertical</enum>
35-
</property>
36-
<property name="sizeHint" stdset="0">
37-
<size>
38-
<width>20</width>
39-
<height>40</height>
40-
</size>
41-
</property>
42-
</spacer>
43-
</item>
44-
<item>
45-
<widget class="QLabel" name="label_version">
46-
<property name="text">
47-
<string>Version</string>
48-
</property>
49-
<property name="margin">
50-
<number>5</number>
51-
</property>
52-
<property name="textInteractionFlags">
53-
<set>Qt::TextSelectableByMouse</set>
54-
</property>
55-
</widget>
56-
</item>
57-
<item>
58-
<spacer name="verticalSpacer">
59-
<property name="orientation">
60-
<enum>Qt::Vertical</enum>
61-
</property>
62-
<property name="sizeHint" stdset="0">
63-
<size>
64-
<width>20</width>
65-
<height>40</height>
66-
</size>
67-
</property>
68-
</spacer>
69-
</item>
70-
</layout>
27+
<widget class="QLabel" name="label_version">
28+
<property name="text">
29+
<string>Version</string>
30+
</property>
31+
<property name="alignment">
32+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
33+
</property>
34+
<property name="margin">
35+
<number>5</number>
36+
</property>
37+
<property name="textInteractionFlags">
38+
<set>Qt::TextSelectableByMouse</set>
39+
</property>
40+
</widget>
7141
</item>
7242
<item>
7343
<widget class="QLabel" name="label_imagelogo">
@@ -79,8 +49,8 @@
7949
</property>
8050
<property name="maximumSize">
8151
<size>
82-
<width>128</width>
83-
<height>128</height>
52+
<width>96</width>
53+
<height>96</height>
8454
</size>
8555
</property>
8656
<property name="text">
@@ -97,19 +67,41 @@
9767
</layout>
9868
</item>
9969
<item>
100-
<widget class="QLabel" name="label">
101-
<property name="text">
102-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.&lt;/p&gt;&lt;p&gt;It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.&lt;/p&gt;&lt;p&gt;See &lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot;&gt;http://www.gnu.org/licenses/gpl.html&lt;/a&gt; and &lt;a href=&quot;https://www.mozilla.org/MPL/2.0/index.txt&quot;&gt;https://www.mozilla.org/MPL/2.0/index.txt&lt;/a&gt; for details.&lt;/p&gt;&lt;p&gt;For more information on this program please visit our website at: &lt;a href=&quot;http://sqlitebrowser.org&quot;&gt;http://sqlitebrowser.org&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:small;&quot;&gt;This software uses the GPL/LGPL Qt Toolkit from &lt;/span&gt;&lt;a href=&quot;http://qt-project.org/&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://qt-project.org/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt;&lt;br/&gt;See &lt;/span&gt;&lt;a href=&quot;http://qt-project.org/doc/qt-5/licensing.html&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://qt-project.org/doc/qt-5/licensing.html&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt; for licensing terms and information.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:small;&quot;&gt;It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.&lt;br/&gt;See &lt;/span&gt;&lt;a href=&quot;http://www.famfamfam.com/lab/icons/silk/&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://www.famfamfam.com/lab/icons/silk/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt; for details.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
70+
<widget class="QScrollArea" name="scrollArea">
71+
<property name="frameShape">
72+
<enum>QFrame::NoFrame</enum>
10373
</property>
104-
<property name="alignment">
105-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
106-
</property>
107-
<property name="wordWrap">
108-
<bool>true</bool>
109-
</property>
110-
<property name="openExternalLinks">
74+
<property name="widgetResizable">
11175
<bool>true</bool>
11276
</property>
77+
<widget class="QWidget" name="scrollAreaWidgetContents">
78+
<property name="geometry">
79+
<rect>
80+
<x>0</x>
81+
<y>0</y>
82+
<width>620</width>
83+
<height>398</height>
84+
</rect>
85+
</property>
86+
<layout class="QVBoxLayout" name="verticalLayout_2">
87+
<item>
88+
<widget class="QLabel" name="label">
89+
<property name="text">
90+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.&lt;/p&gt;&lt;p&gt;It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.&lt;/p&gt;&lt;p&gt;See &lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot;&gt;http://www.gnu.org/licenses/gpl.html&lt;/a&gt; and &lt;a href=&quot;https://www.mozilla.org/MPL/2.0/index.txt&quot;&gt;https://www.mozilla.org/MPL/2.0/index.txt&lt;/a&gt; for details.&lt;/p&gt;&lt;p&gt;For more information on this program please visit our website at: &lt;a href=&quot;http://sqlitebrowser.org&quot;&gt;http://sqlitebrowser.org&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:small;&quot;&gt;This software uses the GPL/LGPL Qt Toolkit from &lt;/span&gt;&lt;a href=&quot;http://qt-project.org/&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://qt-project.org/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt;&lt;br/&gt;See &lt;/span&gt;&lt;a href=&quot;http://qt-project.org/doc/qt-5/licensing.html&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://qt-project.org/doc/qt-5/licensing.html&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt; for licensing terms and information.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:small;&quot;&gt;It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.&lt;br/&gt;See &lt;/span&gt;&lt;a href=&quot;http://www.famfamfam.com/lab/icons/silk/&quot;&gt;&lt;span style=&quot; font-size:small;&quot;&gt;http://www.famfamfam.com/lab/icons/silk/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:small;&quot;&gt; for details.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
91+
</property>
92+
<property name="alignment">
93+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
94+
</property>
95+
<property name="wordWrap">
96+
<bool>true</bool>
97+
</property>
98+
<property name="openExternalLinks">
99+
<bool>true</bool>
100+
</property>
101+
</widget>
102+
</item>
103+
</layout>
104+
</widget>
113105
</widget>
114106
</item>
115107
<item>

0 commit comments

Comments
 (0)