forked from osmocom/wireshark
Qt: ElidedLabel escapes HTML
ElidedLabel escapes HTML after !9261, so use its own methods to make text small and italicized instead of passing in rich text. IOGraphDialog used to make an error message, if it existed, bold. Perhaps ElidedLabel should have a way to have prepended bold text for such usage.
This commit is contained in:
parent
a25bcce10a
commit
0c3c3e9342
|
@ -324,6 +324,7 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf, QString displayFi
|
||||||
datetime_ticker_(new QCPAxisTickerDateTime)
|
datetime_ticker_(new QCPAxisTickerDateTime)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->hintLabel->setSmallText();
|
||||||
loadGeometry();
|
loadGeometry();
|
||||||
|
|
||||||
setWindowSubtitle(tr("I/O Graphs"));
|
setWindowSubtitle(tr("I/O Graphs"));
|
||||||
|
@ -1042,8 +1043,10 @@ void IOGraphDialog::mouseMoved(QMouseEvent *event)
|
||||||
QString hint;
|
QString hint;
|
||||||
Qt::CursorShape shape = Qt::ArrowCursor;
|
Qt::CursorShape shape = Qt::ArrowCursor;
|
||||||
|
|
||||||
|
// XXX: ElidedLabel doesn't support rich text / HTML, we
|
||||||
|
// used to bold this error
|
||||||
if (!hint_err_.isEmpty()) {
|
if (!hint_err_.isEmpty()) {
|
||||||
hint += QString("<b>%1</b> ").arg(hint_err_);
|
hint += QString("%1 ").arg(hint_err_);
|
||||||
}
|
}
|
||||||
if (event) {
|
if (event) {
|
||||||
if (event->buttons().testFlag(Qt::LeftButton)) {
|
if (event->buttons().testFlag(Qt::LeftButton)) {
|
||||||
|
@ -1111,8 +1114,6 @@ void IOGraphDialog::mouseMoved(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hint.prepend("<small><i>");
|
|
||||||
hint.append("</i></small>");
|
|
||||||
ui->hintLabel->setText(hint);
|
ui->hintLabel->setText(hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
|
||||||
QAction *action;
|
QAction *action;
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->hintLabel->setSmallText();
|
||||||
|
|
||||||
QCustomPlot *sp = ui->sequencePlot;
|
QCustomPlot *sp = ui->sequencePlot;
|
||||||
setWindowSubtitle(info_ ? tr("Call Flow") : tr("Flow"));
|
setWindowSubtitle(info_ ? tr("Call Flow") : tr("Flow"));
|
||||||
|
@ -402,8 +403,6 @@ void SequenceDialog::mouseMoved(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hint.prepend("<small><i>");
|
|
||||||
hint.append("</i></small>");
|
|
||||||
ui->hintLabel->setText(hint);
|
ui->hintLabel->setText(hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue