From: Juergen Spitzmueller
Date: Sat, 15 Aug 2020 14:07:12 +0000 (+0200)
Subject: Polish About dialog
X-Git-Tag: lyx-2.4.0dev-acb2ca7b~377
X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5490e7545b1207e207f05d7c692f02cf4cd1ffe8;p=lyx.git
Polish About dialog
(this might need adaptation with HiDPI)
---
diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp
index 8e720df6b3..d479029583 100644
--- a/src/frontends/qt/GuiAbout.cpp
+++ b/src/frontends/qt/GuiAbout.cpp
@@ -258,14 +258,16 @@ static QString version()
from_ascii(lyx_version),
qstring_to_ucs4(loc_release_date))+"\n";
if (std::string(lyx_git_commit_hash) != "none")
- version_date += _("Built from git commit hash ")
+ version_date += from_ascii("
") + _("Built from git commit hash ")
+ from_utf8(lyx_git_commit_hash).substr(0,8);
QString res;
QTextStream out(&res);
- out << toqstr(version_date) << "\n";
- out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion()))) << "\n";
+ out << toqstr("
");
+ out << toqstr(version_date) << "
";
+ out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion()))) << "
";
out << toqstr(bformat(_("Qt Version (compile-time): %1$s"), from_ascii(QT_VERSION_STR)));
+ out << toqstr("
");
return res;
}
@@ -299,9 +301,6 @@ GuiAbout::GuiAbout(GuiView & lv)
{
d->ui.setupUi(this);
- // fix height to minimum
- setFixedHeight(sizeHint().height());
-
d->ui.copyrightTB->setPlainText(copyright());
d->ui.copyrightTB->append(QString());
d->ui.copyrightTB->append(license());
@@ -309,6 +308,11 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.copyrightTB->append(disclaimer());
d->ui.versionLA->setText(version());
+ QPixmap icon = getPixmap("images/", "lyx", "svg,png");
+ int const iconsize = d->ui.versionLA->height() * 1.5;
+ d->ui.iconLA->setPixmap(icon.scaled(iconsize, iconsize,
+ Qt::IgnoreAspectRatio,
+ Qt::SmoothTransformation));
d->ui.dirLibraryLA->setText(dirLibrary());
d->ui.dirUserLA->setText(dirUser());
d->ui.buildinfoTB->setText(buildinfo());
@@ -317,6 +321,9 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.creditsTB->setHtml(credits());
d->ui.tab->setUsesScrollButtons(false);
+
+ // fix height to minimum
+ setFixedHeight(sizeHint().height());
}
diff --git a/src/frontends/qt/ui/AboutUi.ui b/src/frontends/qt/ui/AboutUi.ui
index 4db3359ff4..9ae795d1fc 100644
--- a/src/frontends/qt/ui/AboutUi.ui
+++ b/src/frontends/qt/ui/AboutUi.ui
@@ -7,7 +7,7 @@
0
0
424
- 376
+ 409
@@ -16,22 +16,7 @@
true
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
+
-
@@ -41,42 +26,72 @@
Version
-
-
- 6
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
-
-
-
- IBeamCursor
-
-
- <html><head/><body><p>LyX version info goes here.</p><p>Qt version (run-time) goes here.</p><p>Qt version (compile-time) goes here.</p></body></html>
-
-
- Qt::AlignCenter
-
-
- true
-
-
- Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
-
-
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 80
+ 80
+
+
+
+ LyX Icon
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ IBeamCursor
+
+
+ <html><head/><body><p><span style=" font-weight:600;">LyX version info goes here.</span></p><p>Qt version (run-time) goes here.</p><p>Qt version (compile-time) goes here.</p></body></html>
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ true
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
+
+
+
+
- -
+
-
Qt::Vertical
@@ -89,7 +104,7 @@
- -
+
-
Library directory
@@ -136,7 +151,7 @@
- -
+
-
User directory