aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2018-04-10 16:54:23 +0800
committerMartin Kaiser <wireshark@kaiser.cx>2018-04-11 02:16:34 +0000
commitf59be5cd53017317967658b5d7cdce847b50970b (patch)
tree9c6d667ba20917d971705a7e5ae83651b8217650
parentcaea93df95ec507d09371ab232e61c0122cb044c (diff)
qt: capture file properties: add a splitter
Add a splitter to the capture file properties dialog. This allows for modifying the relative sizes of the details vs comment boxes. People who paste lots of text into the capture file comment may want a lager box for it. Change-Id: Id79d9f5fd7e589a2ba88aa5f16b52bb37d7c47ae Reviewed-on: https://code.wireshark.org/review/26845 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r--ui/qt/capture_file_properties_dialog.cpp4
-rw-r--r--ui/qt/capture_file_properties_dialog.ui74
2 files changed, 52 insertions, 26 deletions
diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp
index 0c4a72e..2876f0f 100644
--- a/ui/qt/capture_file_properties_dialog.cpp
+++ b/ui/qt/capture_file_properties_dialog.cpp
@@ -37,6 +37,10 @@ CaptureFilePropertiesDialog::CaptureFilePropertiesDialog(QWidget &parent, Captur
ui->detailsTextEdit->setAcceptRichText(true);
+ // make the details box larger than the comments
+ ui->splitter->setStretchFactor(0, 6);
+ ui->splitter->setStretchFactor(1, 1);
+
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Reset);
if (button) {
button->setText(tr("Refresh"));
diff --git a/ui/qt/capture_file_properties_dialog.ui b/ui/qt/capture_file_properties_dialog.ui
index 72b875b..bf5cd63 100644
--- a/ui/qt/capture_file_properties_dialog.ui
+++ b/ui/qt/capture_file_properties_dialog.ui
@@ -19,36 +19,57 @@
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
- <layout class="QVBoxLayout" name="verticalLayout" stretch="0,3,0,1,0">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QLabel" name="detailsLabel">
- <property name="text">
- <string>Details</string>
+ <widget class="QSplitter" name="splitter">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="detailsTextEdit">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="commentsLabel">
- <property name="text">
- <string>Capture file comments</string>
+ <property name="opaqueResize">
+ <bool>false</bool>
</property>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="commentsTextEdit">
- <property name="sizeIncrement">
- <size>
- <width>0</width>
- <height>10</height>
- </size>
+ <property name="childrenCollapsible">
+ <bool>false</bool>
</property>
+ <widget class="QWidget" name="">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="detailsLabel">
+ <property name="text">
+ <string>Details</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="detailsTextEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="commentsLabel">
+ <property name="text">
+ <string>Capture file comments</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="commentsTextEdit">
+ <property name="sizeIncrement">
+ <size>
+ <width>0</width>
+ <height>10</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
@@ -60,5 +81,6 @@
</item>
</layout>
</widget>
+ <resources/>
<connections/>
</ui>