Qt: switch about#wireshark label to QTextBrowser.
QTextEdit supports the scrollbar. The drawback of having a scrollbar is that we need to remove the space (on the right, at least). This change switches from QLabel to QTextBrowser and removes the empty spaces and the horizontal layout (not needed anymore). The resulting look is a mix from the Authors tab and original look. While on it, the default height has been increased to make room for the full message (not needing the scrollbar with the defualt message) and the link to the wireshark site has been made clickable. Bug: 15375 Change-Id: Id0a10f366c0797c98264d3a1cad58a4dc11467e3 Reviewed-on: https://code.wireshark.org/review/31153 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
4f557ea164
commit
2d57a56fa6
|
@ -313,9 +313,13 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
message += "<p>" + html_escape(comp_info_str) + "</p>\n\n";
|
||||
message += "<p>" + html_escape(runtime_info_str) + "</p>\n\n";
|
||||
message += "<p>Wireshark is Open Source Software released under the GNU General Public License.</p>\n\n";
|
||||
message += "<p>Check the man page and http://www.wireshark.org for more information.</p>\n\n";
|
||||
message += "<p>Check the man page and ";
|
||||
message += "<a href=http://www.wireshark.org>http://www.wireshark.org</a> ";
|
||||
message += "for more information.</p>\n\n";
|
||||
|
||||
ui->label_wireshark->setText(message);
|
||||
ui->pte_wireshark->setFrameStyle(QFrame::NoFrame);
|
||||
ui->pte_wireshark->viewport()->setAutoFillBackground(false);
|
||||
ui->pte_wireshark->setHtml(message);
|
||||
|
||||
/* Check if it is a dev release... (VERSION_MINOR is odd in dev release) */
|
||||
#if VERSION_MINOR & 1
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>740</width>
|
||||
<height>610</height>
|
||||
<height>650</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -35,7 +35,7 @@
|
|||
<attribute name="title">
|
||||
<string>Wireshark</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0,1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_logo">
|
||||
<property name="text">
|
||||
|
@ -54,6 +54,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_title">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><span size=\"x-large\" weight=\"bold\">Network Protocol Analyzer</span></string>
|
||||
</property>
|
||||
|
@ -63,63 +69,17 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_wireshark">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<widget class="QTextBrowser" name="pte_wireshark">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue