1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

AboutDialog: Replace QTextBrowser with QLabel

This commit is contained in:
David Rosca 2018-02-24 10:03:41 +01:00
parent a2731ef393
commit 4bd8de6a50
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
6 changed files with 27 additions and 30 deletions

View File

@ -45,7 +45,7 @@ AboutDialog::~AboutDialog()
void AboutDialog::showAbout() void AboutDialog::showAbout()
{ {
QString aboutHtml; QString aboutHtml;
aboutHtml += "<center><div style='margin:20px;'>"; aboutHtml += "<div style='margin:0px 20px;'>";
aboutHtml += tr("<p><b>Application version %1</b><br/>").arg( aboutHtml += tr("<p><b>Application version %1</b><br/>").arg(
#ifdef FALKON_GIT_REVISION #ifdef FALKON_GIT_REVISION
QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION) QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION)
@ -57,6 +57,7 @@ void AboutDialog::showAbout()
aboutHtml += QString("<p>&copy; %1 %2<br/>").arg(Qz::COPYRIGHT, Qz::AUTHOR); aboutHtml += QString("<p>&copy; %1 %2<br/>").arg(Qz::COPYRIGHT, Qz::AUTHOR);
aboutHtml += QString("<a href=%1>%1</a></p>").arg(Qz::WWWADDRESS); aboutHtml += QString("<a href=%1>%1</a></p>").arg(Qz::WWWADDRESS);
aboutHtml += "<p>" + mApp->userAgentManager()->defaultUserAgent() + "</p>"; aboutHtml += "<p>" + mApp->userAgentManager()->defaultUserAgent() + "</p>";
aboutHtml += "</div></center>"; aboutHtml += "</div>";
ui->textBrowser->setHtml(aboutHtml); ui->textLabel->setText(aboutHtml);
setFixedHeight(sizeHint().height());
} }

View File

@ -25,40 +25,36 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QTextBrowser" name="textBrowser"> <widget class="QLabel" name="textLabel">
<property name="frameShape"> <property name="sizePolicy">
<enum>QFrame::NoFrame</enum> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="frameShadow"> <property name="alignment">
<enum>QFrame::Plain</enum> <set>Qt::AlignCenter</set>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="wordWrap">
<enum>Qt::ScrollBarAlwaysOff</enum> <bool>true</bool>
</property> </property>
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="openLinks"> <property name="textInteractionFlags">
<bool>true</bool> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="topMargin"> <property name="orientation">
<number>5</number> <enum>Qt::Horizontal</enum>
</property> </property>
<item> <property name="standardButtons">
<widget class="QDialogButtonBox" name="buttonBox"> <set>QDialogButtonBox::Close</set>
<property name="orientation"> </property>
<enum>Qt::Horizontal</enum> </widget>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -287,7 +287,7 @@ AboutDialog #label
background: palette(window); background: palette(window);
} }
AboutDialog #textBrowser AboutDialog #textLabel
{ {
background: palette(window); background: palette(window);
} }

View File

@ -216,7 +216,7 @@ AboutDialog #label
background: palette(window); background: palette(window);
} }
AboutDialog #textBrowser AboutDialog #textLabel
{ {
background: palette(window); background: palette(window);
} }

View File

@ -291,7 +291,7 @@ AboutDialog #label
background: palette(window); background: palette(window);
} }
AboutDialog #textBrowser AboutDialog #textLabel
{ {
background: palette(window); background: palette(window);
} }

View File

@ -378,7 +378,7 @@ AboutDialog #label
background: palette(window); background: palette(window);
} }
AboutDialog #textBrowser AboutDialog #textLabel
{ {
background: palette(window); background: palette(window);
} }