From 4bd8de6a50af1c85a0ec5fa60d11d5831db63bcc Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 24 Feb 2018 10:03:41 +0100 Subject: [PATCH] AboutDialog: Replace QTextBrowser with QLabel --- src/lib/other/aboutdialog.cpp | 7 +++--- src/lib/other/aboutdialog.ui | 42 ++++++++++++++++------------------- themes/chrome/main.css | 2 +- themes/linux/main.css | 2 +- themes/mac/main.css | 2 +- themes/windows/main.css | 2 +- 6 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/lib/other/aboutdialog.cpp b/src/lib/other/aboutdialog.cpp index 9816893fd..d654e7bf3 100644 --- a/src/lib/other/aboutdialog.cpp +++ b/src/lib/other/aboutdialog.cpp @@ -45,7 +45,7 @@ AboutDialog::~AboutDialog() void AboutDialog::showAbout() { QString aboutHtml; - aboutHtml += "
"; + aboutHtml += "
"; aboutHtml += tr("

Application version %1
").arg( #ifdef FALKON_GIT_REVISION QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION) @@ -57,6 +57,7 @@ void AboutDialog::showAbout() aboutHtml += QString("

© %1 %2
").arg(Qz::COPYRIGHT, Qz::AUTHOR); aboutHtml += QString("%1

").arg(Qz::WWWADDRESS); aboutHtml += "

" + mApp->userAgentManager()->defaultUserAgent() + "

"; - aboutHtml += "
"; - ui->textBrowser->setHtml(aboutHtml); + aboutHtml += ""; + ui->textLabel->setText(aboutHtml); + setFixedHeight(sizeHint().height()); } diff --git a/src/lib/other/aboutdialog.ui b/src/lib/other/aboutdialog.ui index 8db9dafc9..17a08feb6 100644 --- a/src/lib/other/aboutdialog.ui +++ b/src/lib/other/aboutdialog.ui @@ -25,40 +25,36 @@ - - - QFrame::NoFrame + + + + 0 + 0 + - - QFrame::Plain + + Qt::AlignCenter - - Qt::ScrollBarAlwaysOff + + true true - - true + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - 5 + + + Qt::Horizontal - - - - Qt::Horizontal - - - QDialogButtonBox::Close - - - - + + QDialogButtonBox::Close + + diff --git a/themes/chrome/main.css b/themes/chrome/main.css index 378e1d041..cab6db3d8 100644 --- a/themes/chrome/main.css +++ b/themes/chrome/main.css @@ -287,7 +287,7 @@ AboutDialog #label background: palette(window); } -AboutDialog #textBrowser +AboutDialog #textLabel { background: palette(window); } diff --git a/themes/linux/main.css b/themes/linux/main.css index 204f769a6..9bf664f49 100644 --- a/themes/linux/main.css +++ b/themes/linux/main.css @@ -216,7 +216,7 @@ AboutDialog #label background: palette(window); } -AboutDialog #textBrowser +AboutDialog #textLabel { background: palette(window); } diff --git a/themes/mac/main.css b/themes/mac/main.css index d29001e46..39193ddc2 100644 --- a/themes/mac/main.css +++ b/themes/mac/main.css @@ -291,7 +291,7 @@ AboutDialog #label background: palette(window); } -AboutDialog #textBrowser +AboutDialog #textLabel { background: palette(window); } diff --git a/themes/windows/main.css b/themes/windows/main.css index 87c0999a7..4a942894d 100644 --- a/themes/windows/main.css +++ b/themes/windows/main.css @@ -378,7 +378,7 @@ AboutDialog #label background: palette(window); } -AboutDialog #textBrowser +AboutDialog #textLabel { background: palette(window); }