Qt: Position UAT hint label just below the list.

Place the UAT hint label at the same position as in other dialogs;
just below the main widget.  Also use smaller font and italic.

Change-Id: I51251825ff08122e17ca60144ef53fed5c6142ef
Reviewed-on: https://code.wireshark.org/review/18969
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Stig Bjørlykke 2016-11-27 20:54:45 +01:00 committed by Peter Wu
parent c4aba11ee3
commit 591e63366b
2 changed files with 17 additions and 17 deletions

View File

@ -198,7 +198,7 @@ bool UatDialog::trySetErrorHintFromField(const QModelIndex &index)
const QVariant &data = uat_model_->data(index, Qt::UserRole + 1);
if (!data.isNull()) {
// use HTML instead of PlainText because that handles wordwrap properly
ui->hintLabel->setText(html_escape(data.toString()));
ui->hintLabel->setText("<small><i>" + html_escape(data.toString()) + "</i></small>");
return true;
}
return false;

View File

@ -20,6 +20,22 @@
</column>
</widget>
</item>
<item>
<widget class="QLabel" name="hintLabel">
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
</property>
<property name="text">
<string/>
</property>
<property name="textFormat">
<set>Qt::RichText</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,1">
<item>
@ -95,22 +111,6 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="hintLabel">
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
</property>
<property name="text">
<string/>
</property>
<property name="textFormat">
<set>Qt::RichText</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">