Skip to content

Commit fdb0b2f

Browse files
committed
Add link to source code in about dialog
1 parent a15453b commit fdb0b2f

2 files changed

Lines changed: 20 additions & 7 deletions

File tree

src/aboutdialog.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,26 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), mainwindow_(parent)
7272

7373
html += tr("SQL Restore is a SQL batch restore program by %1.").arg("<a href=\"https://jkvinge.net/\">Jonas Kvinge</a>");
7474
html += "<br />";
75-
html += tr("The program is free software, released under GPL.");
75+
html += tr("The program is free software, released under GPL. The source code is available on GitHub %1").arg("<a href=\"https://github.com/jonaski/sqlrestore\">here</a>");
7676
html += "<br />";
77+
html += tr("You should have received a copy of the GNU General Public License along with this program. If not, see %1").arg("<a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a>");
78+
html += "</p>";
79+
80+
html += "<p>";
81+
7782
html += tr("If you like this program and can make use it, consider sponsoring or donating.");
7883
html += "<br />";
7984
html += tr("To sponsor me visit %1.").arg("<a href=\"https://github.com/sponsors/jonaski\">my GitHub sponsors profile</a>");
8085
html += "<br />";
8186
html += tr("Funding developers through GitHub Sponsors is one more way to contribute to open source projects you appreciate, it helps developers get the resources they need, and recognize contributors working behind the scenes to make open source better for everyone.");
8287
html += "<br />";
8388
html += tr("You can also make a one-time payment through %1.").arg("<a href=\"https://paypal.me/jonaskvinge\">paypal.me/jonaskvinge</a>");
89+
html += "<br />";
8490

8591
html += "</p>";
8692

8793
ui_.text->setText(html);
94+
ui_.text->adjustSize();
8895

8996
html.clear();
9097

@@ -128,8 +135,6 @@ void AboutDialog::showEvent(QShowEvent*) {
128135
setMinimumHeight(0);
129136
setMaximumHeight(9000);
130137
adjustSize();
131-
setMinimumHeight(height());
132-
setMaximumHeight(height());
133138

134139
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
135140
QScreen *screen = QGuiApplication::screenAt(pos());
@@ -141,6 +146,11 @@ void AboutDialog::showEvent(QShowEvent*) {
141146
}
142147
#endif
143148

149+
adjustSize();
150+
151+
setMinimumHeight(height());
152+
setMaximumHeight(height());
153+
144154
}
145155

146156
void AboutDialog::closeEvent(QCloseEvent*) {

src/aboutdialog.ui

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>515</width>
10-
<height>380</height>
10+
<height>600</height>
1111
</rect>
1212
</property>
1313
<property name="minimumSize">
@@ -96,6 +96,12 @@
9696
</item>
9797
<item>
9898
<widget class="QLabel" name="text">
99+
<property name="sizePolicy">
100+
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
101+
<horstretch>0</horstretch>
102+
<verstretch>0</verstretch>
103+
</sizepolicy>
104+
</property>
99105
<property name="text">
100106
<string/>
101107
</property>
@@ -294,9 +300,6 @@
294300
<property name="orientation">
295301
<enum>Qt::Vertical</enum>
296302
</property>
297-
<property name="sizeType">
298-
<enum>QSizePolicy::Minimum</enum>
299-
</property>
300303
<property name="sizeHint" stdset="0">
301304
<size>
302305
<width>0</width>

0 commit comments

Comments
 (0)